Page MenuHomeFreeBSD

D15372.id42336.diff
No OneTemporary

D15372.id42336.diff

Index: sys/ddb/db_main.c
===================================================================
--- sys/ddb/db_main.c
+++ sys/ddb/db_main.c
@@ -100,6 +100,7 @@
c_linker_sym_t lsym;
Elf_Sym *sym, *match;
unsigned long diff;
+ db_addr_t stoffs;
if (symtab->private == NULL) {
if (!linker_ddb_search_symbol((caddr_t)off, &lsym, &diff)) {
@@ -111,19 +112,20 @@
diff = ~0UL;
match = NULL;
+ stoffs = DB_STOFFS(off);
for (sym = (Elf_Sym*)symtab->start; (char*)sym < symtab->end; sym++) {
if (sym->st_name == 0 || sym->st_shndx == SHN_UNDEF)
continue;
- if (off < sym->st_value)
+ if (stoffs < sym->st_value)
continue;
if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT &&
ELF_ST_TYPE(sym->st_info) != STT_FUNC &&
ELF_ST_TYPE(sym->st_info) != STT_NOTYPE)
continue;
- if ((off - sym->st_value) > diff)
+ if ((stoffs - sym->st_value) > diff)
continue;
- if ((off - sym->st_value) < diff) {
- diff = off - sym->st_value;
+ if ((stoffs - sym->st_value) < diff) {
+ diff = stoffs - sym->st_value;
match = sym;
} else {
if (match == NULL)
Index: sys/ddb/ddb.h
===================================================================
--- sys/ddb/ddb.h
+++ sys/ddb/ddb.h
@@ -72,6 +72,10 @@
#define DB_MAXSCRIPTRECURSION 3
#endif
+#ifndef DB_STOFFS
+#define DB_STOFFS(offs) (offs)
+#endif
+
#ifndef DB_CALL
#define DB_CALL db_fncall_generic
#else
Index: sys/powerpc/include/db_machdep.h
===================================================================
--- sys/powerpc/include/db_machdep.h
+++ sys/powerpc/include/db_machdep.h
@@ -85,4 +85,8 @@
#define inst_load(ins) 0
#define inst_store(ins) 0
+#ifdef __powerpc64__
+#define DB_STOFFS(offs) ((offs) & ~DMAP_BASE_ADDRESS)
+#endif
+
#endif /* _POWERPC_DB_MACHDEP_H_ */
Index: sys/powerpc/pseries/platform_chrp.c
===================================================================
--- sys/powerpc/pseries/platform_chrp.c
+++ sys/powerpc/pseries/platform_chrp.c
@@ -146,7 +146,7 @@
/* Set up important VPA fields */
for (i = 0; i < MAXCPU; i++) {
- bzero(splpar_vpa[i], sizeof(splpar_vpa));
+ bzero(splpar_vpa[i], sizeof(splpar_vpa[i]));
/* First two: VPA size */
splpar_vpa[i][4] =
(uint8_t)((sizeof(splpar_vpa[i]) >> 8) & 0xff);

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 15, 4:40 PM (11 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29723783
Default Alt Text
D15372.id42336.diff (2 KB)

Event Timeline