[PATCH][gdb] Fix internal-error in process_event_stop_test

Tom de Vries tdevries@suse.de
Wed Feb 3 09:55:25 GMT 2021


On 2/2/21 7:25 PM, Hafiz Abid Qadeer wrote:
> On 08/01/2021 05:23, Tom de Vries wrote:
>> On 1/7/21 9:10 PM, Tom Tromey wrote:
>>>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>>> Tom> Fix this by only trying to install the master exception breakpoint in
>>> Tom> libgcc.debug using the _Unwind_DebugHook method, if the install using probes
>>> Tom> in libgcc failed.
>>>
>>> This seems like a reasonable idea.
>>>
>>> Tom> Any comments?
>>>
>>> I suspect this would be a bit shorter if the loop only examined
>>> "primary" objfiles (ones that don't have a backlink) and then delegated
>>> to a helper function that did the search.  What do you think?
>> I've made the loop now over "primary" objfiles.  Also, I've split up the
>> helper function into one using probes, and the other using the hook,
>> which hopefully helps to make the code a bit clearer.
>>
>> I'll put this through testing and commit, unless there are further comments.
> 
> Hi Tom,
> I observed that nextoverthrow.exp is now failing for many targets
> including arm-none-eabi after this change.
> 
>> +      /* Iterate over separate debug objects and try an _Unwind_DebugHook
>> +	 kind breakpoint.  */
>> +      for (objfile *sepdebug = obj->separate_debug_objfile;
>> +	   sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile)
>> +	if (create_exception_master_breakpoint_hook (sepdebug))
>> +	  break;
> 
> This bit seems to be problematic as it is stopping exception breakpoint
> to be installed when separate_debug_objfile is null.

Hi Abid,

thanks for the report and the analysis.  I've filed this here (
https://sourceware.org/bugzilla/show_bug.cgi?id=27330 ).

I've posted (in the PR) a tentative patch, that causes no regression in
my test setup.  Can you verify that it fixes the problems you're seeing?

Thanks,
- Tom


More information about the Gdb-patches mailing list