summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-05-31 13:04:51 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-06 20:49:05 +1000
commit5d919e412090951ae0139dc8b7f1223fba5ada79 (patch)
treefa0cae6ef6fa666c52bf355cc5fad30e8f8f4ba3 /external
parent2163407ccceabf859959f3b641f6a169d5229807 (diff)
downloadblackbird-skiboot-5d919e412090951ae0139dc8b7f1223fba5ada79.tar.gz
blackbird-skiboot-5d919e412090951ae0139dc8b7f1223fba5ada79.zip
mambo: Match whole string when looking up symbols with linsym/skisym
linsym/skisym use a regex to match the symbol name, and accepts a partial match against the entry in the symbol map, which can lead to somewhat confusing results, eg: systemsim % linsym early_setup 0xc000000000027890 systemsim % linsym early_setup$ 0xc000000000aa8054 systemsim % linsym early_setup_secondary 0xc000000000027890 I don't think that's the behaviour we want, so append a $ to the name so that the symbol has to match against the whole entry, eg: systemsim % linsym early_setup 0xc000000000aa8054 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Tested-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/mambo/mambo_utils.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
index 837ae9b0..1e3dea0e 100644
--- a/external/mambo/mambo_utils.tcl
+++ b/external/mambo/mambo_utils.tcl
@@ -336,7 +336,7 @@ proc linsym { name } {
# create a regexp that matches the symbol name
set base {([[:xdigit:]]*) (.)}
- set exp [concat $base " $name"]
+ set exp [concat $base " $name\$"]
set ret ""
foreach {line addr type} [regexp -line -inline $exp $linux_symbol_map] {
@@ -352,7 +352,7 @@ proc skisym { name } {
global mconf
set base {([[:xdigit:]]*) (.)}
- set exp [concat $base " $name"]
+ set exp [concat $base " $name\$"]
set ret ""
foreach {line addr type} [regexp -line -inline $exp $skiboot_symbol_map] {
OpenPOWER on IntegriCloud