Re: [PATCH] remote: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs:

Pedro Alves
2012-06-01T14:56:23Z

On 06/01/2012 03:53 PM, Joakim Tjernlund wrote:

> Pedro Alves <palves@redhat.com> wrote on 2012/06/01 16:40:38:
>>
>> On 06/01/2012 03:38 PM, Joakim Tjernlund wrote:
>>
>>>> GDB has no special knowledge of the Linux kernel, nor of u-boot.
>>>>> A GNU/Linux targeted GDB (*-*-linux-gnu) recognizes, and knows how to
>>>>> debug user space applications. If the kernel binary or the u-boot binary
>>>>> look very much like GNU/Linux user space programs, the *-*-linux-gnu targeted
>>>>> GDB will assume that's what they are. If you used a bare metal elf/eabi
>>>>> targeted GDB, which is really what those programs are, you'd not see this.
>>>
>>
>>>
>>> Yes you would, the error comes from this in solibsvr4.c:
>>
>>> static const char * const bkpt_names[] =
>>> {
>>> "_start",
>>> "__start",
>>> "main",
>>> NULL
>>> };
>>
>>
>> No you wouldn't, because solib-svr4 is not used (or even compiled in)
>> on a bare metal targeted GDB.
>
> One suggesting I got is to wrap this last test with
> if (interp_name) /* Check if there is a ld.so at all */
> if (!current_inferior ()->attach_flag)
> ...
> }
>
> What do you think about that?

That makes sense.

--
Pedro Alves