This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Remove some empty lines from the linetable


> I thought about sorting groups of consecutive lines instead of
> individual lines.  That's tricky and a wasteful of memory, though, if
> this simpler solution works: just delete such troublesome cases in
> record_line.

I think it makes sense.

> 2007-10-01  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* buildsym.c (record_line): Remove empty lines followed by
> 	end-of-sequence markers.

There is one thing I am not sure about, though. In your patch,
you still add the end-of-sequence marker. So you eliminate the
empty line 58, but keep it's associated line 0 entry. I guess
we have to in the following case:

  line 57 @ 0x1234
  line 58 @ 0x1240
  line 0  @ 0x1240

We need this because otherwise we'd record the wrong end-address
for line 57.

So I agree the patch makes sense, and I prefer it to be independent
of the debugging info.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]