This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/22472] New: Arguments evaluation doesn't always work
- From: "hi-angel at yandex dot ru" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 22 Nov 2017 05:29:18 +0000
- Subject: [Bug gdb/22472] New: Arguments evaluation doesn't always work
- Auto-submitted: auto-generated
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.