This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Add parse_dwarf2_calling_convention functionality


Elena Zannoni wrote:
Corinna Vinschen writes:
> Hi,
>

> Corinna
> > * gdbarch.sh (parse_dwarf2_calling_convention): New method.
> * gdbarch.h, gdbarch.c: Re-generate.
> * arch-utils.c (default_parse_dwarf2_calling_convention): New function.
> * arch-utils.h (default_parse_dwarf2_calling_convention): New extern
> declaration.
> * dwarf2read.c (read_subroutine_type): Evaluate
> DW_AT_calling_convention attribute and call
> gdbarch_parse_dwarf2_calling_convention appropriately.



The dwarf2read.c part is approved if the rest gets approved.

One mod, rather than adding this:


+# Evaluate DW_AT_calling_convention value and convert in a calling_convention
+# value in the functions main type.
+m::void:parse_dwarf2_calling_convention:int has_attr, unsigned long attr_val, unsigned char gcc_compiled, struct type *func_type:has_attr, attr_val, gcc_compiled, func_type:0:default_parse_dwarf2_calling_convention::0

to the architecture vector, take a look at:


13.2 Per-architecture module data
http://sources.redhat.com/gdb/current/onlinedocs/gdbint_13.html#SEC114

it lets dwarf2 locally manage that method while still being per-architecture.

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]