From: Fred Fish <fnf@ninemoons.com>
To: gdb-patches@sources.redhat.com
Cc: fnf@redhat.com
Subject: [RFA] Fix gdb.base/gdb1250.exp to work when abort() is in a shared library
Date: Mon, 23 Feb 2004 05:57:00 -0000 [thread overview]
Message-ID: <200402222257.42373.fnf@ninemoons.com> (raw)
The gdb1250.exp test tries to run directly to abort(), which fails if
abort() is in a shared library that hasn't yet been loaded. For
example the the i686-pc-linux-gnu native test fails:
FAIL: gdb.base/gdb1250.exp: setting breakpoint at abort
ERROR: couldn't run to breakpoint
By first running to main, the shared libc gets loaded and then the
run to abort() works. Here is a patch.
-Fred
+ 2004-02-22 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/gdb1250.exp: Run to main before trying to
+ run to abort.
+
Index: gdb.base/gdb1250.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1250.exp,v
retrieving revision 1.1
diff -c -p -r1.1 gdb1250.exp
*** gdb.base/gdb1250.exp 15 Jul 2003 16:28:21 -0000 1.1
--- gdb.base/gdb1250.exp 23 Feb 2004 05:54:30 -0000
***************
*** 1,4 ****
! # Copyright 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
*************** gdb_exit
*** 41,46 ****
--- 41,55 ----
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+
+ # First run to main so that any shared libc gets loaded. That is
+ # probably where abort() lives and gdb won't know how to find it to
+ # set a breakpoint there until the shared library symbols are read in.
+
+ if ![runto_main] then {
+ perror "couldn't run to main"
+ continue
+ }
if ![runto abort] then {
perror "couldn't run to breakpoint"
next reply other threads:[~2004-02-23 5:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-23 5:57 Fred Fish [this message]
2004-02-23 6:04 Michael Elizabeth Chastain
2004-02-23 6:26 ` Fred Fish
2004-02-23 13:57 ` Daniel Jacobowitz
2004-02-23 13:58 ` Daniel Jacobowitz
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=200402222257.42373.fnf@ninemoons.com \
--to=fnf@ninemoons.com \
--cc=fnf@redhat.com \
--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