GDB and thread

Marco Atzeri marco.atzeri@gmail.com
Sun Dec 29 16:50:00 GMT 2019


Am 29.12.2019 um 05:38 schrieb Brian Inglis:
> On 2019-12-28 15:28, Marco Atzeri wrote:
>> Am 28.12.2019 um 23:03 schrieb Ken Brown:
>>> On 12/28/2019 4:27 PM, Marco Atzeri wrote:
>>>> I am trying to debug the libuv test failures,
>>>> but it seems I am not able to convince GDB on stopping
>>>> just before the failure.
>>>>
>>>> Is "thread apply all" working on Cygwin ?
>>>> The fact that produces no output in comparison to
>>>> a normal break command is a bit strange
>>>>
>>>> (gdb) break test-dlerror.c:34
>>>> Breakpoint 1 at 0x10040b0b0: file /pub/devel/libuv/libuv-1.34.0/test/test-dlerro
>>>> r.c, line 34.
>>>> (gdb) thread apply all break test-dlerror.c:34
>>>

>>> Might this be related to optimization?  That could change the order in which
>>> lines of code are executed.  Have you tried building without optimization?
>>
>> Already thought, but it is built with -ggdb -O0
> Recommended to use at least -Og nowadays for better debugging:
> 
> 	$ info gcc inv debug
> 
> "With no '-O' option at all, some compiler passes that collect information
> useful for debugging do not run at all, so that '-Og' may result in a better
> debugging experience."
> 

Thanks for the info
unfortunately there is no difference.
It is like the debugger is unable to see the breakpoints when running
in this threaded code.

Marco



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list