This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug macros/22466] New: user-defined function thinks it lacks an argument


https://sourceware.org/bugzilla/show_bug.cgi?id=22466

            Bug ID: 22466
           Summary: user-defined function thinks it lacks an argument
           Product: gdb
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: macros
          Assignee: unassigned at sourceware dot org
          Reporter: hi-angel at yandex dot ru
  Target Milestone: ---

Steps:
1. Define in gdb_init the following function:

        define print_arg2
          print ($argc == 0)? $rsi : *($arg0*)$rsi
        end

2. Start debugging, and run "print_arg2"

Expected results: print of the $rsi register

Actual results: error "Missing argument 0 in user function."

Additional info: it works with the following, semantically the same, code:

        define print_arg2
          if ($argc == 0)
                print $rsi
          else
                print *($arg0*)$rsi
          end
        end

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]