This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 v3] Add helper script for glibc debugging


On 9/27/19 5:30 PM, Gabriel F. T. Gomes wrote:
> On Fri, 27 Sep 2019, Carlos O'Donell wrote:
> 
>> On 9/27/19 3:44 PM, Gabriel F. T. Gomes wrote:
>>
>> Almost! Thank you for working through this, I think the script will be
>> really useful for new and old people... I always have to retype this
>>from the wiki ;}
> 
> Thank you!
> 
>>> +run --library-path $(rpath-link):$${BUILD_DIR}/nptl_db \  
>>> +__TESTCASE__ __DIRECT__
>>
>> OK, run the loader directly.
> 
> And the loader runs the test case (see updated comment suggestion below).
> 
>>
>> [...]
>>
>>> +# We need to make sure that gdb is linked against the standalone glibc
>>> +# so that it picks up the correct nptl_db/libthread_db.so. So that means
>>> +# invoking gdb using the standalone glibc's linker and passing nptl_db
>>> +# in the argument to --library-path.  
>>
>> This comment is no longer correct. We should remove it or rewrite it.
> 
> How about:
> 
> # Start the test case debugging in two steps:
> #   1. the following command invokes gdb to run the loader;
> #   2. the commands file tells the loader to run the test case.
>>> +gdb -q \
>>> +  -x $${CMD_FILE} \
>>> +  -d $${SOURCE_DIR} \
>>> +  $${BUILD_DIR}/elf/ld.so
> 
>> Suggest:
>>
>> echo "Env vars: $$ENVVARS"
> 
> Yes, I like this, too.
> 
>> Did you test the script with --enalbe-hardcoded-path-in-tests also? ;}
> 
> I actually did (with and without it), then I ran both stdlib/tst-strfrom
> and nptl/tst-exec1, and everything seemed to work OK.  Have you noticed
> anything weird?
> 
> Should I send a v4?

Yes please, send v4, and I'll ack that.

-- 
Cheers,
Carlos.


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