gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gdb] GDB/DDD problems when linking to object lib not created with -g


From: Gauthier, Dave
Subject: [Gdb] GDB/DDD problems when linking to object lib not created with -g
Date: Wed, 24 Apr 2002 10:49:09 -0400

Hi:

I'm working on a Tru64 machine, writing in C with embedded SQL calls.  It
needs to be linked to an .so supplied by Oracle in order for the thing to
work.  I get SIGTRAP and SIGILL and SIGSEGV and other errors when I try to
run the program under debug, but only if I try stepping through (never see
any of these errors if I simply RUN).  Anyway, in my experiments, I actually
stripped away all the Oracle/SQL stuff leaving a very simple, pure C program
which just has 2 printf statements.. a "Hi\n" and a "Bye\n".  The
compilation looks like...

        cc -o test_dbg -g2 test_dbg.c -L$ORACLE_HOME/lib -lclntsh 

The simple program fails with one of the 3 messages I cited.  Behavior is
unpredictable, any one of the messages may pop up, or, sometimes none (the
program runs).  But it usually fails.  Also seen at times was a "heuristic
fencepost" limit problem.  But a "show heuristic-fence-post" shows "0" (no
limit).

If I get rid of the link to the libclntsh.so, GDB and DDD run fine.  Mind
you, the simple 2-line program never calls anything in the .so, but simply
linking to it causes the problem.  libclntsh.so was provided to us by
Oracle.  It's not the kind of thing that I can recreate with -g (which might
fix the problem).  In other words, I need to live with it as it is, and, I
really have no interest in ever stepping into it in a debug session.

So, the questions are:

- Given that I'll never want to debug the Oracle functions, is there a way
that I can tell GDB to ignore them in a way that would solve my problem?
- Is this a bug in GDB?  I mean I can "RUN" through the program without a
problem but when I try to step through it, problems pop up.  In my mind,
they should pop up in both cases, or none, but not just one case.

Any other suggestions or comments?

We're sort of at the start of a big project and we'll really need a debugger
that can work with the Oracle .so the way it is.  I'd hate to have to look
outside for a closed source alternative that can do the job.

Thanks
-dave

address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]