From: "Nils Henrik Lorentzen" <nlorentz@online.no>
To: <gdb@sources.redhat.com>
Subject: Using gdb symtab code
Date: Sat, 22 Dec 2001 04:01:00 -0000 [thread overview]
Message-ID: <000b01c18ae2$2d231380$45a1fea9@pbncomputer> (raw)
Hi,
I am writing a small utility to detect memleaks,
and I would like to print some informal backtraces
for the leaks. So I started writing code to read in ELF files,
demangling the symbols etc. Then I thought that GDB probably
allready implements all this stuff, and could be used for the task.
I could write a perl script or something to start
gdb, send commands to it and parse the output, but that is
IMHO the wrong way to do it.
The right solution would IMO be to separate the
needed code in GDB into a separate lib and
use that. Such a generic lib for symtab handling
and possibly also backtrace recording could also be
very usefull for other similar apps like GNU Checker
and for printing backtraces in crash handlers.
Anyways, I took a dive into the code & docs
and it seems a bit messy..
There does not seem to be a clean and abstract
separation between the UI side and the symtab side of the code.
Also there seems to be much usage of global variables.
So my question is: How would people look at it if I
used some GDB code as a starting-point for
a separate symbol-table handling lib with a
clean API ?
It would of course be under a compatible license.
I see there is an LGPL in the top directory of gdb.
Does this mean that I could put such a lib under LGPL if
I only used the symtab/objectfile parts of the GDB code ?
Nils Henrik
reply other threads:[~2001-12-22 12:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='000b01c18ae2$2d231380$45a1fea9@pbncomputer' \
--to=nlorentz@online.no \
--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