Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: gdb@sources.redhat.com
Subject: Unreasonable expectation in gdb.base/break.exp
Date: Tue, 04 Apr 2006 23:02:00 -0000	[thread overview]
Message-ID: <20060404.160227.69457417.davem@davemloft.net> (raw)


When compiled with optimizations enabled, this testcase
expects that stopping at main() will result in the place
being somewhere within the source file of main().

This is not necessarily the case.

In my case on sparc-*-linux*, the instruction that starts
main() in this situation is part of the inline expansion of
strtol(), via the inline expansion of atoi(), in the
stdlib.h header file so that is the place GDB reports that
it is at when the breakpoint on main() is hit.

This causes the break.exp testcase to fail.

I think this is perfectly reasonable and correct behavior on
both gdb's and gcc's part, and this check in break.exp should
be made a little bit more leanient.

Any objections?


             reply	other threads:[~2006-04-04 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 23:02 David S. Miller [this message]
2006-04-04 23:05 ` Daniel Jacobowitz
2006-04-04 23:08   ` David S. Miller
2006-04-04 23:12     ` Daniel Jacobowitz
2006-04-04 23:20       ` David S. Miller
2006-04-05  1:37         ` Daniel Jacobowitz
2006-04-05  5:11           ` David S. Miller

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=20060404.160227.69457417.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gdb@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