From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Berlin To: Jim Blandy Cc: Charlie Mills , gdb-patches@sourceware.cygnus.com Subject: Re: Simple but crucial bug fix to gdb Date: Wed, 30 May 2001 21:23:00 -0000 Message-id: <871yp6tael.fsf@dynamic-addr-83-177.resnet.rochester.edu> References: <3.0.5.32.20010530142745.01470ec0@pophost.pdxuxbre.lmc.com> X-SW-Source: 2001-05/msg00501.html Jim Blandy writes: > > I would like to submit a very simple patch to gdb. > > I would like if possible to avoid legal issues (avoid having to > > submit a form to our legal department) by simply describing the fix, > > which is a diff of only a few characters, rather than sending you a > > source file. > > The size of the text you send doesn't make any difference --- it's the > size of the change that matters. You could have posted an ordinary > patch without legal troubles. > > I find it odd that the stabs reader is seeing a function definition > symbol (a descriptor of 'f') before it's seen anything to set up the > psymtab. Does your object file really have an N_FUN stab (or > whatever) before the first N_SO stab? Ha. You are so funny. Your joking, right? This is the same STABS reader keeps psymtabs around so that we can't free them after conversion to symtabs, at the expense of every other debug info reader. And requires hacks in buildsym that only the other 8 year old symbol reader (mdebugread, split off from mipsread) requires? You are surprised it does something else odd? Anyway, ranting aside, you are completely correct in this case. The first symbol is *either* the GCC_COMPILED_FLAG_SYMBOL (followed directly by an N_SO), or the N_SO. It says so in read_ofile_symtab, in very explicit terms ("The N_SO starting this symtab is the first symbol, so we better not check the symbol before it") So either all the comments are wrong, or gcc is broken. > > If we just ignore the N_FUN, I'm worried that the pst's textlow will > not be set correctly --- that is, I'm not sure it's safe to just > ignore the N_FUN when pst is zero. > > Could you post the result of running `objdump --stabs' on your > executable, or object file, if it's not too large or revealing? -- "We were in Salino, Utah when we were arrested for not going through a green light. We pleaded "maybe". I asked the judge if he knew what time it is, he did, and I said, "No further questions." "-Steven Wright