
GRMON3-UM
June 2019, Version 3.1.0
29
www.cobham.com/gaisler
g0 0x0 0
g1 0x0 0
g2 0xffffffff -1
g3 0x0 0
g4 0x0 0
g5 0x0 0
g6 0x0 0
g7 0x0 0
o0 0x3 3
o1 0x43feccf0 1140772080
o2 0x43feccec 1140772076
o3 0x0 0
o4 0xf34000e4 -213909276
o5 0x4007cc00 1074252800
sp 0x43fecc88 0x43fecc88
o7 0x40004020 1073758240
l0 0x4007ce88 1074253448
l1 0x4007ce88 1074253448
l2 0x400048fc 1073760508
l3 0x43feccf0 1140772080
l4 0x3 3
l5 0x1 1
l6 0x0 0
l7 0x0 0
i0 0x0 0
i1 0x40003f94 1073758100
i2 0x0 0
i3 0x43ffafc8 1140830152
i4 0x0 0
i5 0x4007cd40 1074253120
fp 0x43fecd08 0x43fecd08
i7 0x40053380 1074082688
y 0x0 0
psr 0xf34000e0 -213909280
wim 0x0 0
tbr 0x0 0
pc 0x40004028 0x40004028 <148>
npc 0x4000402c 0x4000402c <152>
fsr 0x0 0
csr 0x0 0
NOTE: It is not supported to set thread specific breakpoints. All breakpoints are global and stops the execution
of all threads. It is not possible to change the value of registers other than those of the current thread.
3.7.7. Virtual memory
There is no way for GRMON to determine if an address sent from GDB is physical or virtual. If an MMU unit is
present in the system and it is enabled, then GRMON will assume that all addresses are virtual and try to translate
them. When debugging an application that uses the MMU one typically have an image with physical addresses
used to load data into the memory and a second image with debug-symbols of virtual addresses. It is therefore
important to make sure that the MMU is enabled/disabled when each image is used.
The example below will show a typical case on how to handle virtual and physical addresses when debugging with
GDB. The application being debugged is Linux and it consists of two different images created with Linuxbuild.
The file
image.ram
contains physical addresses and a small loader, that among others configures the MMU,
while the file
image
contains all the debug-symbols in virtual address-space.
First start GRMON and start the GDB server.
$ grmon -nb -gdb
Then start GDB in a second shell, load both files into GDB, connect to GRMON and then upload the application
into the system. The addresses will be interpreted as physical since the MMU is disabled when GRMON starts.
$ sparc-linux-gdb
GNU gdb 6.8.0.20090916-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-linux".
(gdb) file output/images/image.ram
Reading symbols from /home/user/linuxbuild-1.0.2/output/images/image.ram...(no d
ebugging symbols found)...done.
Содержание GRMON3
Страница 56: ...GRMON3 UM June 2019 Version 3 1 0 56 www cobham com gaisler...
Страница 114: ...GRMON3 UM June 2019 Version 3 1 0 114 www cobham com gaisler...
Страница 123: ...GRMON3 UM June 2019 Version 3 1 0 123 www cobham com gaisler dcache...
Страница 156: ...GRMON3 UM June 2019 Version 3 1 0 156 www cobham com gaisler SEE ALSO Section 6 13 On chip logic analyzer driver...
Страница 208: ...GRMON3 UM June 2019 Version 3 1 0 208 www cobham com gaisler SEE ALSO Section 3 5 Tcl integration...