addr2line.c (292120) | addr2line.c (295577) |
---|---|
1/*- 2 * Copyright (c) 2009 Kai Wang 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 26 unchanged lines hidden (view full) --- 35#include <libgen.h> 36#include <stdio.h> 37#include <stdlib.h> 38#include <string.h> 39 40#include "uthash.h" 41#include "_elftc.h" 42 | 1/*- 2 * Copyright (c) 2009 Kai Wang 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 26 unchanged lines hidden (view full) --- 35#include <libgen.h> 36#include <stdio.h> 37#include <stdlib.h> 38#include <string.h> 39 40#include "uthash.h" 41#include "_elftc.h" 42 |
43ELFTC_VCSID("$Id: addr2line.c 3264 2015-11-30 05:38:14Z kaiwang27 $"); | 43ELFTC_VCSID("$Id: addr2line.c 3273 2015-12-11 21:38:57Z kaiwang27 $"); |
44 45struct Func { 46 char *name; 47 Dwarf_Unsigned lopc; 48 Dwarf_Unsigned hipc; 49 Dwarf_Unsigned call_file; 50 Dwarf_Unsigned call_line; 51 Dwarf_Ranges *ranges; --- 311 unchanged lines hidden (view full) --- 363 printf("%s\n", demangled); 364 } else { 365 if (pretty_print) 366 printf("%s at ", f->name); 367 else 368 printf("%s\n", f->name); 369 } 370 } | 44 45struct Func { 46 char *name; 47 Dwarf_Unsigned lopc; 48 Dwarf_Unsigned hipc; 49 Dwarf_Unsigned call_file; 50 Dwarf_Unsigned call_line; 51 Dwarf_Ranges *ranges; --- 311 unchanged lines hidden (view full) --- 363 printf("%s\n", demangled); 364 } else { 365 if (pretty_print) 366 printf("%s at ", f->name); 367 else 368 printf("%s\n", f->name); 369 } 370 } |
371 (void) printf("%s:%ju\n", base ? basename(file) : file, call_line); | 371 (void) printf("%s:%ju\n", base ? basename(file) : file, 372 (uintmax_t) call_line); |
372 373 if (f->inlined_caller != NULL) 374 print_inlines(cu, f->inlined_caller, f->call_file, 375 f->call_line); 376} 377 378static void 379translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) --- 177 unchanged lines hidden (view full) --- 557 } else { 558 if (pretty_print) 559 printf("%s at ", funcname); 560 else 561 printf("%s\n", funcname); 562 } 563 } 564 | 373 374 if (f->inlined_caller != NULL) 375 print_inlines(cu, f->inlined_caller, f->call_file, 376 f->call_line); 377} 378 379static void 380translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) --- 177 unchanged lines hidden (view full) --- 558 } else { 559 if (pretty_print) 560 printf("%s at ", funcname); 561 else 562 printf("%s\n", funcname); 563 } 564 } 565 |
565 (void) printf("%s:%ju\n", base ? basename(file) : file, lineno); | 566 (void) printf("%s:%ju\n", base ? basename(file) : file, 567 (uintmax_t) lineno); |
566 567 if (ret == DW_DLV_OK && inlines && cu != NULL && 568 cu->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) 569 print_inlines(cu, f->inlined_caller, f->call_file, 570 f->call_line); 571 572 if (die != NULL) 573 dwarf_dealloc(dbg, die, DW_DLA_DIE); --- 159 unchanged lines hidden --- | 568 569 if (ret == DW_DLV_OK && inlines && cu != NULL && 570 cu->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) 571 print_inlines(cu, f->inlined_caller, f->call_file, 572 f->call_line); 573 574 if (die != NULL) 575 dwarf_dealloc(dbg, die, DW_DLA_DIE); --- 159 unchanged lines hidden --- |