Skip to content

Error in context command: max() arg is an empty sequence #753

@zhouguoqionghai

Description

@zhouguoqionghai
  • Did you use the latest version of GEF from dev branch?
  • Is your bug specific to GEF (not GDB)? - Try to reproduce it running gdb -nx
  • Did you read the documentation first?
  • Did you check issues (including
    the closed ones) - and the PR?

Step 1: Describe your environment

  • Operating System / Distribution:
  • Architecture:
  • GEF version (including the Python library version) run version in GEF.

gef➤ version
GEF: (Standalone)
SHA1(/root/.gef-915ff9114127a6c02301fb3faddb0976737269db.py): d7c49b4c073a097e9a9e93c4ea1091b0644bb935
GDB: Red Hat Enterprise Linux 8.2-15.el8
GDB-Python: 3.6

Step 2: Describe your problem

[!] Command 'context' failed to execute properly, reason: max() arg is an empty sequence Traceback (most recent call last):

Steps to reproduce

Minimalist test case

In function print_guessed_arguments,
nb_argument = max(function_parameters.index(p)+1 for p in parameter_set) happened to be the problem.

// compile with gcc -fPIE -pic -o my_issue.out my_issue.c
int main(){ return 0; }

Observed Results

  • What happened? This could be a description, log output, etc.

Expected results

  • What did you expect to happen?

Traces

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions