aboutsummaryrefslogtreecommitdiff
path: root/external/mambo/skiboot.tcl
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-05-16 17:34:21 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-19 09:22:57 +1000
commit3f27c806ee663278d5b36c6b27fae54270da8c34 (patch)
treee5b63232d68b06296c467908779ea282655d3141 /external/mambo/skiboot.tcl
parentbb192fd55ffb20d619101c5e3e1f4fd24f844d11 (diff)
downloadskiboot-3f27c806ee663278d5b36c6b27fae54270da8c34.zip
skiboot-3f27c806ee663278d5b36c6b27fae54270da8c34.tar.gz
skiboot-3f27c806ee663278d5b36c6b27fae54270da8c34.tar.bz2
mambo: Add skiboot/linux symbol lookup
Adds the skisym and linsym commands which can be used to find the address of a Linux or Skiboot symbol. To function this requires the user to provide the SKIBOOT_MAP and VMLINUX_MAP environmental variables which indicate which skiboot.map and System.map files should be used. Examples: Look up a symbol address: systemsim % skisym .load_and_boot_kernel 0x0000000030013a08 Set a breakpoint there: systemsim % b [skisym .load_and_boot_kernel] breakpoint set at [0:0]: 0x0000000030013a08 (0x0000000030013A08) Enc:0x7D800026 : mfcr r12 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/mambo/skiboot.tcl')
-rw-r--r--external/mambo/skiboot.tcl16
1 files changed, 16 insertions, 0 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index e16a21c..1b74c9b 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -105,6 +105,22 @@ if {![info exists of::encode_compat]} {
# allows running mambo in another directory to the one skiboot.tcl is in.
if { [file exists mambo_utils.tcl] } then {
source mambo_utils.tcl
+
+ if { [info exists env(VMLINUX_MAP)] } {
+ global linux_symbol_map
+
+ set fp [open $env(VMLINUX_MAP) r]
+ set linux_symbol_map [read $fp]
+ close $fp
+ }
+
+ if { [info exists env(SKIBOOT_MAP)] } {
+ global skiboot_symbol_map
+
+ set fp [open $env(SKIBOOT_MAP) r]
+ set skiboot_symbol_map [read $fp]
+ close $fp
+ }
}
#