From: Alex Bennee <kernel-hacker@bennee.com>
To: Andreas Schwab <schwab@suse.de>
Cc: gdb@sources.redhat.com
Subject: Re: Why can't I use "info line *address" in canned scripts?
Date: Thu, 30 Jan 2003 17:42:00 -0000 [thread overview]
Message-ID: <1043948314.5288.23.camel@cambridge.braddahead> (raw)
In-Reply-To: <je3cnasgbo.fsf@sykes.suse.de>
On Thu, 2003-01-30 at 17:22, Andreas Schwab wrote:
> Alex Bennee <kernel-hacker@bennee.com> writes:
>
> |> But manually doing the info line works.
> |>
> |> (gdb) info line *0x880157e8
> |> Line 524 of "printk.c" starts at address 0x880157e4
> |> <release_console_sem+100> and ends at 0x88015800
> |> <release_console_sem+128>.
> |>
> |> Any ideas? Have I missed something obvious or triggered a bug?
>
> What do you get when you type "info line *(0x880157e8)"?
No problems from the command line, its in the canned scripts is causes
the problem.
(gdb) info line *0x8801b151
Line 89 of "softirq.c" starts at address 0x8801b14c <do_softirq+108> and
ends at 0x8801b156 <do_softirq+118>.
(gdb) info line *(0x8801b151)
Line 89 of "softirq.c" starts at address 0x8801b14c <do_softirq+108> and
ends at 0x8801b156 <do_softirq+118>.
(gdb) define sym
>info line *($arg0)
>end
(gdb) pmst $1
Doing stack strace from:881d5f2c to 881d632c
Text Segment assumed to go from:88001000 to 881c6c68
0x8801b15a:No line number information available for address 0x8801b15a
<snip>
I originally thought it might be something to do with evaluation order
but the error message generated by "info line" does seem to indicate its
got the right address.
If fact experimenting further sym can be called from the command line in
many ways and still work:
(gdb) sym 0x8801b151
Line 89 of "softirq.c" starts at address 0x8801b14c <do_softirq+108> and
ends at 0x8801b156 <do_softirq+118>.
(gdb) sym (0x8801b151)
Line 89 of "softirq.c" starts at address 0x8801b14c <do_softirq+108> and
ends at 0x8801b156 <do_softirq+118>.
(gdb) set $addr=0x8801b151
(gdb) sym $addr
Line 89 of "softirq.c" starts at address 0x8801b14c <do_softirq+108> and
ends at 0x8801b156 <do_softirq+118>.
(gdb) sym ($addr)
Line 89 of "softirq.c" starts at address 0x8801b14c <do_softirq+108> and
ends at 0x8801b156 <do_softirq+118>.
But call it from within the script and it fails. I think I must be going
mad :-(
--
Alex, homepage: http://www.bennee.com/~alex/
All things that are, are with more spirit chased than enjoyed.
-- Shakespeare, "Merchant of Venice"
prev parent reply other threads:[~2003-01-30 17:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-30 15:50 Alex Bennee
2003-01-30 17:22 ` Andreas Schwab
2003-01-30 17:42 ` Alex Bennee [this message]
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=1043948314.5288.23.camel@cambridge.braddahead \
--to=kernel-hacker@bennee.com \
--cc=gdb@sources.redhat.com \
--cc=schwab@suse.de \
/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