Commit c32e15e2 authored by Bernhard Schommer's avatar Bernhard Schommer
Browse files

Do not search for high and low pc of inlined functions.

parent b946cdfc
......@@ -119,7 +119,7 @@ module Printer(Target:TARGET) =
let get_end_addr = Target.get_end_addr
let get_stmt_list_addr = Target.get_stmt_list_addr
let name_of_section = Target.name_of_section
let get_fun_addr s = Hashtbl.find addr_mapping s
let get_fun_addr s = try Some (Hashtbl.find addr_mapping s) with Not_found -> None
end
module DebugPrinter = DwarfPrinter (DwarfTarget) (Target.DwarfAbbrevs)
......
......@@ -62,6 +62,11 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
let add_low_pc = add_abbr_entry (0x11,low_pc_type_abbr)
let add_fun_pc sp buf =
match get_fun_addr sp.subprogram_name with
| None ->()
| Some (a,b) -> add_high_pc buf; add_low_pc buf
let add_declaration = add_abbr_entry (0x3c,declaration_type_abbr)
let add_location loc buf =
......@@ -387,13 +392,16 @@ module DwarfPrinter(Target: DWARF_TARGET)(DwarfAbbrevs:DWARF_ABBREVS):
print_opt_value oc st.structure_declaration print_flag;
print_opt_value oc st.structure_name print_string
let print_subprogram_addr oc (s,e) =
fprintf oc " .4byte %a\n" label s;
fprintf oc " .4byte %a\n" label e
let print_subprogram oc sp =
let s,e = get_fun_addr sp.subprogram_name in
let addr = get_fun_addr sp.subprogram_name in
print_file_loc oc sp.subprogram_file_loc;
print_opt_value oc sp.subprogram_external print_flag;
print_opt_value oc sp.subprogram_frame_base print_loc;
fprintf oc " .4byte %a\n" label s;
fprintf oc " .4byte %a\n" label e;
print_opt_value oc addr print_subprogram_addr;
print_string oc sp.subprogram_name;
print_flag oc sp.subprogram_prototyped;
print_opt_value oc sp.subprogram_type print_ref
......
......@@ -268,5 +268,5 @@ module type DWARF_TARGET=
val get_end_addr: unit -> int
val get_stmt_list_addr: unit -> int
val name_of_section: section_name -> string
val get_fun_addr: string -> int * int
val get_fun_addr: string -> (int * int) option
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment