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 gdb/22472] New: Arguments evaluation doesn't always work


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

            Bug ID: 22472
           Summary: Arguments evaluation doesn't always work
           Product: gdb
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: hi-angel at yandex dot ru
  Target Milestone: ---

Steps to reproduce:

1. start `gdb -nh`
2. define the following command

        (gdb) define argnum
        Type commands for definition of "argnum".
        End with a line saying just "end".
        >print $argc
        >end
        (gdb) 

3. type the following:
        (gdb) argnum (1+1)
        $1 = 1

        works as expected.

4. type the following:
        (gdb) argnum (1 + 1)
        $2 = 3

Expected: same result as at point 3.
Actual result: gdb did not evaluate the argument, and passed three instead of
one.

-- 
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]