From: Hiroshi DOYU <Hiroshi_DOYU@montavista.co.jp>
To: gdb@sources.redhat.com
Subject: Where is the contents of target_fetch_registers ()
Date: Thu, 13 May 2004 09:50:00 -0000 [thread overview]
Message-ID: <20040513185017.6220543b.Hiroshi_DOYU@montavista.co.jp> (raw)
Hi all,
Now I am implementing gdb support on Linux kernel, Hitachi
SH-Mobile3 (SH73180CP01) and found that the following function
seems not to work correctly when compared with other gdb behavior
which work correctly.
# I can get this with "set debug target 1" option in gdb.
gdb a.out
GNU gdb 6.0 (MontaVista 6.0-8.0.7.0300532 2003-12-24)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sh-hardhat-linux"...
(gdb) list
2 {
3 int a, b, c;
4
5 a = b + c;
6 }
7
8 main()
9 {
10 while (1)
11 func();
(gdb) b func
Breakpoint 1 at 0x400356: file a.c, line 5.
(gdb) set debug target 1
(gdb) r
Starting program: /root/a.out
target_acknowledge_created_inferior (103)
target_reported_exec_events_per_exec_call () = 1
target_wait (-1, status) = 103, status->kind = stopped, signal = SIGTRAP
target_fetch_registers (pc) = a06b5529 0x29556ba0 693463968
target_terminal_init ()
target_terminal_inferior ()
target_terminal_inferior ()
target_resume (-1, continue, 0)
target_wait (-1, status) = 103, status->kind = stopped, signal = SIGTRAP
target_fetch_registers (pc) = a06b5529 0x29556ba0 693463968
target_post_startup_inferior (103)
target_xfer_memory (0x4104f4, xxx, 176, read, xxx) = 176, bytes = 01 00 00 00 01 00 00 00 0c 00 00 00
e0 01 40 00 0d 00 00 00 80 04 40 00 04 00 00 00
08 01 40 00 05 00 00 00 58 01 40 00 06 00 00 00
28 01 40 00 0a 00 00 00 2d 00 00 00 0b 00 00 00
10 00 00 00 15 00 00 00 00 00 00 00 03 00 00 00
b8 05 41 00 02 00 00 00 18 00 00 00 14 00 00 00
07 00 00 00 17 00 00 00 ac 01 40 00 fe ff ff 6f
8c 01 40 00 ff ff ff 6f 01 00 00 00 f0 ff ff 6f
86 01 40 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
target_xfer_memory (0x400356, xxx, 2, read, xxx) = 2, bytes = e1 51
target_xfer_memory (0x400356, xxx, 2, write, xxx) = 2, bytes = c3 c3
target_insert_breakpoint (0x400356, xxx) = 0
target_xfer_memory (0x295613b0, xxx, 2, read, xxx) = 2, bytes = e6 2f
target_xfer_memory (0x295613b0, xxx, 2, write, xxx) = 2, bytes = c3 c3
target_insert_breakpoint (0x295613b0, xxx) = 0
target_terminal_inferior ()
target_resume (-1, continue, 0)
target_wait (-1, status) = 103, status->kind = stopped, signal = SIGTRAP
target_fetch_registers (pc) = b0135629 0x295613b0 693506992
target_xfer_memory (0x400356, xxx, 2, write, xxx) = 2, bytes = e1 51
target_remove_breakpoint (0x400356, xxx) = 0
target_xfer_memory (0x295613b0, xxx, 2, write, xxx) = 2, bytes = e6 2f
target_remove_breakpoint (0x295613b0, xxx) = 0
target_terminal_ours_for_output ()
target_xfer_memory (0x4104f4, xxx, 176, read, xxx) = 176, bytes = 01 00 00 00
01 00 00 00 0c 00 00 00 e0 01 40 00 0d 00 00 00
80 04 40 00 04 00 00 00 08 01 40 00 05 00 00 00
58 01 40 00 06 00 00 00 28 01 40 00 0a 00 00 00
2d 00 00 00 0b 00 00 00 10 00 00 00 15 00 00 00
3c 94 57 29 03 00 00 00 b8 05 41 00 02 00 00 00
18 00 00 00 14 00 00 00 07 00 00 00 17 00 00 00
ac 01 40 00 fe ff ff 6f 8c 01 40 00 ff ff ff 6f
01 00 00 00 f0 ff ff 6f 86 01 40 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
target_xfer_memory (0x29579440, xxx, 4, read, xxx) = 4, bytes =
50 94 57 29
target_xfer_memory (0x29579450, xxx, 20, read, xxx) = 20, bytes = 00 00 00 00 f8 69 56 29
f4 04 41 00 18 99 57 29 00 00 00 00
target_xfer_memory (0x29579918, xxx, 20, read, xxx) = 20, bytes = 00 a0 57 29 08 99 57 29
bc 20 6a 29 b4 90 57 29 50 94 57 29
target_xfer_memory (0x29579908, xxx, 4, read, xxx) = 4, bytes = 2f 6c 69 62
target_xfer_memory (0x2957990c, xxx, 4, read, xxx) = 4, bytes = 2f 6c 69 62
target_xfer_memory (0x29579910, xxx, 4, read, xxx) = 4, bytes = 63 2e 73 6f
target_xfer_memory (0x29579914, xxx, 4, read, xxx) = 4, bytes = 2e 36 00 00
target_xfer_memory (0x295790b4, xxx, 20, read, xxx) = 20, bytes =
00 60 55 29 f4 00 40 00 d0 8e 57 29 00 00 00 00
18 99 57 29
target_xfer_memory (0x4000f4, xxx, 4, read, xxx) = 4, bytes = 2f 6c 69 62
target_xfer_memory (0x4000f8, xxx, 4, read, xxx) = 4, bytes = 2f 6c 64 2d
target_xfer_memory (0x4000fc, xxx, 4, read, xxx) = 4, bytes = 6c 69 6e 75
target_xfer_memory (0x400100, xxx, 4, read, xxx) = 4, bytes = 78 2e 73 6f
target_xfer_memory (0x400104, xxx, 4, read, xxx) = 4, bytes = 2e 32 00 00
<freeze>
I guess the following should have appeaer at this <freeze> line.
target_fetch_registers (r14) = 34f9ff7b 0x7bfff934 2080373044
I would like to look into the problem which it hang at the above
point but I dont know much about gdb. So could anyone tell me
how to find where is the contents of "target_fetch_registers ()"?
In other words, in Linux, how can gdb get the registers from
kernel?
Any comments will be appriciated.
Thanks,
-doyu
next reply other threads:[~2004-05-13 9:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-13 9:50 Hiroshi DOYU [this message]
2004-05-13 13:37 ` Daniel Jacobowitz
2004-05-14 8:47 ` Hiroshi DOYU
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=20040513185017.6220543b.Hiroshi_DOYU@montavista.co.jp \
--to=hiroshi_doyu@montavista.co.jp \
--cc=gdb@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).