Re: PATCH: Problem union comparision in TUI

Andrew STUBBS
2005-10-20T10:18:12Z

Eli Zaretskii wrote:
>>Date: Wed, 19 Oct 2005 16:07:51 -0400
>>From: Daniel Jacobowitz <drow@false.org>
>>
>>We've already established (via the bug report) that some of the time,
>>the code has no idea which one is in use when comparing them. They're
>>used for relative line ordering within a particular window; if it's a
>>source window, the lines are sorted by line number, and if it's a
>>disassembly window, they're sorted by code address. So in both cases
>>it's a "line number"; that's why I favor using a single variable for
>>them, although I'm open to alternative suggestions.
>
>
> Yes, I've read the code before I replied, so I know all that already.
> Having read the code, I'm not sure that addresses are used only for
> disassembly windows and line numbers only for source windows. We
> could have more bugs; that's why I think cleaning the code is
> important.

Indeed, it isn't as simple as addresses for assembly and lines for
sources. That's what the original problem was - i686-pc-linux-gnu native
uses one and sh-elf cross (also running on i686-pc-linux-gnu) uses the
other while both are supposedly running the same simple program .

> I think it shouldn't be too hard to make the change I suggested, since
> most of it boils down to mechanically adding either the line or
> address tag whenever the respective member of the union is assigned a
> value.

Yeah, it shouldn't be too hard. It just seems redundant.

Andrew Stubbs