From: David Lecomber <david@allinea.com>
To: gdb <gdb@sources.redhat.com>
Subject: LD_PRELOAD, SIGTRAP and step/next
Date: Thu, 17 Mar 2005 12:45:00 -0000 [thread overview]
Message-ID: <1111063455.8222.23.camel@delmo.priv.wark.uk.streamline-computing.com> (raw)
Dear all,
I am debugging using a memory checking library -- dmalloc -- this does
the usual things via an LD_PRELOAD over the malloc. I am getting
SIGTRAP when trying to call a function in this library -- but only after
a step or a next; after a user-defined breakpoint behaviour is correct!
Can anyone explain/resolve the behaviour:
(gdb) set environment LD_PRELOAD=lib/libdmalloc.so
(gdb) b main
(gdb) run
Starting program: /home/david/projects/code/ddt/examples/a.out
Breakpoint 1, main (argc=1, argv=0xbffff604, environ=0xbffff60c) at
hello.c:65
65 int tag = 50; /* Tag for messages */
(gdb) print dmalloc_message("hello")ne}
void
(gdb) step
79 t2 = malloc(sizeof(typeThree));
(gdb) p dmalloc_message ("ho")
Program received signal SIGTRAP, Trace/breakpoint trap.
0xb7f831c3 in dmalloc_message (format=0x0) at malloc.c:2079
2079 {
The program being debugged was signaled while in a function called from
GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (dmalloc_message)
[..]
Very odd indeed!
d.
--
David Lecomber <david@allinea.com>
next reply other threads:[~2005-03-17 12:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-17 12:45 David Lecomber [this message]
2005-03-17 14:12 ` Daniel Jacobowitz
2005-03-17 14:17 ` David Lecomber
2005-03-17 18:09 ` 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=1111063455.8222.23.camel@delmo.priv.wark.uk.streamline-computing.com \
--to=david@allinea.com \
--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