From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: arch/arm/kernel/setup.c does not compile at -O0
Date: Thu, 30 Jul 2015 15:58:53 +0200 [thread overview]
Message-ID: <55BA2D9D.1070402@free.fr> (raw)
In-Reply-To: <55BA2335.706@arm.com>
On 30/07/2015 15:14, Robin Murphy wrote:
> On 30/07/15 13:53, Mason wrote:
>
>> Any idea how I can get DS-5 to properly handle local variables?
>
> I carry a patch locally reverting 2062afb4f804 - at least on arm64, the
> debugger manages to resolve optimised locals considerably better without
> the -fno-var-tracking-assignments option. The Kconfig "Generate dwarf4
> debug info" option is a good idea, and "Generate readable assembly code"
> sometimes helps a bit too.
I reverted 2062afb4f804 (I'm using 4.9.3 so I think it's safe)
AFAICT, config DEBUG_INFO_DWARF4 isn't available in 3.14
(I think bfaf2dd3509b was included in 3.16)
But the problem seems to be on a higher level. My debugger
just doesn't see ANY local variable whatsoever.
For example, if I break in serial8250_probe, step past the
initializations, then the Eclipse "Variables" tab states
Locals: 0 variables (as it does everywhere, mind you).
If I try to print from the "Commands" tab:
print p
ERROR(EXP8): Could not find the symbol "p"
print irqflag
ERROR(EXP8): Could not find the symbol "irqflag"
I'm doing wrong something fundamental.
This is my work flow:
Start the system, interrupt it in Uboot
Connect the DS-5 probe
Set a HW breakpoint at the address of start_kernel
Let Uboot load the kernel
When the breakpoint is hit, load the symbols with:
add-symbol-file /opt/linux-3.14/vmlinux
=> Is vmlinux supposed to contain the debug info for the
local variables? (I mean 'automatic' variables, in the
C sense.)
> Whilst in general -O0 isn't going to work, I've had some success using
> "__attribute__ ((optimize(0)))" on individual functions of interest.
This will work at the function granularity?
Regards.
next prev parent reply other threads:[~2015-07-30 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 12:53 arch/arm/kernel/setup.c does not compile at -O0 Mason
2015-07-30 13:14 ` Robin Murphy
2015-07-30 13:58 ` Mason [this message]
2015-07-30 14:54 ` Mason
2015-07-30 16:09 ` Mason
2015-07-31 8:28 ` Mason
2015-07-30 13:29 ` Russell King - ARM Linux
2015-07-30 15:23 ` Suman Tripathi
2015-07-30 15:50 ` Russell King - ARM Linux
2015-07-30 16:13 ` Suman Tripathi
2015-08-20 9:07 ` Suman Tripathi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BA2D9D.1070402@free.fr \
--to=slash.tmp@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).