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

Re: [PATCH] Fix crash when loading a core with unexpected register section size


Pedro Alves writes:

> On 01/26/2017 02:31 PM, Antoine Tremblay wrote:
>> 
>> Pedro Alves writes:
>> 
>>> On 01/26/2017 01:54 PM, Antoine Tremblay wrote:
>>>>
>>>> Pedro Alves writes:
>>>>
>>>>> On 01/26/2017 01:17 PM, Antoine Tremblay wrote:
>>>>>> When loading a core without an executable like so:
>>>>>> gdb --core core for example often the gdbarch won't contain the
>>>>>> iterate_over_regset_sections method.
>>>>>
>>>>> Can you give an example?  That'd help a lot understand the issue
>>>>> better.
>>>>>
>>>>
>>>> I can't share the core that I have that reproduced this :( 
>>>
>>> I meant an example gdbarch.  It sounded like this would
>>> happen with any core with that architecture?
>> 
>> Ho yes, see v2, I added "For example arch-arm." Like you suggested.
>
> Eh, "arch-" in "arch-foo" was just meant to show I was talking
> about an arch.  I didn't mean for you to keep the "arch-" part.  :-)

hehe I figured but wasn't sure. I'll just say arm.

>
> So basically, we could have a testcase that dumps a file, and then
> loads with back with no executable loaded?  Do we really not
> have such a testcase yet?
>

Not exactly if it was that simple it would have been catched by
gdb.base/corefile.exp

The problem is that this triggers only if the core file register section
is larger than expected. And if you just create a core and read it the
register section is ok.

However crafting a core with this problem is non-trivial at least to my
current knowledge.

Thanks,
Antoine


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