I set the breakpoint, and it is called as you expected: (gdb) bt #0 ppc_register_info (ebl=0x6000000000004120, regno=-1, name=0x0, namelen=0, prefix=0x0, setname=0x0, bits=0x0, type=0x0) at ppc_regs.c:45 #1 0x20000000000ba2c0 in ebl_register_info (ebl=0x6000000000004120, regno=-1, name=0x0, namelen=0, prefix=0x0, setname=0x0, bits=0x0, type=0x0) at eblreginfo.c:48 #2 0x20000000000a4f10 in dwfl_module_register_names (mod=0x60000000000062d0, func=@0x4000000000003170: 0x4000000000001880 <print_register>, arg=0x60000fffffffb3a0) at dwfl_module_register_names.c:53 #3 0x4000000000001bd0 in handle_cfi (stuff=0x60000fffffffb3a0, pc=268436672, which=0x4000000000002318 ".debug_frame", dwfl=0x60000000000042f0, cfi=<optimized out>) at addrcfi.c:153 #4 handle_cfi (dwfl=0x60000000000042f0, which=0x4000000000002318 ".debug_frame", cfi=0x6000000000007420, pc=268436672, stuff=0x60000fffffffb3a0) at addrcfi.c:107 #5 0x4000000000001f50 in handle_address (pc=268436672, dwfl=0x60000000000042f0) at addrcfi.c:167 #6 0x40000000000010b0 in main (argc=4, argv=0x60000fffffffb678) at addrcfi.c:216
Also in addrcfi.c, the `bits` and `type` fields are marked with __attribute__((unused)), so it may not be so crazy: static int print_register (void *arg, int regno, const char *setname, const char *prefix, const char *regname, int bits __attribute__ ((unused)), int type __attribute__ ((unused))) { On Wed, Oct 2, 2013 at 1:34 PM, Kurt Roeckx <k...@roeckx.be> wrote: > On Wed, Oct 02, 2013 at 01:12:44PM -0500, Patrick Baggett wrote: > > OK, here's what I get when I run that test in GDB: > > > > Program received signal SIGSEGV, Segmentation fault. > > dwarf_frame_register (fs=0x600000000000be00, regno=<optimized out>, > > ops_mem=0x60000fffffffb2d0, ops=0x60000fffffffb2c8, > > nops=0x60000fffffffb2c0) at dwarf_frame_register.c:105 > > 105 get_uleb128 (block.length, p); > > (gdb) bt > > #0 dwarf_frame_register (fs=0x600000000000be00, regno=<optimized out>, > > ops_mem=0x60000fffffffb2d0, ops=0x60000fffffffb2c8, > > nops=0x60000fffffffb2c0) at dwarf_frame_register.c:105 > > #1 0x4000000000001900 in print_register (arg=<optimized out>, regno=1, > > setname=0x20000000004c9b18 "integer", prefix=0x20000000004c8890 "", > > regname=0x60000fffffffb328 "r1", bits=-19768, type=675872) at > > addrcfi.c:100 > > This bits=-19768 clearly looks wrong. I would guess that should > say 32. > > The type really should also be DW_ATE_signed (5). > > Can you set a breakpoint in ppc_register_info? > dwfl_module_register_names should be calling that > hook. > > > Kurt > >