From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Jim Blandy Cc: Fernando Nasser , gdb-patches@sources.redhat.com Subject: Re: Simple but crucial bug fix to gdb Date: Thu, 31 May 2001 14:43:00 -0000 Message-id: <3B16BAEB.2AD12D2E@cygnus.com> References: <3.0.5.32.20010530142745.01470ec0@pophost.pdxuxbre.lmc.com> <20010530173650.A21397@redhat.com> <3B15711D.BEA4B77E@cygnus.com> <3B1638A2.79AE4BCF@redhat.com> X-SW-Source: 2001-05/msg00512.html 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