Author: tkreuzer Date: Thu Jan 20 15:39:55 2011 New Revision: 50450
URL: http://svn.reactos.org/svn/reactos?rev=50450&view=rev Log: [ROSSYM] The function dexec uses the varable p only in one location where its checked against nil, It neither initialized, not used anywhere else. This is probably a typo and b->p was meant. Yes I'm completely guessing, but this code doesn't give any other chance then guessing and it will probably not be worse then using an uninitialized variable... @original author: please review.
Modified: branches/cmake-bringup/lib/rossym/dwarfcfa.c
Modified: branches/cmake-bringup/lib/rossym/dwarfcfa.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfcf... ============================================================================== --- branches/cmake-bringup/lib/rossym/dwarfcfa.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/dwarfcfa.c [iso-8859-1] Thu Jan 20 15:39:55 2011 @@ -1,11 +1,11 @@ /* * Dwarf call frame unwinding. * - * The call frame unwinding values are encoded using a state machine - * like the pc<->line mapping, but it's a different machine. - * The expressions to generate the old values are similar in function to the + * The call frame unwinding values are encoded using a state machine + * like the pc<->line mapping, but it's a different machine. + * The expressions to generate the old values are similar in function to the * ``dwarf expressions'' used for locations in the code, but of course not - * the same encoding. + * the same encoding. */
#define NTOSAPI @@ -103,7 +103,7 @@ /* * XXX This turns out to be much more expensive than the actual * running of the machine in dexec. It probably makes sense to - * cache the last 10 or so fde's we've found, since stack traces + * cache the last 10 or so fde's we've found, since stack traces * will keep asking for the same info over and over. */ static int @@ -173,7 +173,7 @@ } werrstr("cannot find call frame information for pc 0x%lux", pc); return -1; - + }
static int @@ -191,7 +191,7 @@ { int c; long arg1, arg2; - DwarfExpr *e, **p; + DwarfExpr *e;
for(;;){ if(b->p == b->ep){ @@ -215,7 +215,7 @@ if(locstop) return 0; continue; - + case 2: /* offset rule */ arg1 = c&0x3F; arg2 = dwarfget128(b); @@ -310,7 +310,7 @@ free(e); return -1; } - if(p == nil){ + if(b->p == nil){ free(e); return -1; } @@ -342,12 +342,12 @@ s->cfa->offset = arg2; continue;
- case 0x0D: /* def cfa register */ + case 0x0D: /* def cfa register */ arg1 = dwarfget128(b); if(trace) werrstr("cfa reg r%ld\n", arg1); if(s->cfa->type != RuleRegOff){ werrstr("change CFA register but CFA not in register+offset form"); - return -1; + return -1; } if(checkreg(s, arg1) < 0) return -1; @@ -401,7 +401,7 @@ return -1; } } - /* not reached */ + /* not reached */ }