From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'John Yates'" <jyates@netezza.com>, <gdb@sourceware.org>
Cc: "'Eli Zaretskii'" <eliz@gnu.org>
Subject: RE: Backtrace library?
Date: Fri, 28 Aug 2009 15:54:00 -0000 [thread overview]
Message-ID: <001f01ca27f5$26da1e20$748e5a60$@u-strasbg.fr> (raw)
In-Reply-To: <0C8E40D1B3E28947A3EA5E185EF1C9B2AF5FA19AF4@CORP-EXCH01.netezza.com>
You could probably try to use
Eli's work called bfdsymify.c
This is based on GNU bfd library,
but for DJGPP stack dumps written on
a Dos console.
But it can also handle a stack trace
stored in a file.
The version I have came with GDB 6.1.1 for DJGPP
and BFD version is 2.15.90, but
it might be easy to update.
The sources are available
ftp://ftp.univie.ac.at/applications/djgpp/v2gnu/gdb611s.zip
To compile it for DJGPP on current CVS HEAD
I had to change only a little,
patch is below.
To use it on other platform you might need to remove
DJGPP specific stuff...
Hope this can help you.
Pierre Muller
Pascal language support maintainer for GDB
PS: Eli, is this source in any CVS tree?
Pierre@d620-muller ~/gdbcvs/djbuild/bfdsymify
$ diff -up ../../src/bfdsymify/bfdsymify.c bfdsymify.c
--- ../../src/bfdsymify/bfdsymify.c 2009-08-28 17:00:44.781250000 +0200
+++ bfdsymify.c 2009-08-28 17:27:08.812500000 +0200
@@ -393,7 +393,8 @@ find_address_in_section (bfd *bfdp, asec
if (pc < vma)
return;
- size = bfd_get_section_size_before_reloc (section);
+// size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (pc >= vma + size)
return;
@@ -575,7 +576,8 @@ int main(int argc, char **argv)
fputs(line, ofile);
if (progname)
{
- char *arg_base = basename(progname), *prog_base =
basename(line+9);
+ char *arg_base = lbasename(progname);
+ char *prog_base = lbasename(line+9);
if (strcasecmp(prog_base, arg_base)
&& strncasecmp(prog_base, arg_base, strlen(prog_base)-4))
fprintf(stderr,
@@ -675,7 +677,7 @@ int main(int argc, char **argv)
}
if (progname)
{
- char *arg_base = basename(progname), *prog_base = basename(prog);
+ char *arg_base = lbasename(progname), *prog_base = lbasename(prog);
if (strcasecmp(prog_base, arg_base)
&& (strncasecmp(prog_base, arg_base, strlen(prog_base)-4)
next prev parent reply other threads:[~2009-08-28 15:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 21:17 John Yates
2009-08-21 7:48 ` Paul Pluzhnikov
2009-08-21 15:46 ` paawan oza
2009-08-27 14:35 ` Christophe-Marie Duquesne
2009-08-27 15:45 ` John Yates
2009-08-27 17:56 ` Christophe-Marie Duquesne
2009-08-28 15:54 ` Pierre Muller [this message]
2009-08-28 16:03 ` Eli Zaretskii
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='001f01ca27f5$26da1e20$748e5a60$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=jyates@netezza.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