This is the mail archive of the gdb@sourceware.org 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]

Python and target-async


Hello,

I'm facing a problem with Python not behaving correctly when
"target-async" is on. I'll report it in the bugtracker if someone else
confirms the problem:

(replace PID by any process ID to which you can attach)

> (gdb) set target-async on
> (gdb) py gdb.execute("attach PID") ; gdb.execute("where")
> 0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6
> #0 ?0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6
> #1 ?0x000000000043ede2 in ?? ()
> #2 ?0x000000000044005f in wait_for ()
> #3 ?0x0000000000430c45 in execute_command_internal ()
> #4 ?0x0000000000430e0e in execute_command ()
> #5 ?0x000000000041d526 in reader_loop ()
> #6 ?0x000000000041ccde in main ()
> (gdb) detach
> Detaching from program ...
> (gdb) set target-async on
> (gdb) py gdb.execute("attach PID") ; gdb.execute("where")
> #0 ?0x0000003cbd0aa47e in ?? ()
> #1 ?0x0000000000000000 in ?? ()
> 0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6

--> the inferior can't be access normally

the problem lies in the fact that GDB doesn't return from Python
between the `attach' and the `where', (the situation occurs during a
Python function calls as well).

> (gdb) set target-async on
> (gdb) py gdb.execute("attach PID")
> (gdb) py gdb.execute("where")

works correctly.


I'm not sure there is something I can do to solve it, any idea what I
should look for?


thanks,

Kevin


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