42{
43 char *cdir;
46 int i,
first, firstline,
op,
a,
l, quantum, isstmt, linebase, linerange, opcodebase, nf;
52
55
57 if (runit < 0)
58 return -1;
60 if (rtag < 0)
61 return -1;
62
64 werrstr(
"no line mapping information for 0x%x", pc);
65 return -1;
66 }
68 if(off >=
d->line.len){
70 goto bad;
71 }
72
74
77 b.p =
d->line.data + off;
78 b.ep =
b.p +
d->line.len;
80
84 goto bad;
85 }
86
89 if(vers != 2){
90 werrstr(
"bad dwarf version 0x%x", vers);
91 return -1;
92 }
93
97 goto bad;
98 }
100
106
111 goto bad;
112 }
113
114
119
121 while(
b.p!=
nil && *
b.p!=0){
126 }
128
129
132 goto bad;
133 }
135
142
145 nf = 0;
147 if(
trace)
werrstr(
"program @ %lu ... %.*H opbase = %d",
b.p -
d->line.data,
b.ep-
b.p,
b.p, opcodebase);
150 firstline = 0;
153 if(
op >= opcodebase){
154 a = (
op - opcodebase) / linerange;
155 l = (
op - opcodebase) % linerange + linebase;
157 cur.addr +=
a * quantum;
159 emit:
162 werrstr(
"found wrong line mapping 0x%x for pc 0x%x",
cur.addr, pc);
163
164
165
166
167 firstline = 1;
168 }
171 }
172 if(
cur.addr > pc && !firstline)
173 break;
175 werrstr(
"buffer underflow in line mapping");
177 }
180 werrstr(
"found wrong line mapping 0x%x-0x%x for pc 0x%x",
start,
cur.addr, pc);
182 }
184 }else{
186 case 0:
191 goto bad;
193 case 1:
196 goto emit;
197 case 2:
200 break;
201 case 3:
202 newf =
malloc(nf+1*
sizeof(
f[0]));
203 if (newf)
215 break;
216 }
218 goto bad;
220 break;
221 case 1:
223 goto emit;
224 case 2:
227 cur.addr +=
a * quantum;
228 break;
229 case 3:
233 break;
234 case 4:
237 break;
238 case 5:
241 break;
242 case 6:
245 break;
246 case 7:
249 break;
250 case 8:
251 a = (255 - opcodebase) / linerange * quantum;
254 break;
255 case 9:
259 break;
260 case 10:
263 break;
264 case 11:
267 break;
268 case 12:
271 break;
272 default:
274 for(
i=0;
i<opcount[
op];
i++)
276 break;
277 }
278 }
279 }
281 goto bad;
282
283
284
286 werrstr(
"invalid file index in mapping data");
288 }
291
292
299 }
301 werrstr(
"problem parsing file data second time (cannot happen)");
302 goto bad;
303 }
306 werrstr(
"bad file index in mapping data");
307 goto bad;
308 }
310 }
316
317
319
320 char *dwarfdir;
323 for (
x = 1;
b.p && *
b.p;
x++) {
326 }
327
328 if (!cdir && dwarfdir)
329 cdir = dwarfdir;
330
336
338 lastline = 0;
339
341 if (runit == 0) {
344 if (renum < 0)
345 return -1;
347 while (renum == 0) {
349 proc->attrs.have.name)
350 {
351 if (
proc->attrs.lowpc <= pc &&
proc->attrs.highpc > pc) {
354 goto done;
355 }
356 }
358 }
359 }
360
361
363 if (runit == 0) {
366 if (renum < 0)
367 return -1;
369 while (renum == 0) {
371 proc->attrs.have.name &&
373 {
374 if (
proc->attrs.declline <= *
line &&
375 proc->attrs.declline > lastline) {
379 goto done;
380 }
381 lastline =
proc->attrs.declline;
382 }
384 }
385 }
386
387
388done:
390 return 0;
391bad:
392 werrstr(
"corrupted line mapping for 0x%x", pc);
395 return -1;
396}
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
GLint GLint GLint GLint GLint x
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
png_const_structrp png_const_inforp int * unit
ulong dwarfget128(DwarfBuf *)
ulong dwarfget2(DwarfBuf *)
int dwarfenumunit(Dwarf *, ulong, DwarfSym *)
int dwarflookuptag(Dwarf *, ulong, ulong, DwarfSym *)
char * dwarfgetstring(DwarfBuf *)
ulong dwarfget1(DwarfBuf *)
long dwarfget128s(DwarfBuf *)
int dwarfnextsym(Dwarf *, DwarfSym *)
ulong dwarfgetaddr(DwarfBuf *)
uchar * dwarfgetnref(DwarfBuf *, ulong)
int dwarfaddrtounit(Dwarf *, ulong, ulong *)
int dwarfnextsymat(Dwarf *, DwarfSym *, int)
ulong dwarfget4(DwarfBuf *)
struct DwarfAttrs::@4962 have
#define RtlMoveMemory(Destination, Source, Length)