This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR 21337 v2: segfault when re-reading symbols with remote debugging.
>>> ...
>> I'll need to take a look. Last time I tried I it was more difficult
>> to expose the problem on the native build of GDB.
>
> reread_symbols is called when using the run (run_command_1), attach (attach_post_wait which then calls setup_inferior) and load (load_command) commands. So maybe something like this would reproduce it?
>
> - compile test program
> - launch gdb with test program
> - touch test program
> - run
>
> Simon
>
Hi Simon,
What I meant was that when I previously did tests with the native
build, for some reason the freed data was not being overwritten, or
possible written with the same data, at the time read_symbols was
called in reread_symbols. Thus problem wasn't exposed before the
objfiles_changed is eventually called in reread_symbols.
I just did a test with a native build of gdb (7.9.1) and the problem
was exposed, so chances are it will be also be exposed with a ToT
build.
Doug