16 fprint(2,
"usage: dwarfdump file\n");
34 fmtinstall(
'R', exprfmt);
35 fmtinstall(
'H', encodefmt);
39 sysfatal(
"elfopen %s: %r",
argv[1]);
41 sysfatal(
"dwarfopen: %r");
44 sysfatal(
"dwarfenumall: %r");
49 print(
"compileunit %s\n",
s.attrs.name);
65 if(
s.attrs.isexternal)
67 print(
"%c %s",
c,
s.attrs.name);
68 if(
s.attrs.have.lowpc)
69 print(
" 0x%lux-0x%lux",
s.attrs.lowpc,
s.attrs.highpc);
70 switch(
s.attrs.have.location){
72 print(
" @ %.*H",
s.attrs.location.b.len,
s.attrs.location.b.data);
75 print(
" @ 0x%lux",
s.attrs.location.c);
78 if(
s.attrs.have.ranges)
79 print(
" ranges@0x%lux",
s.attrs.ranges);
81 if(
s.attrs.have.lowpc){
83 print(
"\tcould not find source: %r\n");
85 print(
"\t%s/%s:%lud mtime=%lud length=%lud\n",
88 print(
"\t%s/%s/%s:%lud mtime=%lud length=%lud\n",
108 print(
"\tcannot unwind from pc 0x%lux: %r\n", pc);
110 print(
"\tpc=0x%lux cfa=%R ra=%R", pc, &cfa, &ra);
124 return fmtstrcpy(
fmt,
"<nil>");
128 return fmtstrcpy(
fmt,
"undef");
130 return fmtstrcpy(
fmt,
"same");
132 return fmtprint(
fmt,
"%ld(cfa)",
e->offset);
134 return fmtprint(
fmt,
"r%ld",
e->reg);
136 return fmtprint(
fmt,
"%ld(r%ld)",
e->offset,
e->reg);
138 return fmtprint(
fmt,
"l.%.*H",
e->loc.len,
e->loc.data);
140 return fmtprint(
fmt,
"?%d",
e->type);
static void print(LPPRINTDLGW pd, LPWSTR wszFileName)
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
void printrules(Dwarf *d, ulong pc)
Pe * peopen(const char *name)
int dwarfpctoline(Dwarf *, ulong, char **, char **, char **, char **, ulong *, ulong *, ulong *)
Dwarf * dwarfopen(struct _Pe *elf)
int dwarfnextsym(Dwarf *, DwarfSym *)
int dwarfenum(Dwarf *, DwarfSym *)
int dwarfunwind(Dwarf *, ulong, DwarfExpr *, DwarfExpr *, DwarfExpr *, int)