]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Make the Dwarf3 CFI stack unwinding machinery work on arm-linux
authorJulian Seward <jseward@acm.org>
Fri, 1 Jan 2010 18:46:41 +0000 (18:46 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 1 Jan 2010 18:46:41 +0000 (18:46 +0000)
commit6bc7295264ed200ea6532c51832cf96e9a86f13f
tree2658c86d6b50ae9cedb9363b02a869903ff214b4
parent88b497ecdf0fd3636b249c758a70a07c04f5827f
Make the Dwarf3 CFI stack unwinding machinery work on arm-linux
too.  This is a first step towards making not be completely
x86/amd64-linux specific, and so replaces some x86/amd64-specific
stuff with more general constructions:

* structure 'DiCfSI', into which the info is summarised, has been
  made target-specific (ugh), since the sets of registers to be
  unwound differ on different targets.

* enum CfiReg and the CFIC_ constants have been expanded
  accordingly, to handle both arm and x86/amd64 registers.

  The abbreviation "IA" (Intel Architecture) has been used in a
  few places where the x86 and amd64 definitions are shared.

* the CFI reader/summariser in readdwarf.c has been expanded &
  generalised appropriately.

* the DiCfSI evaluator in debuginfo.c, VG_(use_CFI_info), has
  also been generalised appropriately.

  The main change is that instead of passing around triples
  of (IP, SP, BP) values, a new structure 'D3UnwindRegs' is
  passed around instead.  This is defined differently for IA and
  ARM and succeeds in hiding at least some of the differences
  where we don't care about them.

  Note also, D3UnwindRegs duplicates, in purpose and structure,
  structure 'RegSummary' in priv_d3basics.h.  This will be tidied
  up in due course.

This commit almost certainly breaks stack unwinding on amd64-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10986
coregrind/m_debuginfo/d3basics.c
coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/priv_storage.h
coregrind/m_debuginfo/readdwarf.c
coregrind/m_debuginfo/readelf.c
coregrind/m_debuginfo/storage.c
coregrind/m_stacktrace.c
coregrind/pub_core_debuginfo.h