This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: calling functions in gdb sometimes doesn't work


>>>>> "Andrew" == Andrew Cagney <ac131313@redhat.com> writes:
    Andrew>
    >> Hi,
    >> with gdb 5.2 (Solaris 5.8) sometimes calling a function,
    Andrew>
    >> e.g. hello(){printf("hello\n");}, results in the following message:
    >> (gdb) p hello()
    Andrew>
    >> The program being debugged stopped while in a function called from GDB.
    >> When the function (hello) is done executing, GDB will silently
    >> stop (instead of continuing to evaluate the expression containing
    >> the function call).
    >> When I try to continue my program it appears as if this function didn't
    >> get call at all.
    Andrew>
    Andrew> Check which thread has stopped.

The one where I'm just at when I call a function.

Actually the message from above appears only when I've some breakpoint
defined, in which gdb would eventually run into, when I continue.
If there's no breakpoint, gdb will ignore my function call and continue the
program, but it'll show this message when I interrupt the program again.


Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Idiot, n.:  A member of a large and powerful tribe whose
influence in human affairs has always been dominant and
controlling.  -- Ambrose Bierce, "The Devil's Dictionary"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]