> On May 27, 2016, 3:03 p.m., Jason Lowe-Power wrote: > > Does findSymbol now need to be updated since address can point to multiple > > symbols? Or is it OK for findSymbol to always return the first symbol?
I think the current behaviour (returning the first of the names we find) is fine in all cases that we currently use it. AFAIK, we only really need to map an address to a symbol for debugging purposes (e.g., when printing an access trace). In those cases, printing multiple symbols is probably not what we want. I considered adding a method that returns an iterator range, but I doubt we'd need that functionality. - Andreas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3485/#review8365 ----------------------------------------------------------- On May 27, 2016, 2:58 p.m., Andreas Sandberg wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3485/ > ----------------------------------------------------------- > > (Updated May 27, 2016, 2:58 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11500:a1b6bb4bac2f > --------------------------- > base: Fix multiple names to one address bug in SymbolTable > > The SymbolTable class currently assumes that at most one symbol can > point to a given address. If multiple symbols point to the same > address, only the first one gets added to the internal symbol table > since there is already a match in the address table. > > This changeset converts the address table from a map into a multimap > to be able to handle cases where an address maps to multiple > symbols. Additionally, the insert method is changed to not fail if > there is a match in the address table. > > Change-Id: I6b4f1d5560c21e49a4af33220efb2a8302961768 > Signed-off-by: Andreas Sandberg <[email protected]> > Reviewed-by: Nikos Nikoleris <[email protected]> > Reviewed-by: Andreas Hansson <[email protected]> > Reviewed-by: Gabor Dozsa <[email protected]> > > > Diffs > ----- > > src/base/loader/symtab.hh 1f04f97c014d > src/base/loader/symtab.cc 1f04f97c014d > > Diff: http://reviews.gem5.org/r/3485/diff/ > > > Testing > ------- > > > Thanks, > > Andreas Sandberg > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
