* Debug shared library
@ 2004-08-16 18:48 Schifanella Rossano
2004-08-16 19:04 ` Keith Seitz
0 siblings, 1 reply; 5+ messages in thread
From: Schifanella Rossano @ 2004-08-16 18:48 UTC (permalink / raw)
To: insight
Hi,
I wrote a simple Java application and I use JNI for implementing native
code written in C. I created a shared library and I load it from a Java
class. How I can debug my shared library in such context? More
generally speaking, how I can debug a shared library (loaded by a
program not written in C) ?
Thanks in advance
Rossano S.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Debug shared library
2004-08-16 18:48 Debug shared library Schifanella Rossano
@ 2004-08-16 19:04 ` Keith Seitz
2004-08-18 9:36 ` Evan Lavelle
0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2004-08-16 19:04 UTC (permalink / raw)
To: Schifanella Rossano; +Cc: insight
On Mon, 2004-08-16 at 11:51, Schifanella Rossano wrote:
> I wrote a simple Java application and I use JNI for implementing native
> code written in C. I created a shared library and I load it from a Java
> class. How I can debug my shared library in such context? More
> generally speaking, how I can debug a shared library (loaded by a
> program not written in C) ?
I'm no authority on this (and you're really better off asking on the gdb
mailing list, where the real experts are hiding), but I'll mention what
I've done...
I wait for the shared library to be loaded, then set a break in it.
This, of course, means that you'll have to wait for the dlopen to
complete. This isn't usually quite so difficult as it is annoying.
However, as I recall, there should be some new gdb feature, pending
breakpoints. In GDB 6.1:
http://sources.redhat.com/gdb/current/onlinedocs/gdb_6.html#IDX151
You should be able to use this, but you'll have to set it in the
console, since Insight itself does not yet understand these.
Keith
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-01 16:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-16 18:48 Debug shared library Schifanella Rossano
2004-08-16 19:04 ` Keith Seitz
2004-08-18 9:36 ` Evan Lavelle
2004-08-18 14:58 ` Keith Seitz
[not found] ` <41353E4E.3000903@sun.com>
2004-09-01 16:56 ` Keith Seitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).