This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug macros/22466] New: user-defined function thinks it lacks an argument
- From: "hi-angel at yandex dot ru" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 21 Nov 2017 02:00:15 +0000
- Subject: [Bug macros/22466] New: user-defined function thinks it lacks an argument
- Auto-submitted: auto-generated
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.