[obv] Code cleanup: Move print_command_1 expr variable scope

Simon Marchi simon.marchi@ericsson.com
Fri Mar 27 19:15:00 GMT 2015


Hi Jan,

I think this patch is wrong. Starting with that commit (f30d5c7),
some tests (e.g. mi-break.exp) started to fail for me, because
of gdb segfaulting. Backtrace here: http://paste.ubuntu.com/10690836/

The address of expr is passed to the cleanup. When the cleanup is ran,
expr is no longer in scope, so what is at that address is probably not
safe to use anymore. That's my guess.

Simon



More information about the Gdb-patches mailing list