patch-2.3.43 linux/arch/ppc/xmon/xmon.c
Next file: linux/arch/sh/mm/init.c
Previous file: linux/arch/ppc/xmon/start.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Wed Feb 9 19:43:47 2000
- Orig file:
v2.3.42/linux/arch/ppc/xmon/xmon.c
- Orig date:
Fri Jan 21 18:19:16 2000
diff -u --recursive --new-file v2.3.42/linux/arch/ppc/xmon/xmon.c linux/arch/ppc/xmon/xmon.c
@@ -1344,3 +1344,31 @@
{
lineptr = str;
}
+
+char last[64];
+char *
+lookup_addr(unsigned long addr)
+{
+ extern char *sysmap;
+ extern unsigned long sysmap_size;
+ char *c = sysmap;
+ unsigned long cmp;
+
+ if ( !sysmap || !sysmap_size )
+ return NULL;
+
+ /* adjust if addr is relative to kernelbase */
+ if ( addr < PAGE_OFFSET )
+ addr += PAGE_OFFSET;
+
+ cmp = simple_strtoul(c, &c, 8);
+ strcpy( last, strsep( &c, "\n"));
+ while ( c < (sysmap+sysmap_size) )
+ {
+ cmp = simple_strtoul(c, &c, 8);
+ if ( cmp < addr )
+ break;
+ strcpy( last, strsep( &c, "\n"));
+ }
+ return last;
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)