Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1315790

Re: [PATCH 1/5] scripts/gdb: Provide linux constants

From Kieran Bingham <kieran.bingham@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] scripts/gdb: Provide linux constants
Date 2016-01-24 01:20 +0100
Message-ID <qUgzo-54S-7@gated-at.bofh.it> (permalink)
References <qSYXT-5Aj-3@gated-at.bofh.it> <qSYXU-5Aj-31@gated-at.bofh.it> <qU7Z8-4tS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 23/01/16 15:05, Jan Kiszka wrote:
> On 2016-01-20 12:15, Kieran Bingham wrote:
>> Some macro's and defines are needed when parsing memory, and without
>> compiling the kernel as -g3 they are not available in the debug-symbols.
>>
>> We use the pre-processor here to extract constants to a dedicated module
>> for the linux debugger extensions
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org>
>> ---
>>
>> I've added a 'constants.py' which is automatically generated. This allows
>> values not available to the debugger, through #defines to be provided to
>> our scripts.
>>
>> The alternative method for this is to create a c-object file to obtain values
>> through symbols instead, and compile segments with -g3 to include macro
>> definitions in the debug-info.
>>
>> I'd appreciate your thoughts on these options.
> 
> I cannot assess your second proposal. How invasive will it be? Is it
> promising to reduce the maintenance? What will be the impact of -g3?
> 
> This approach seems pragmatic and sufficient. Would be fine with me
> unless the other has significant advantages.

At the moment, I believe the current method (generating a constants.py)
is my preferred method. It's less intrusive, and can be generated for a
kernel which is to be debugged, which perhaps didn't have GDB_SCRIPTS
enabled at the time.

A c-object file would be more limiting I believe.

Kieran

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/5] scripts/gdb: Linux awareness debug commands Kieran Bingham <kieran.bingham@linaro.org> - 2016-01-20 12:20 +0100
  [PATCH 1/5] scripts/gdb: Provide linux constants Kieran Bingham <kieran.bingham@linaro.org> - 2016-01-20 12:20 +0100
    Re: [PATCH 1/5] scripts/gdb: Provide linux constants Jan Kiszka <jan.kiszka@siemens.com> - 2016-01-23 16:10 +0100
      Re: [PATCH 1/5] scripts/gdb: Provide linux constants Kieran Bingham <kieran.bingham@linaro.org> - 2016-01-24 01:20 +0100

csiph-web