Hello, patch attached. Please consider to add the changes mainline. But please also check back all changes. Some comments: gdb/dwarf2-frame.c: - I think the buf += overwrites the ++, at least my tests with some test codes showed that. tools.c: - this is really strange, if index = 0, then the assignment doesn't make sense. If it's random, it also doesn't make sense. :) Didn't have time to dig into the whole logic of this hashtable. Regards, Bernhard
Index: crash-4.0-3.17/gdb-6.1.patch =================================================================== --- crash-4.0-3.17.orig/gdb-6.1.patch +++ crash-4.0-3.17/gdb-6.1.patch @@ -18,4 +18,15 @@ +#include <string.h> int ppc_trace[nr_trace_options]; + +--- gdb-6.1.orig/gdb/dwarf2-frame.c ++++ gdb-6.1/gdb/dwarf2-frame.c +@@ -1353,7 +1353,7 @@ decode_frame_entry_1 (struct comp_unit * + else if (*augmentation == 'P') + { + /* Skip. */ +- buf += size_of_encoded_value (*buf++); ++ buf += size_of_encoded_value (*buf); + augmentation++; + } Index: crash-4.0-3.17/lkcd_common.c =================================================================== --- crash-4.0-3.17.orig/lkcd_common.c +++ crash-4.0-3.17/lkcd_common.c @@ -791,7 +791,7 @@ get_offset(uint64_t paddr) int lkcd_lseek(physaddr_t paddr) { - long i; + long i = 0; int err; int eof; void *dp; @@ -836,7 +836,7 @@ lkcd_lseek(physaddr_t paddr) lseek(lkcd->fd, lkcd->page_offset_max, SEEK_SET); eof = FALSE; while (!eof) { - if( (i%2048) == 0) { + if( (i++%2048) == 0) { lkcd_speedo(); } Index: crash-4.0-3.17/symbols.c =================================================================== --- crash-4.0-3.17.orig/symbols.c +++ crash-4.0-3.17/symbols.c @@ -7804,7 +7804,7 @@ find_mod_etext(struct load_module *lm) ulong start, end; char *modbuf; ulong maxchunk, alloc; - long offset; + long offset = 0; start = roundup(lm->mod_size_of_struct, sizeof(long)) + lm->mod_base; end = lm->mod_base + lm->mod_size; Index: crash-4.0-3.17/task.c =================================================================== --- crash-4.0-3.17.orig/task.c +++ crash-4.0-3.17/task.c @@ -4926,7 +4926,7 @@ print_task_header(FILE *out, struct task void dump_task_table(int verbose) { - int i, nr_cpus; + int i, nr_cpus = 1; struct task_context *tc; char buf[BUFSIZE]; int others, wrap, flen; Index: crash-4.0-3.17/tools.c =================================================================== --- crash-4.0-3.17.orig/tools.c +++ crash-4.0-3.17/tools.c @@ -2368,7 +2368,7 @@ int eval_common(char *s, int flags, int *errptr, struct number_option *np) { char *p1, *p2; - char *op, opcode; + char *op, opcode = 0; ulong value1; ulong value2; ulonglong ll_value1; @@ -3672,7 +3672,7 @@ hq_entry_exists(ulong value) struct hash_table *ht; struct hq_entry *list_entry; long hqi; - long index; + long index = 0; if (!(pc->flags & HASH)) return FALSE;
Attachment:
pgpwzKtvs1DwZ.pgp
Description: PGP signature
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility