On Вт, ноя 12, 2019 at 13:50, Andreas Schwab <sch...@suse.de>
wrote:
On Nov 12 2019, Konstantin Kharlamov wrote:
Gdb documentation says that gdb-defined functions refer to their
args as
$arg0…$argN. The just "$" that gdbinit is using here refers to
something
else,
That's the last thing printed.
Hmm, okay… Am I missing something…? As I'm reading, this looks
definitely wrong, because the "last thing printed" is just a random
value. To illustrate: I can do a calculation, like `p 2 + 2`, and then
I execute, say, `pgg stmt`, and debuggee crashes because it calls
`debug_gimple_stmt(4)`. That's what happened to me a lot of times until
I figured the problem is in gdbinit.
which results in gdb errors, or even crashes of debuggee. Let's
fix that.
That breaks all users of these macros, since you are now required to
pass an argument.
I'm definitely missing something. Who are these users, and how can they
make anything useful of these functions if they don't even pass an
argument?
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA
B9D7
"And now for something completely different."