diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/cprintf_formats.hh | 3 | ||||
-rw-r--r-- | base/loader/elf_object.cc | 10 | ||||
-rw-r--r-- | base/remote_gdb.cc | 12 |
3 files changed, 11 insertions, 14 deletions
diff --git a/base/cprintf_formats.hh b/base/cprintf_formats.hh index d8a8a552b..120dd94b1 100644 --- a/base/cprintf_formats.hh +++ b/base/cprintf_formats.hh @@ -279,8 +279,6 @@ template <typename T> inline void format_integer(std::ostream &out, const T &data, Format &fmt) { _format_integer(out, data, fmt); } - -#if 0 inline void format_integer(std::ostream &out, char data, Format &fmt) { _format_integer(out, data, fmt); } @@ -290,6 +288,7 @@ format_integer(std::ostream &out, unsigned char data, Format &fmt) inline void format_integer(std::ostream &out, signed char data, Format &fmt) { _format_integer(out, data, fmt); } +#if 0 inline void format_integer(std::ostream &out, short data, Format &fmt) { _format_integer(out, data, fmt); } diff --git a/base/loader/elf_object.cc b/base/loader/elf_object.cc index f2a67f22e..98e3198a6 100644 --- a/base/loader/elf_object.cc +++ b/base/loader/elf_object.cc @@ -190,7 +190,7 @@ bool ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding) { Elf *elf; - int secidx = 1; // there is a 0 but it is nothing, go figure + int sec_idx = 1; // there is a 0 but it is nothing, go figure Elf_Scn *section; GElf_Shdr shdr; Elf_Data *data; @@ -210,7 +210,7 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding) assert(elf != NULL); // Get the first section - section = elf_getscn(elf, secidx); + section = elf_getscn(elf, sec_idx); // While there are no more sections while (section != NULL) { @@ -225,14 +225,14 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding) // loop through all the symbols, only loading global ones for (ii = 0; ii < count; ++ii) { gelf_getsym(data, ii, &sym); - if (GELF_ST_BIND(sym.st_info) & binding) { + if (GELF_ST_BIND(sym.st_info) == binding) { symtab->insert(sym.st_value, elf_strptr(elf, shdr.sh_link, sym.st_name)); } } } - ++secidx; - section = elf_getscn(elf, secidx); + ++sec_idx; + section = elf_getscn(elf, sec_idx); } elf_end(elf); diff --git a/base/remote_gdb.cc b/base/remote_gdb.cc index e20800d12..7b73d60e9 100644 --- a/base/remote_gdb.cc +++ b/base/remote_gdb.cc @@ -332,23 +332,21 @@ RemoteGDB::acc(Addr va, size_t len) last_va = alpha_round_page(va + len); do { - if (va < ALPHA_K0SEG_BASE) { - DPRINTF(GDBAcc, "acc: Mapping is invalid %#x < K0SEG\n", va); - return false; - } - - if (va < ALPHA_K1SEG_BASE) { + if (va >= ALPHA_K0SEG_BASE && va < ALPHA_K1SEG_BASE) { if (va < (ALPHA_K0SEG_BASE + pmem->size())) { DPRINTF(GDBAcc, "acc: Mapping is valid K0SEG <= " "%#x < K0SEG + size\n", va); return true; } else { - DPRINTF(GDBAcc, "acc: Mapping is invalid %#x < K0SEG\n", + DPRINTF(GDBAcc, "acc: Mapping invalid %#x > K0SEG + size\n", va); return false; } } + if (PC_PAL(va) || va < 0x10000) + return true; + Addr ptbr = context->regs.ipr[AlphaISA::IPR_PALtemp20]; pte = kernel_pte_lookup(pmem, ptbr, va); if (!pte || !entry_valid(pmem->phys_read_qword(pte))) { |