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] [PR gdb/23095] Fixed test case to compile & run on FreeBSD


Simon,

Thanks for reviewing the patch.
Attached updated patch.

Thanks
Rajendra

On Sat, Apr 21, 2018 at 8:29 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> On 2018-04-20 23:10, Rajendra SY wrote:
>>
>> Problems:
>> 1. linking -dl lib on FreeBSD platform
>> 2. backtrace from ld-elf shows r_debug_state() instead of
>> _dl_debug_state()
>>
>> Cause:
>> 1. There is no dl library on FreeBSD platform test has to ignore linking
>> "-ldl"
>> 2. The stop due to a shared library event shows backtrace frame #0
>> function as r_debug_state()
>>
>> Test passed:
>> PASS: gdb.base/break-probes.exp: set stop-on-solib-events 1
>>
>> gdb/ChangeLog:
>> 2018-04-20  Rajendra SY  <rajendra.sy@gmail.com>
>>
>>         PR gdb/23095
>>         * gdb/testsuite/gdb.base/break-probes.exp:
>
>
> Hi Rajendra,
>
> Instead of conditionally adding -ldl in the test, it would be better to pass
> the "shlib_load" options to prepare_for_testing.  It will add the right flag
> depending on the platform.
>
> It is handled here, from what I see it already considers freebsd:
>
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/testsuite/lib/gdb.exp;h=4d48f5e3ad39967bba3ecf8cad5da5ea87f355c8;hb=HEAD#l3593
>
> Can you try that?
>
> The other part of the change (r_debug_state) is probably fine to keep there,
> because it's very specific to this test.
>
> Simon

Attachment: gdb-break-probes.diff
Description: Binary data


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