This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Simple but crucial bug fix to gdb
Jim Blandy wrote:
>
> There's something very odd (or, as Daniel would have me say, even
> odder than usual) going on here. Rather than slap a test for null
> over the problem and have it disappear, I want to try to understand
> what's going on.
>
Sure. I agree with that.
How about adding a warning() (with code to print it only once per object file that has this problem) so it does not go unnoticed? The test for pst could still be there as defensive programming about crazy compilers (if this is what is causing the problem).
This way we would do both: prevent the core dump without hiding the problem.
P.S.: Unfortunately this code is "included" inside a loop, which makes the warning-once part awkward.
P.S.2: Being "included" also prevents me to follow things with Source Navigator :-) It could be made a function with 10 arguments (END_PSYMTAB and START_PSYMTAB would have to be turned into callbacks) instead. I can do this in a rainy day if you like the idea.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9