91 for(
i=0;
i<
s.nstack;
i++)
113 if(
d->frame.data ==
nil){
114 werrstr(
"no frame debugging information");
119 b.ep =
b.p +
d->frame.len;
120 b.addrsize =
d->addrsize;
125 if((
i = (
b.p -
d->frame.data) %
b.addrsize))
126 b.p +=
b.addrsize -
i;
129 werrstr(
"bad length in cie/fde header");
134 if(
id == 0xFFFFFFFF){
137 if(vers != 1 && vers != 2 && vers != 3){
139 werrstr(
"unknown cie version %d (wanted 1-3)", vers);
145 werrstr(
"unknown augmentation: %s", aug);
151 if(
s->rareg >
s->nr){
152 werrstr(
"return address is register %d but only have %d registers",
170 werrstr(
"cannot find call frame information for pc 0x%lx", pc);
178 if(r < 0 || r >=
s->nr){
179 werrstr(
"bad register number 0x%lx",
r);
201 werrstr(
"ran out of instructions during cfa program");
211 s->loc +=
arg1 *
s->iquantum;
301 void *newstack =
malloc(
s->nstack*
sizeof(
s->stack[0]));
314 s->stack[
s->nstack++] =
e;
321 werrstr(
"restore state underflow");
324 e =
s->stack[
s->nstack-1];
339 s->cfa->offset =
arg2;
346 werrstr(
"change CFA register but CFA not in register+offset form");
359 werrstr(
"change CFA offset but CFA not in register+offset form");
362 s->cfa->offset =
arg1;
397 werrstr(
"unknown opcode 0x%x in cfa program",
c);
430 for (
i = 0;
i <
sizeof(
r) /
sizeof(
r[0]);
i++) {
436 int res =
dwarfunwind(
d, pc, cfa, &ra, initr,
sizeof(initr) /
sizeof(initr[0]));
437 if (
res == -1)
return -1;
444 for (
i = 0;
i <
nr;
i++) {
447 werrstr(
"Undefined register slot %d",
i);
470 r[
i].offset + cfaLocation,
476 werrstr(
"We don't yet support cfa rule %d in slot %d",
r[
i].
type,
i);
483 for (
i = 0;
i <
sizeof(cfaSpace) /
sizeof(cfaSpace[0]);
i++) {
485 (
d->pe->fd, &cfaSpace[
i], cfaLocation + (
i * 4),
d->addrsize);
487 werrstr(
"CFA(%x) [%08x, %08x, %08x, %08x]",
488 cfaLocation, cfaSpace[0], cfaSpace[1], cfaSpace[2], cfaSpace[3]);
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLboolean GLboolean GLboolean b
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
#define memmove(s1, s2, n)
static unsigned __int64 next
static int findfde(Dwarf *, ulong, State *, DwarfBuf *)
static int checkreg(State *s, long r)
int dwarfunwind(Dwarf *d, ulong pc, DwarfExpr *cfa, DwarfExpr *ra, DwarfExpr *r, int nr)
static int dexec(DwarfBuf *, State *, int)
int dwarfcomputecfa(Dwarf *d, DwarfExpr *cfa, PROSSYM_REGISTERS registers, ulong *cfaLocation)
int dwarfregunwind(Dwarf *d, ulong pc, ulong fde, DwarfExpr *cfa, PROSSYM_REGISTERS registers)
ulong dwarfget128(DwarfBuf *)
ulong dwarfget2(DwarfBuf *)
char * dwarfgetstring(DwarfBuf *)
ulong dwarfget1(DwarfBuf *)
long dwarfget128s(DwarfBuf *)
ulong dwarfgetaddr(DwarfBuf *)
uchar * dwarfgetnref(DwarfBuf *, ulong)
ulong dwarfget4(DwarfBuf *)
ROSSYM_CALLBACKS RosSymCallbacks
BOOLEAN(* MemGetProc)(PVOID FileContext, ULONG_PTR *Target, PVOID SourceMem, ULONG Size)
#define RtlMoveMemory(Destination, Source, Length)
#define success(from, fromstr, to, tostr)