Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sources.redhat.com
Subject: Re: PATCH: Problem union comparision in TUI
Date: Wed, 19 Oct 2005 12:28:00 -0000	[thread overview]
Message-ID: <20051019122816.GA6583@nevyn.them.org> (raw)
In-Reply-To: <43561685.3010300@st.com>

On Wed, Oct 19, 2005 at 10:48:53AM +0100, Andrew STUBBS wrote:
> Is there any reason for using a union here? It's not like one value is 
> float and the other int - both are ints and the fact that you can't tell 
> which you are using shows nobody actually uses the distinction (unless I 
> have missed something). The union doesn't save any space, nor does it 
> make the code any more efficient.
> 
> We could just use:
> 
> CORE_ADDR line_or_address;
> 
> and leave it at that.

I'd rather that.

It seems possible to figure out which one it's using - always file line
numbers for source displays and addresses for assembly displays.

          if ((win == TUI_SRC_WIN
               && bp->source_file
               && (strcmp (src->filename, bp->source_file) == 0)
               && bp->line_number == line->line_or_addr.line_no)
              || (win == TUI_DISASM_WIN
                  && bp->loc->address == line->line_or_addr.addr))

But why bother...

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-10-19 12:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 14:52 Andrew STUBBS
2005-10-17 15:02 ` Andrew STUBBS
2005-10-19  9:15 ` Eli Zaretskii
2005-10-19  9:51   ` Andrew STUBBS
2005-10-19 12:28     ` Daniel Jacobowitz [this message]
2005-10-19 16:22       ` Andrew STUBBS
2005-10-19 20:03     ` Eli Zaretskii
2005-10-19 20:08       ` Daniel Jacobowitz
2005-10-19 20:22         ` Mark Kettenis
2005-10-20  8:43         ` Eli Zaretskii
2005-10-20 10:18           ` Andrew STUBBS
2005-10-20 16:20             ` Andrew STUBBS
2005-10-20 17:56               ` Daniel Jacobowitz
2005-10-20 19:41               ` Eli Zaretskii
2005-10-21 14:55                 ` Andrew STUBBS
2005-10-21 16:39                   ` Daniel Jacobowitz
2005-10-21 22:03                     ` Eli Zaretskii
2005-10-21 22:13                   ` Eli Zaretskii
2005-10-24 10:28                     ` Andrew STUBBS
2005-10-24 11:06                       ` Eli Zaretskii
2005-10-24 12:56                         ` Andrew STUBBS
2005-10-25 10:45                           ` Eli Zaretskii
2005-11-01 16:24                             ` Andrew STUBBS
2005-11-01 16:28                               ` Daniel Jacobowitz
2005-11-01 17:43                                 ` Andrew STUBBS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051019122816.GA6583@nevyn.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox