Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jason Molenda <jmolenda@apple.com>
To: Stephane Carrez <stcarrez@nerim.fr>
Cc: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
Date: Mon, 24 Feb 2003 23:34:00 -0000	[thread overview]
Message-ID: <54BCA3D4-4850-11D7-AE21-003065BC3540@apple.com> (raw)
In-Reply-To: <3E5A92C7.4070205@nerim.fr>


On Monday, February 24, 2003, at 01:46  PM, Stephane Carrez wrote:

> It's not good because marker4() is defined at 2 different lines.
>
> If we use gdb_get_line_number() it will always find the first match 
> which is at 46
>
> and the test will fail for targets that don't compile their tests with 
> -DPROTOTYPES.

Another alternative is to grab the line number when the breakpoint is 
set, and compare against that.  It does mean that gdb could have the 
line number woefully incorrect, but at least gdb has to be consistently 
incorrect.  e.g. something like

    send_gdb "break marker4\n"
    gdb_expect {
      -re "Breakpoint.*at.* file .*$srcfile, line ($decimal).*" {
        set marker4_lineno $expect_out(1,string)
      }
[...]
    }

Or drop the PROTOTYPES-is-undefined case altogether.  I have no idea if 
there are cross-compilers in use that don't support prototypes, though..

J


  reply	other threads:[~2003-02-24 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24 21:19 Stephane Carrez
2003-02-24 21:34 ` Elena Zannoni
2003-02-24 21:46   ` Stephane Carrez
2003-02-24 23:34     ` Jason Molenda [this message]
2003-04-04 20:09 ` Stephane Carrez
2003-04-04 20:41 Michael Elizabeth Chastain
2003-04-04 21:31 ` Stephane Carrez
2003-04-04 22:29   ` Daniel Jacobowitz
2003-04-05 10:46     ` Stephane Carrez
2003-04-05 13:20       ` Andrew Cagney

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=54BCA3D4-4850-11D7-AE21-003065BC3540@apple.com \
    --to=jmolenda@apple.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=stcarrez@nerim.fr \
    /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