From 5d919e412090951ae0139dc8b7f1223fba5ada79 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 31 May 2017 13:04:51 +1000 Subject: 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 Tested-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- external/mambo/mambo_utils.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'external/mambo') diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl index 837ae9b..1e3dea0 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] { -- cgit v1.1