Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645962

Re: [PATCH 7/7] DWARF: add the config option

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 7/7] DWARF: add the config option
Date 2017-05-19 23:40 +0200
Message-ID <tIXMR-86v-1@gated-at.bofh.it> (permalink)
References (2 earlier) <tDRyp-6eu-7@gated-at.bofh.it> <tECdY-30b-3@gated-at.bofh.it> <tIXa9-7Bx-7@gated-at.bofh.it> <tIXjP-7UF-13@gated-at.bofh.it> <tIXDb-823-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, May 19, 2017 at 04:29:13PM -0500, Josh Poimboeuf wrote:
> > How are you handling control flow?
> 
> Control flow of what?
> 
> > > Here's the struct in its current state:
> > > 
> > > 	#define UNDWARF_REG_UNDEFINED		0
> > > 	#define UNDWARF_REG_CFA			1
> > > 	#define UNDWARF_REG_SP			2
> > > 	#define UNDWARF_REG_FP			3
> > > 	#define UNDWARF_REG_SP_INDIRECT		4
> > > 	#define UNDWARF_REG_FP_INDIRECT		5
> > > 	#define UNDWARF_REG_R10			6
> > > 	#define UNDWARF_REG_DI			7
> > > 	#define UNDWARF_REG_DX			8
> > > 
> > 
> > Why only those registers?  Also, if you have the option I would really
> > suggest using the actual x86 register numbers (ax, ex, dx, bx, sp, bp,
> > si, di, r8-r15 in that order.)
> 
> Those are the only registers which are ever needed as the base for
> finding the previous stack frame.  99% of the time it's sp or bp, the
> other registers are needed for aligned stacks and entry code.
> 
> Using the actual register numbers isn't an option because I don't need
> them all and they need to fit in a small number of bits.
> 
> This construct might be useful for other arches, which is why I called
> it "FP" instead of "BP".  But then I ruined that with the last 3 :-)

BTW, here's the link to the unwinder code if you're interested:

  https://github.com/jpoimboe/linux/blob/undwarf/arch/x86/kernel/unwind_undwarf.c

-- 
Josh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 7/7] DWARF: add the config option Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-19 23:00 +0200
  Re: [PATCH 7/7] DWARF: add the config option "H. Peter Anvin" <hpa@zytor.com> - 2017-05-19 23:10 +0200
    Re: [PATCH 7/7] DWARF: add the config option Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-19 23:30 +0200
      Re: [PATCH 7/7] DWARF: add the config option Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-19 23:40 +0200
        Re: [PATCH 7/7] DWARF: add the config option Andy Lutomirski <luto@kernel.org> - 2017-05-20 07:30 +0200
          Re: [PATCH 7/7] DWARF: add the config option Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-20 18:30 +0200
            Re: [PATCH 7/7] DWARF: add the config option Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-20 19:20 +0200
            Re: [PATCH 7/7] DWARF: add the config option "H.J. Lu" <hjl.tools@gmail.com> - 2017-05-20 22:10 +0200
              Re: [PATCH 7/7] DWARF: add the config option Andy Lutomirski <luto@kernel.org> - 2017-05-21 00:00 +0200
                Re: [PATCH 7/7] DWARF: add the config option "H.J. Lu" <hjl.tools@gmail.com> - 2017-05-21 00:30 +0200
                Re: [PATCH 7/7] DWARF: add the config option Jiri Kosina <jikos@kernel.org> - 2017-05-22 13:40 +0200
                Re: [PATCH 7/7] DWARF: add the config option "H.J. Lu" <hjl.tools@gmail.com> - 2017-05-22 16:50 +0200
              Re: [PATCH 7/7] DWARF: add the config option "H. Peter Anvin" <hpa@zytor.com> - 2017-05-22 23:20 +0200
                Re: [PATCH 7/7] DWARF: add the config option "H. Peter Anvin" <hpa@zytor.com> - 2017-05-22 23:50 +0200
                Re: [PATCH 7/7] DWARF: add the config option Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-23 00:20 +0200
          Re: [PATCH 7/7] DWARF: add the config option Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-20 22:20 +0200
            Re: [PATCH 7/7] DWARF: add the config option Andy Lutomirski <luto@kernel.org> - 2017-05-21 00:00 +0200
              Re: [PATCH 7/7] DWARF: add the config option Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-21 01:10 +0200
                Re: [PATCH 7/7] DWARF: add the config option Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-21 01:30 +0200
      Re: [PATCH 7/7] DWARF: add the config option Ingo Molnar <mingo@kernel.org> - 2017-05-22 13:20 +0200
        Re: [PATCH 7/7] DWARF: add the config option "H. Peter Anvin" <hpa@zytor.com> - 2017-05-22 23:30 +0200
          Re: [PATCH 7/7] DWARF: add the config option Jiri Kosina <jikos@kernel.org> - 2017-05-23 01:30 +0200
          Re: [PATCH 7/7] DWARF: add the config option Ingo Molnar <mingo@kernel.org> - 2017-05-23 07:50 +0200
  Re: [PATCH 7/7] DWARF: add the config option "H. Peter Anvin" <hpa@zytor.com> - 2017-05-19 23:10 +0200

csiph-web