From: Tom Tromey Date: Fri, 22 Jul 2011 15:31:52 +0000 (+0000) Subject: gdb X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3543a589b22f9e26af4f71ce737dd9aae3410fda;p=binutils-gdb.git gdb * amd64-tdep.c (amd64_pseudo_register_read_value): Rename from amd64_pseudo_register_read. Change arguments. Call mark_value_bytes_unavailable when needed. (amd64_init_abi): Use set_gdbarch_pseudo_register_read_value, not set_gdbarch_pseudo_register_read. * sentinel-frame.c (sentinel_frame_prev_register): Use regcache_cooked_read_value. * regcache.h (regcache_cooked_read_value): Declare. * regcache.c (regcache_cooked_read_value): New function. (regcache_cooked_read): Call gdbarch_pseudo_register_read_value if available. * i386-tdep.h (i386_pseudo_register_read_value): Declare. (i386_pseudo_register_read): Remove. * i386-tdep.c (i386_pseudo_register_read_into_value): Rename from i386_pseudo_register_read. Change arguments. Call mark_value_bytes_unavailable when needed. (i386_pseudo_register_read_value): New function. (i386_gdbarch_init): Call set_gdbarch_pseudo_register_read_value, not set_gdbarch_pseudo_register_read. * gdbarch.sh (pseudo_register_read_value): New method. * gdbarch.c, gdbarch.h: Rebuild. * findvar.c (value_from_register): Call get_frame_register_value. gdb/testsuite * gdb.dwarf2/typeddwarf.c: XFAIL 'z' on x86-64. * gdb.dwarf2/typeddwarf.exp (xfail-gdb-test): Add arch_pattern argument. * gdb.dwarf2/typeddwarf-amd64.S: New file. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 614fca4ac21..37214d35d30 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,28 @@ +2011-07-22 Tom Tromey + + * amd64-tdep.c (amd64_pseudo_register_read_value): Rename + from amd64_pseudo_register_read. Change arguments. Call + mark_value_bytes_unavailable when needed. + (amd64_init_abi): Use set_gdbarch_pseudo_register_read_value, not + set_gdbarch_pseudo_register_read. + * sentinel-frame.c (sentinel_frame_prev_register): Use + regcache_cooked_read_value. + * regcache.h (regcache_cooked_read_value): Declare. + * regcache.c (regcache_cooked_read_value): New function. + (regcache_cooked_read): Call + gdbarch_pseudo_register_read_value if available. + * i386-tdep.h (i386_pseudo_register_read_value): Declare. + (i386_pseudo_register_read): Remove. + * i386-tdep.c (i386_pseudo_register_read_into_value): Rename from + i386_pseudo_register_read. Change arguments. Call + mark_value_bytes_unavailable when needed. + (i386_pseudo_register_read_value): New function. + (i386_gdbarch_init): Call set_gdbarch_pseudo_register_read_value, + not set_gdbarch_pseudo_register_read. + * gdbarch.sh (pseudo_register_read_value): New method. + * gdbarch.c, gdbarch.h: Rebuild. + * findvar.c (value_from_register): Call get_frame_register_value. + 2011-07-22 Phil Muldoon * event-top.c (cli_command_loop): Use get_prompt, get_suffix, diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index de62ac702cb..051fb13affd 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -275,14 +275,21 @@ amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum) return i386_pseudo_register_name (gdbarch, regnum); } -static enum register_status -amd64_pseudo_register_read (struct gdbarch *gdbarch, - struct regcache *regcache, - int regnum, gdb_byte *buf) +static struct value * +amd64_pseudo_register_read_value (struct gdbarch *gdbarch, + struct regcache *regcache, + int regnum) { gdb_byte raw_buf[MAX_REGISTER_SIZE]; struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum register_status status; + struct value *result_value; + gdb_byte *buf; + + result_value = allocate_value (register_type (gdbarch, regnum)); + VALUE_LVAL (result_value) = lval_register; + VALUE_REGNUM (result_value) = regnum; + buf = value_contents_raw (result_value); if (i386_byte_regnum_p (gdbarch, regnum)) { @@ -297,15 +304,19 @@ amd64_pseudo_register_read (struct gdbarch *gdbarch, raw_buf); if (status == REG_VALID) memcpy (buf, raw_buf + 1, 1); + else + mark_value_bytes_unavailable (result_value, 0, + TYPE_LENGTH (value_type (result_value))); } else { status = regcache_raw_read (regcache, gpnum, raw_buf); if (status == REG_VALID) memcpy (buf, raw_buf, 1); + else + mark_value_bytes_unavailable (result_value, 0, + TYPE_LENGTH (value_type (result_value))); } - - return status; } else if (i386_dword_regnum_p (gdbarch, regnum)) { @@ -314,11 +325,15 @@ amd64_pseudo_register_read (struct gdbarch *gdbarch, status = regcache_raw_read (regcache, gpnum, raw_buf); if (status == REG_VALID) memcpy (buf, raw_buf, 4); - - return status; + else + mark_value_bytes_unavailable (result_value, 0, + TYPE_LENGTH (value_type (result_value))); } else - return i386_pseudo_register_read (gdbarch, regcache, regnum, buf); + i386_pseudo_register_read_into_value (gdbarch, regcache, regnum, + result_value); + + return result_value; } static void @@ -2494,8 +2509,8 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* Avoid wiring in the MMX registers for now. */ tdep->num_mmx_regs = 0; - set_gdbarch_pseudo_register_read (gdbarch, - amd64_pseudo_register_read); + set_gdbarch_pseudo_register_read_value (gdbarch, + amd64_pseudo_register_read_value); set_gdbarch_pseudo_register_write (gdbarch, amd64_pseudo_register_write); diff --git a/gdb/findvar.c b/gdb/findvar.c index a700c0283a1..69dc5a0ed30 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -625,10 +625,11 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) struct gdbarch *gdbarch = get_frame_arch (frame); struct type *type1 = check_typedef (type); struct value *v; - int optim, unavail, ok; if (gdbarch_convert_register_p (gdbarch, regnum, type1)) { + int optim, unavail, ok; + /* The ISA/ABI need to something weird when obtaining the specified value from this register. It might need to re-order non-adjacent, starting with REGNUM (see MIPS and @@ -643,26 +644,27 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) ok = gdbarch_register_to_value (gdbarch, frame, regnum, type1, value_contents_raw (v), &optim, &unavail); + + if (!ok) + { + if (optim) + set_value_optimized_out (v, 1); + if (unavail) + mark_value_bytes_unavailable (v, 0, TYPE_LENGTH (type)); + } } else { int len = TYPE_LENGTH (type); + struct value *v2; /* Construct the value. */ v = gdbarch_value_from_register (gdbarch, type, regnum, frame); /* Get the data. */ - ok = get_frame_register_bytes (frame, regnum, value_offset (v), len, - value_contents_raw (v), - &optim, &unavail); - } + v2 = get_frame_register_value (frame, regnum); - if (!ok) - { - if (optim) - set_value_optimized_out (v, 1); - if (unavail) - mark_value_bytes_unavailable (v, 0, TYPE_LENGTH (type)); + value_contents_copy (v, 0, v2, value_offset (v), len); } return v; diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 1e65c17d35e..600cce61a3e 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -161,6 +161,7 @@ struct gdbarch gdbarch_write_pc_ftype *write_pc; gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; gdbarch_pseudo_register_read_ftype *pseudo_register_read; + gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value; gdbarch_pseudo_register_write_ftype *pseudo_register_write; int num_regs; int num_pseudo_regs; @@ -313,6 +314,7 @@ struct gdbarch startup_gdbarch = 0, /* write_pc */ legacy_virtual_frame_pointer, /* virtual_frame_pointer */ 0, /* pseudo_register_read */ + 0, /* pseudo_register_read_value */ 0, /* pseudo_register_write */ 0, /* num_regs */ 0, /* num_pseudo_regs */ @@ -594,6 +596,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of write_pc, has predicate. */ /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ /* Skip verify of pseudo_register_read, has predicate. */ + /* Skip verify of pseudo_register_read_value, has predicate. */ /* Skip verify of pseudo_register_write, has predicate. */ if (gdbarch->num_regs == -1) fprintf_unfiltered (log, "\n\tnum_regs"); @@ -1084,6 +1087,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: pseudo_register_read = <%s>\n", host_address_to_string (gdbarch->pseudo_register_read)); + fprintf_unfiltered (file, + "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n", + gdbarch_pseudo_register_read_value_p (gdbarch)); + fprintf_unfiltered (file, + "gdbarch_dump: pseudo_register_read_value = <%s>\n", + host_address_to_string (gdbarch->pseudo_register_read_value)); fprintf_unfiltered (file, "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", gdbarch_pseudo_register_write_p (gdbarch)); @@ -1699,6 +1708,30 @@ set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch->pseudo_register_read = pseudo_register_read; } +int +gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->pseudo_register_read_value != NULL; +} + +struct value * +gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum) +{ + gdb_assert (gdbarch != NULL); + gdb_assert (gdbarch->pseudo_register_read_value != NULL); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); + return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum); +} + +void +set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, + gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value) +{ + gdbarch->pseudo_register_read_value = pseudo_register_read_value; +} + int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 50221d782b4..76195816855 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -216,6 +216,17 @@ typedef enum register_status (gdbarch_pseudo_register_read_ftype) (struct gdbarc extern enum register_status gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf); extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read); +/* Read a register into a new struct value. If the register is wholly + or partly unavailable, this should call mark_value_bytes_unavailable + as appropriate. If this is defined, then pseudo_register_read will + never be called. */ + +extern int gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch); + +typedef struct value * (gdbarch_pseudo_register_read_value_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum); +extern struct value * gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum); +extern void set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value); + extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch); typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index a628f8c9e50..61094fb0400 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -418,6 +418,11 @@ F:void:write_pc:struct regcache *regcache, CORE_ADDR val:regcache, val m:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset:0:legacy_virtual_frame_pointer::0 # M:enum register_status:pseudo_register_read:struct regcache *regcache, int cookednum, gdb_byte *buf:regcache, cookednum, buf +# Read a register into a new struct value. If the register is wholly +# or partly unavailable, this should call mark_value_bytes_unavailable +# as appropriate. If this is defined, then pseudo_register_read will +# never be called. +M:struct value *:pseudo_register_read_value:struct regcache *regcache, int cookednum:regcache, cookednum M:void:pseudo_register_write:struct regcache *regcache, int cookednum, const gdb_byte *buf:regcache, cookednum, buf # v:int:num_regs:::0:-1 diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 366d0fa8491..5fb2efb0deb 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -2780,12 +2780,19 @@ i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum) return (I387_ST0_REGNUM (tdep) + fpreg); } -enum register_status -i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, - int regnum, gdb_byte *buf) +/* A helper function for us by i386_pseudo_register_read_value and + amd64_pseudo_register_read_value. It does all the work but reads + the data into an already-allocated value. */ + +void +i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, + struct regcache *regcache, + int regnum, + struct value *result_value) { gdb_byte raw_buf[MAX_REGISTER_SIZE]; enum register_status status; + gdb_byte *buf = value_contents_raw (result_value); if (i386_mmx_regnum_p (gdbarch, regnum)) { @@ -2794,8 +2801,10 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, /* Extract (always little endian). */ status = regcache_raw_read (regcache, fpnum, raw_buf); if (status != REG_VALID) - return status; - memcpy (buf, raw_buf, register_size (gdbarch, regnum)); + mark_value_bytes_unavailable (result_value, 0, + TYPE_LENGTH (value_type (result_value))); + else + memcpy (buf, raw_buf, register_size (gdbarch, regnum)); } else { @@ -2810,15 +2819,17 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, I387_XMM0_REGNUM (tdep) + regnum, raw_buf); if (status != REG_VALID) - return status; - memcpy (buf, raw_buf, 16); + mark_value_bytes_unavailable (result_value, 0, 16); + else + memcpy (buf, raw_buf, 16); /* Read upper 128bits. */ status = regcache_raw_read (regcache, tdep->ymm0h_regnum + regnum, raw_buf); if (status != REG_VALID) - return status; - memcpy (buf + 16, raw_buf, 16); + mark_value_bytes_unavailable (result_value, 16, 32); + else + memcpy (buf + 16, raw_buf, 16); } else if (i386_word_regnum_p (gdbarch, regnum)) { @@ -2827,8 +2838,10 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, /* Extract (always little endian). */ status = regcache_raw_read (regcache, gpnum, raw_buf); if (status != REG_VALID) - return status; - memcpy (buf, raw_buf, 2); + mark_value_bytes_unavailable (result_value, 0, + TYPE_LENGTH (value_type (result_value))); + else + memcpy (buf, raw_buf, 2); } else if (i386_byte_regnum_p (gdbarch, regnum)) { @@ -2841,8 +2854,9 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, upper registers. */ status = regcache_raw_read (regcache, gpnum % 4, raw_buf); if (status != REG_VALID) - return status; - if (gpnum >= 4) + mark_value_bytes_unavailable (result_value, 0, + TYPE_LENGTH (value_type (result_value))); + else if (gpnum >= 4) memcpy (buf, raw_buf + 1, 1); else memcpy (buf, raw_buf, 1); @@ -2850,8 +2864,22 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, else internal_error (__FILE__, __LINE__, _("invalid regnum")); } +} + +static struct value * +i386_pseudo_register_read_value (struct gdbarch *gdbarch, + struct regcache *regcache, + int regnum) +{ + struct value *result; + + result = allocate_value (register_type (gdbarch, regnum)); + VALUE_LVAL (result) = lval_register; + VALUE_REGNUM (result) = regnum; + + i386_pseudo_register_read_into_value (gdbarch, regcache, regnum, result); - return REG_VALID; + return result; } void @@ -7333,7 +7361,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) frame_base_set_default (gdbarch, &i386_frame_base); /* Pseudo registers may be changed by amd64_init_abi. */ - set_gdbarch_pseudo_register_read (gdbarch, i386_pseudo_register_read); + set_gdbarch_pseudo_register_read_value (gdbarch, + i386_pseudo_register_read_value); set_gdbarch_pseudo_register_write (gdbarch, i386_pseudo_register_write); set_tdesc_pseudo_register_type (gdbarch, i386_pseudo_register_type); diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 7fc719c74c0..de11f68ea72 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -311,10 +311,11 @@ extern int i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum); extern const char *i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum); -extern enum register_status i386_pseudo_register_read (struct gdbarch *gdbarch, - struct regcache *regcache, - int regnum, - gdb_byte *buf); +extern void i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, + struct regcache *regcache, + int regnum, + struct value *result); + extern void i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf); diff --git a/gdb/regcache.c b/gdb/regcache.c index 41f218d7f27..0af93e83a41 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -709,11 +709,66 @@ regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf) return regcache->register_status[regnum]; } + else if (gdbarch_pseudo_register_read_value_p (regcache->descr->gdbarch)) + { + struct value *mark, *computed; + enum register_status result = REG_VALID; + + mark = value_mark (); + + computed = gdbarch_pseudo_register_read_value (regcache->descr->gdbarch, + regcache, regnum); + if (value_entirely_available (computed)) + memcpy (buf, value_contents_raw (computed), + regcache->descr->sizeof_register[regnum]); + else + { + memset (buf, 0, regcache->descr->sizeof_register[regnum]); + result = REG_UNAVAILABLE; + } + + value_free_to_mark (mark); + + return result; + } else return gdbarch_pseudo_register_read (regcache->descr->gdbarch, regcache, regnum, buf); } +struct value * +regcache_cooked_read_value (struct regcache *regcache, int regnum) +{ + gdb_assert (regnum >= 0); + gdb_assert (regnum < regcache->descr->nr_cooked_registers); + + if (regnum < regcache->descr->nr_raw_registers + || (regcache->readonly_p + && regcache->register_status[regnum] != REG_UNKNOWN) + || !gdbarch_pseudo_register_read_value_p (regcache->descr->gdbarch)) + { + struct value *result; + + result = allocate_value (register_type (regcache->descr->gdbarch, + regnum)); + VALUE_LVAL (result) = lval_register; + VALUE_REGNUM (result) = regnum; + + /* It is more efficient in general to do this delegation in this + direction than in the other one, even though the value-based + API is preferred. */ + if (regcache_cooked_read (regcache, regnum, + value_contents_raw (result)) == REG_UNAVAILABLE) + mark_value_bytes_unavailable (result, 0, + TYPE_LENGTH (value_type (result))); + + return result; + } + else + return gdbarch_pseudo_register_read_value (regcache->descr->gdbarch, + regcache, regnum); +} + enum register_status regcache_cooked_read_signed (struct regcache *regcache, int regnum, LONGEST *val) diff --git a/gdb/regcache.h b/gdb/regcache.h index 3708c86d640..7f7dc105968 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -104,6 +104,12 @@ enum register_status regcache_cooked_read (struct regcache *regcache, void regcache_cooked_write (struct regcache *regcache, int rawnum, const gdb_byte *buf); +/* Read register REGNUM from REGCACHE and return a new value. This + will call mark_value_bytes_unavailable as appropriate. */ + +struct value *regcache_cooked_read_value (struct regcache *regcache, + int regnum); + /* Read a register as a signed/unsigned quantity. */ extern enum register_status regcache_cooked_read_signed (struct regcache *regcache, diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c index 6c2f3e079d1..5d018bdb9cd 100644 --- a/gdb/sentinel-frame.c +++ b/gdb/sentinel-frame.c @@ -48,25 +48,12 @@ sentinel_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum) { - struct gdbarch *gdbarch = get_frame_arch (this_frame); struct frame_unwind_cache *cache = *this_prologue_cache; struct value *value; - struct type *regtype = register_type (gdbarch, regnum); - /* Return the actual value. */ - value = allocate_value (regtype); - VALUE_LVAL (value) = lval_register; - VALUE_REGNUM (value) = regnum; + value = regcache_cooked_read_value (cache->regcache, regnum); VALUE_FRAME_ID (value) = get_frame_id (this_frame); - /* Use the regcache_cooked_read() method so that it, on the fly, - constructs either a raw or pseudo register from the raw - register cache. */ - if (regcache_cooked_read (cache->regcache, - regnum, - value_contents_raw (value)) == REG_UNAVAILABLE) - mark_value_bytes_unavailable (value, 0, TYPE_LENGTH (regtype)); - return value; } diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0b2c98e39ac..a907aa160c4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-07-22 Tom Tromey + + * gdb.dwarf2/typeddwarf.c: XFAIL 'z' on x86-64. + * gdb.dwarf2/typeddwarf.exp (xfail-gdb-test): Add arch_pattern + argument. + * gdb.dwarf2/typeddwarf-amd64.S: New file. + 2011-07-21 Matt Rice * gdb.threads/Makefile.in: Avoid globbing corethreads.exp diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S b/gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S new file mode 100644 index 00000000000..f97357acc7b --- /dev/null +++ b/gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S @@ -0,0 +1,1568 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2011 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* This source file was generated from typeddwarf.c using the following + command line: + + gcc -S -g -O2 typeddwarf.c -o typeddwarf-amd64.S + +*/ + + + .file "typeddwarf.c" + .text +.Ltext0: + .globl f1 + .type f1, @function +f1: +.LFB0: + .file 1 "typeddwarf.c" + .loc 1 10 0 + .cfi_startproc +.LVL0: + .loc 1 29 0 + movl vv(%rip), %eax + addl $1, %eax + movl %eax, vv(%rip) + .loc 1 30 0 + ret + .cfi_endproc +.LFE0: + .size f1, .-f1 + .globl f2 + .type f2, @function +f2: +.LFB1: + .loc 1 34 0 + .cfi_startproc +.LVL1: + .loc 1 53 0 + movl vv(%rip), %eax + addl $1, %eax + movl %eax, vv(%rip) + .loc 1 54 0 + cvttsd2si %xmm0, %eax + movl %eax, vv(%rip) + .loc 1 55 0 + cvttsd2si %xmm1, %eax + movl %eax, vv(%rip) + .loc 1 56 0 + cvttsd2si %xmm2, %eax + movl %eax, vv(%rip) + .loc 1 57 0 + cvttss2si %xmm3, %eax + movl %eax, vv(%rip) + .loc 1 58 0 + cvttss2si %xmm4, %r8d + movl %r8d, vv(%rip) + .loc 1 59 0 + movl %edi, vv(%rip) + .loc 1 60 0 + movl %esi, vv(%rip) + .loc 1 61 0 + movl %edx, vv(%rip) + .loc 1 62 0 + movl %ecx, vv(%rip) + .loc 1 63 0 + movl %eax, vv(%rip) + .loc 1 64 0 + ret + .cfi_endproc +.LFE1: + .size f2, .-f2 + .globl f3 + .type f3, @function +f3: +.LFB2: + .loc 1 68 0 + .cfi_startproc +.LVL2: + .loc 1 73 0 + movl vv(%rip), %eax + addl $1, %eax + movl %eax, vv(%rip) + .loc 1 74 0 + ret + .cfi_endproc +.LFE2: + .size f3, .-f3 + .globl f4 + .type f4, @function +f4: +.LFB3: + .loc 1 78 0 + .cfi_startproc +.LVL3: + .loc 1 82 0 + movl vv(%rip), %eax + addl $1, %eax + movl %eax, vv(%rip) + .loc 1 83 0 + ret + .cfi_endproc +.LFE3: + .size f4, .-f4 + .globl _start + .type _start, @function +_start: +.LFB4: + .loc 1 87 0 + .cfi_startproc + subq $8, %rsp +.LCFI0: + .cfi_def_cfa_offset 16 + .loc 1 88 0 + movl $9, %ecx + movl $8, %edx + movl $7, %esi + movl $6, %edi + movss .LC2(%rip), %xmm4 + movss .LC3(%rip), %xmm3 + movsd .LC0(%rip), %xmm2 + movsd .LC1(%rip), %xmm1 + movsd .LC4(%rip), %xmm0 + call f1 +.LVL4: + .loc 1 89 0 + movl $9, %ecx + movl $8, %edx + movl $7, %esi + movl $6, %edi + movss .LC2(%rip), %xmm4 + movss .LC3(%rip), %xmm3 + movsd .LC0(%rip), %xmm2 + movsd .LC1(%rip), %xmm1 + movsd .LC4(%rip), %xmm0 + call f2 +.LVL5: + .loc 1 90 0 + movl $4, %ecx + movl $3, %edx + movl $2, %esi + movl $1, %edi + call f3 +.LVL6: + .loc 1 91 0 + movdqa .LC5(%rip), %xmm2 + movq .LC6(%rip), %xmm1 + movd .LC7(%rip), %xmm0 + call f4 +.LVL7: + .loc 1 93 0 + movl $0, %eax + addq $8, %rsp +.LCFI1: + .cfi_def_cfa_offset 8 + ret + .cfi_endproc +.LFE4: + .size _start, .-_start + .comm vv,4,4 + .section .rodata.cst8,"aM",@progbits,8 + .align 8 +.LC0: + .long 0 + .long 1074266112 + .align 8 +.LC1: + .long 0 + .long 1073741824 + .section .rodata.cst4,"aM",@progbits,4 + .align 4 +.LC2: + .long 1084227584 + .align 4 +.LC3: + .long 1082130432 + .section .rodata.cst8 + .align 8 +.LC4: + .long 0 + .long 1072693248 + .section .rodata.cst16,"aM",@progbits,16 + .align 16 +.LC5: + .quad 640 + .quad 3476215962376601600 + .section .rodata.cst8 + .align 8 +.LC6: + .quad 3575858104132173984 + .section .rodata.cst4 + .align 4 +.LC7: + .long 838860880 + .text +.Letext0: + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x6c4 + .value 0x2 + .long .Ldebug_abbrev0 + .byte 0x8 + .uleb128 0x1 + .long .LASF8 + .byte 0x1 + .long .LASF9 + .long .LASF10 + .quad .Ltext0 + .quad .Letext0 + .long .Ldebug_line0 + .uleb128 0x2 + .byte 0x8 + .byte 0x4 + .long .LASF0 + .uleb128 0x2 + .byte 0x4 + .byte 0x4 + .long .LASF1 + .uleb128 0x2 + .byte 0x8 + .byte 0x7 + .long .LASF2 + .uleb128 0x2 + .byte 0x8 + .byte 0x5 + .long .LASF3 + .uleb128 0x2 + .byte 0x4 + .byte 0x7 + .long .LASF4 + .uleb128 0x3 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x2 + .byte 0x8 + .byte 0xf + .long .LASF5 + .uleb128 0x2 + .byte 0x4 + .byte 0xf + .long .LASF6 + .uleb128 0x2 + .byte 0x10 + .byte 0xf + .long .LASF7 + .uleb128 0x4 + .byte 0x1 + .string "f1" + .byte 0x1 + .byte 0x9 + .byte 0x1 + .quad .LFB0 + .quad .LFE0 + .byte 0x2 + .byte 0x77 + .sleb128 8 + .byte 0x1 + .long 0x22b + .uleb128 0x5 + .string "a" + .byte 0x1 + .byte 0x9 + .long 0x2d + .byte 0x1 + .byte 0x61 + .uleb128 0x5 + .string "b" + .byte 0x1 + .byte 0x9 + .long 0x2d + .byte 0x1 + .byte 0x62 + .uleb128 0x5 + .string "c" + .byte 0x1 + .byte 0x9 + .long 0x2d + .byte 0x1 + .byte 0x63 + .uleb128 0x5 + .string "d" + .byte 0x1 + .byte 0x9 + .long 0x34 + .byte 0x1 + .byte 0x64 + .uleb128 0x5 + .string "e" + .byte 0x1 + .byte 0x9 + .long 0x34 + .byte 0x1 + .byte 0x65 + .uleb128 0x5 + .string "f" + .byte 0x1 + .byte 0x9 + .long 0x50 + .byte 0x1 + .byte 0x55 + .uleb128 0x5 + .string "g" + .byte 0x1 + .byte 0x9 + .long 0x49 + .byte 0x1 + .byte 0x54 + .uleb128 0x5 + .string "h" + .byte 0x1 + .byte 0x9 + .long 0x22b + .byte 0x1 + .byte 0x51 + .uleb128 0x5 + .string "i" + .byte 0x1 + .byte 0x9 + .long 0x232 + .byte 0x1 + .byte 0x52 + .uleb128 0x6 + .string "j" + .byte 0x1 + .byte 0xb + .long 0x2d + .byte 0x6 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x2d + .byte 0x9f + .uleb128 0x6 + .string "l" + .byte 0x1 + .byte 0xc + .long 0x22b + .byte 0x8 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x2d + .byte 0xf9 + .uleb128 0x3b + .byte 0x9f + .uleb128 0x6 + .string "m" + .byte 0x1 + .byte 0xe + .long 0x22b + .byte 0x1 + .byte 0x63 + .uleb128 0x6 + .string "n" + .byte 0x1 + .byte 0x10 + .long 0x34 + .byte 0x7 + .byte 0x72 + .sleb128 0 + .byte 0xf7 + .uleb128 0x3b + .byte 0xf7 + .uleb128 0x34 + .byte 0x9f + .uleb128 0x6 + .string "o" + .byte 0x1 + .byte 0x11 + .long 0x2d + .byte 0x7 + .byte 0x71 + .sleb128 0 + .byte 0xf7 + .uleb128 0x42 + .byte 0xf7 + .uleb128 0x2d + .byte 0x9f + .uleb128 0x6 + .string "p" + .byte 0x1 + .byte 0x12 + .long 0x34 + .byte 0x7 + .byte 0x74 + .sleb128 0 + .byte 0xf7 + .uleb128 0x49 + .byte 0xf7 + .uleb128 0x34 + .byte 0x9f + .uleb128 0x6 + .string "q" + .byte 0x1 + .byte 0x13 + .long 0x2d + .byte 0x7 + .byte 0x75 + .sleb128 0 + .byte 0xf7 + .uleb128 0x50 + .byte 0xf7 + .uleb128 0x2d + .byte 0x9f + .uleb128 0x6 + .string "r" + .byte 0x1 + .byte 0x14 + .long 0x232 + .byte 0x6 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x3b + .byte 0x9f + .uleb128 0x6 + .string "s" + .byte 0x1 + .byte 0x15 + .long 0x22b + .byte 0x8 + .byte 0xf5 + .uleb128 0x13 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x42 + .byte 0xf7 + .uleb128 0 + .byte 0x9f + .uleb128 0x6 + .string "t" + .byte 0x1 + .byte 0x16 + .long 0x49 + .byte 0x8 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x49 + .byte 0xf7 + .uleb128 0 + .byte 0x9f + .uleb128 0x6 + .string "u" + .byte 0x1 + .byte 0x17 + .long 0x50 + .byte 0x8 + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x50 + .byte 0xf7 + .uleb128 0 + .byte 0x9f + .uleb128 0x6 + .string "v" + .byte 0x1 + .byte 0x18 + .long 0x34 + .byte 0x6 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x34 + .byte 0x9f + .uleb128 0x6 + .string "w" + .byte 0x1 + .byte 0x19 + .long 0x2d + .byte 0x12 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x2d + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x3fd00000 + .byte 0x1e + .byte 0x9f + .uleb128 0x6 + .string "x" + .byte 0x1 + .byte 0x1a + .long 0x2d + .byte 0x14 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x2d + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x2d + .byte 0x22 + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x3ff00000 + .byte 0x22 + .byte 0x9f + .uleb128 0x6 + .string "y" + .byte 0x1 + .byte 0x1b + .long 0x2d + .byte 0x14 + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x2d + .byte 0xf5 + .uleb128 0x13 + .uleb128 0x2d + .byte 0x22 + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x40000000 + .byte 0x22 + .byte 0x9f + .uleb128 0x6 + .string "z" + .byte 0x1 + .byte 0x1c + .long 0x34 + .byte 0x12 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf3 + .uleb128 0x3 + .byte 0xf5 + .uleb128 0x15 + .uleb128 0x34 + .byte 0x22 + .byte 0xf4 + .uleb128 0x34 + .byte 0x4 + .long 0x40400000 + .byte 0x22 + .byte 0x9f + .byte 0 + .uleb128 0x2 + .byte 0x8 + .byte 0x5 + .long .LASF11 + .uleb128 0x2 + .byte 0x8 + .byte 0x7 + .long .LASF12 + .uleb128 0x4 + .byte 0x1 + .string "f2" + .byte 0x1 + .byte 0x21 + .byte 0x1 + .quad .LFB1 + .quad .LFE1 + .byte 0x2 + .byte 0x77 + .sleb128 8 + .byte 0x1 + .long 0x402 + .uleb128 0x5 + .string "a" + .byte 0x1 + .byte 0x21 + .long 0x2d + .byte 0x1 + .byte 0x61 + .uleb128 0x5 + .string "b" + .byte 0x1 + .byte 0x21 + .long 0x2d + .byte 0x1 + .byte 0x62 + .uleb128 0x5 + .string "c" + .byte 0x1 + .byte 0x21 + .long 0x2d + .byte 0x1 + .byte 0x63 + .uleb128 0x5 + .string "d" + .byte 0x1 + .byte 0x21 + .long 0x34 + .byte 0x1 + .byte 0x64 + .uleb128 0x5 + .string "e" + .byte 0x1 + .byte 0x21 + .long 0x34 + .byte 0x1 + .byte 0x65 + .uleb128 0x5 + .string "f" + .byte 0x1 + .byte 0x21 + .long 0x50 + .byte 0x1 + .byte 0x55 + .uleb128 0x5 + .string "g" + .byte 0x1 + .byte 0x21 + .long 0x49 + .byte 0x1 + .byte 0x54 + .uleb128 0x5 + .string "h" + .byte 0x1 + .byte 0x21 + .long 0x22b + .byte 0x1 + .byte 0x51 + .uleb128 0x5 + .string "i" + .byte 0x1 + .byte 0x21 + .long 0x232 + .byte 0x1 + .byte 0x52 + .uleb128 0x6 + .string "j" + .byte 0x1 + .byte 0x23 + .long 0x2d + .byte 0x6 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x2d + .byte 0x9f + .uleb128 0x6 + .string "l" + .byte 0x1 + .byte 0x24 + .long 0x22b + .byte 0x8 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x2d + .byte 0xf9 + .uleb128 0x3b + .byte 0x9f + .uleb128 0x6 + .string "m" + .byte 0x1 + .byte 0x26 + .long 0x22b + .byte 0x1 + .byte 0x63 + .uleb128 0x6 + .string "n" + .byte 0x1 + .byte 0x28 + .long 0x34 + .byte 0x7 + .byte 0x72 + .sleb128 0 + .byte 0xf7 + .uleb128 0x3b + .byte 0xf7 + .uleb128 0x34 + .byte 0x9f + .uleb128 0x6 + .string "o" + .byte 0x1 + .byte 0x29 + .long 0x2d + .byte 0x7 + .byte 0x71 + .sleb128 0 + .byte 0xf7 + .uleb128 0x42 + .byte 0xf7 + .uleb128 0x2d + .byte 0x9f + .uleb128 0x6 + .string "p" + .byte 0x1 + .byte 0x2a + .long 0x34 + .byte 0x7 + .byte 0x74 + .sleb128 0 + .byte 0xf7 + .uleb128 0x49 + .byte 0xf7 + .uleb128 0x34 + .byte 0x9f + .uleb128 0x6 + .string "q" + .byte 0x1 + .byte 0x2b + .long 0x2d + .byte 0x7 + .byte 0x75 + .sleb128 0 + .byte 0xf7 + .uleb128 0x50 + .byte 0xf7 + .uleb128 0x2d + .byte 0x9f + .uleb128 0x6 + .string "r" + .byte 0x1 + .byte 0x2c + .long 0x232 + .byte 0x6 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x3b + .byte 0x9f + .uleb128 0x6 + .string "s" + .byte 0x1 + .byte 0x2d + .long 0x22b + .byte 0x8 + .byte 0xf5 + .uleb128 0x13 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x42 + .byte 0xf7 + .uleb128 0 + .byte 0x9f + .uleb128 0x6 + .string "t" + .byte 0x1 + .byte 0x2e + .long 0x49 + .byte 0x8 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x49 + .byte 0xf7 + .uleb128 0 + .byte 0x9f + .uleb128 0x6 + .string "u" + .byte 0x1 + .byte 0x2f + .long 0x50 + .byte 0x8 + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x50 + .byte 0xf7 + .uleb128 0 + .byte 0x9f + .uleb128 0x6 + .string "v" + .byte 0x1 + .byte 0x30 + .long 0x34 + .byte 0x6 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x2d + .byte 0xf7 + .uleb128 0x34 + .byte 0x9f + .uleb128 0x6 + .string "w" + .byte 0x1 + .byte 0x31 + .long 0x2d + .byte 0x12 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf7 + .uleb128 0x2d + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x3fd00000 + .byte 0x1e + .byte 0x9f + .uleb128 0x6 + .string "x" + .byte 0x1 + .byte 0x32 + .long 0x2d + .byte 0x20 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x2d + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x2d + .byte 0x22 + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x40080000 + .byte 0x1c + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0x78b58c40 + .long 0x4415af1d + .byte 0x22 + .byte 0x9f + .uleb128 0x6 + .string "y" + .byte 0x1 + .byte 0x33 + .long 0x2d + .byte 0x14 + .byte 0xf5 + .uleb128 0x13 + .uleb128 0x2d + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x401c0000 + .byte 0x1e + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x2d + .byte 0x22 + .byte 0x9f + .uleb128 0x6 + .string "z" + .byte 0x1 + .byte 0x34 + .long 0x34 + .byte 0x10 + .byte 0xf5 + .uleb128 0x14 + .uleb128 0x34 + .byte 0xf5 + .uleb128 0x15 + .uleb128 0x34 + .byte 0x22 + .byte 0xf4 + .uleb128 0x34 + .byte 0x4 + .long 0x40400000 + .byte 0x22 + .byte 0x9f + .byte 0 + .uleb128 0x4 + .byte 0x1 + .string "f3" + .byte 0x1 + .byte 0x43 + .byte 0x1 + .quad .LFB2 + .quad .LFE2 + .byte 0x2 + .byte 0x77 + .sleb128 8 + .byte 0x1 + .long 0x4cd + .uleb128 0x5 + .string "a" + .byte 0x1 + .byte 0x43 + .long 0x22b + .byte 0x1 + .byte 0x55 + .uleb128 0x5 + .string "b" + .byte 0x1 + .byte 0x43 + .long 0x50 + .byte 0x1 + .byte 0x54 + .uleb128 0x5 + .string "c" + .byte 0x1 + .byte 0x43 + .long 0x22b + .byte 0x1 + .byte 0x51 + .uleb128 0x5 + .string "d" + .byte 0x1 + .byte 0x43 + .long 0x49 + .byte 0x1 + .byte 0x52 + .uleb128 0x6 + .string "w" + .byte 0x1 + .byte 0x45 + .long 0x22b + .byte 0x14 + .byte 0x72 + .sleb128 0 + .byte 0xc + .long 0xffffffff + .byte 0x1a + .byte 0x12 + .byte 0x75 + .sleb128 0 + .byte 0x16 + .byte 0x14 + .byte 0x2b + .byte 0x28 + .value 0x1 + .byte 0x16 + .byte 0x13 + .byte 0x9f + .uleb128 0x6 + .string "x" + .byte 0x1 + .byte 0x46 + .long 0x22b + .byte 0xe + .byte 0x74 + .sleb128 0 + .byte 0x8 + .byte 0x20 + .byte 0x24 + .byte 0x8 + .byte 0x20 + .byte 0x26 + .byte 0x75 + .sleb128 0 + .byte 0x22 + .byte 0x23 + .uleb128 0x7 + .byte 0x9f + .uleb128 0x6 + .string "y" + .byte 0x1 + .byte 0x47 + .long 0x22b + .byte 0x13 + .byte 0x72 + .sleb128 0 + .byte 0xc + .long 0xffffffff + .byte 0x1a + .byte 0x71 + .sleb128 0 + .byte 0x22 + .byte 0x23 + .uleb128 0x912345678 + .byte 0x9f + .uleb128 0x6 + .string "z" + .byte 0x1 + .byte 0x48 + .long 0x50 + .byte 0x21 + .byte 0x74 + .sleb128 0 + .byte 0x8 + .byte 0x20 + .byte 0x24 + .byte 0x8 + .byte 0x20 + .byte 0x26 + .byte 0x75 + .sleb128 0 + .byte 0x22 + .byte 0x23 + .uleb128 0x7 + .byte 0x72 + .sleb128 0 + .byte 0xc + .long 0xffffffff + .byte 0x1a + .byte 0x71 + .sleb128 0 + .byte 0x22 + .byte 0x23 + .uleb128 0x912345678 + .byte 0x22 + .byte 0x9f + .byte 0 + .uleb128 0x4 + .byte 0x1 + .string "f4" + .byte 0x1 + .byte 0x4d + .byte 0x1 + .quad .LFB3 + .quad .LFE3 + .byte 0x2 + .byte 0x77 + .sleb128 8 + .byte 0x1 + .long 0x576 + .uleb128 0x5 + .string "a" + .byte 0x1 + .byte 0x4d + .long 0x5e + .byte 0x1 + .byte 0x61 + .uleb128 0x5 + .string "b" + .byte 0x1 + .byte 0x4d + .long 0x57 + .byte 0x1 + .byte 0x62 + .uleb128 0x5 + .string "c" + .byte 0x1 + .byte 0x4d + .long 0x65 + .byte 0x1 + .byte 0x63 + .uleb128 0x6 + .string "w" + .byte 0x1 + .byte 0x4f + .long 0x5e + .byte 0x14 + .byte 0xf5 + .uleb128 0x11 + .uleb128 0x5e + .byte 0xf4 + .uleb128 0x5e + .byte 0x4 + .long 0x32000050 + .byte 0x1e + .byte 0xf4 + .uleb128 0x5e + .byte 0x4 + .long 0x3200003c + .byte 0x22 + .byte 0x9f + .uleb128 0x6 + .string "x" + .byte 0x1 + .byte 0x50 + .long 0x57 + .byte 0x1c + .byte 0xf5 + .uleb128 0x12 + .uleb128 0x57 + .byte 0xf4 + .uleb128 0x57 + .byte 0x8 + .long 0x50 + .long 0x31a00000 + .byte 0x1b + .byte 0xf4 + .uleb128 0x57 + .byte 0x8 + .long 0x3c + .long 0x31a00000 + .byte 0x1c + .byte 0x9f + .uleb128 0x6 + .string "y" + .byte 0x1 + .byte 0x51 + .long 0x65 + .byte 0x19 + .byte 0xf5 + .uleb128 0x13 + .uleb128 0x65 + .byte 0x1f + .byte 0xf4 + .uleb128 0x65 + .byte 0x10 + .long 0x50 + .long 0 + .long 0 + .long 0x303e0000 + .byte 0x1b + .byte 0x9f + .byte 0 + .uleb128 0x7 + .byte 0x1 + .long .LASF13 + .byte 0x1 + .byte 0x56 + .long 0x50 + .quad .LFB4 + .quad .LFE4 + .long .LLST0 + .byte 0x1 + .long 0x6a1 + .uleb128 0x8 + .quad .LVL4 + .long 0x6c + .long 0x604 + .uleb128 0x9 + .byte 0x1 + .byte 0x61 + .byte 0xb + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x3ff00000 + .uleb128 0x9 + .byte 0x1 + .byte 0x62 + .byte 0xb + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x40000000 + .uleb128 0x9 + .byte 0x1 + .byte 0x63 + .byte 0xb + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x40080000 + .uleb128 0x9 + .byte 0x1 + .byte 0x64 + .byte 0x7 + .byte 0xf4 + .uleb128 0x34 + .byte 0x4 + .long 0x40800000 + .uleb128 0x9 + .byte 0x1 + .byte 0x65 + .byte 0x7 + .byte 0xf4 + .uleb128 0x34 + .byte 0x4 + .long 0x40a00000 + .uleb128 0x9 + .byte 0x1 + .byte 0x55 + .byte 0x1 + .byte 0x36 + .uleb128 0x9 + .byte 0x1 + .byte 0x54 + .byte 0x1 + .byte 0x37 + .uleb128 0x9 + .byte 0x1 + .byte 0x51 + .byte 0x1 + .byte 0x38 + .uleb128 0x9 + .byte 0x1 + .byte 0x52 + .byte 0x1 + .byte 0x39 + .byte 0 + .uleb128 0x8 + .quad .LVL5 + .long 0x239 + .long 0x66d + .uleb128 0x9 + .byte 0x1 + .byte 0x61 + .byte 0xb + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x3ff00000 + .uleb128 0x9 + .byte 0x1 + .byte 0x62 + .byte 0xb + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x40000000 + .uleb128 0x9 + .byte 0x1 + .byte 0x63 + .byte 0xb + .byte 0xf4 + .uleb128 0x2d + .byte 0x8 + .long 0 + .long 0x40080000 + .uleb128 0x9 + .byte 0x1 + .byte 0x64 + .byte 0x7 + .byte 0xf4 + .uleb128 0x34 + .byte 0x4 + .long 0x40800000 + .uleb128 0x9 + .byte 0x1 + .byte 0x65 + .byte 0x7 + .byte 0xf4 + .uleb128 0x34 + .byte 0x4 + .long 0x40a00000 + .uleb128 0x9 + .byte 0x1 + .byte 0x55 + .byte 0x1 + .byte 0x36 + .uleb128 0x9 + .byte 0x1 + .byte 0x54 + .byte 0x1 + .byte 0x37 + .uleb128 0x9 + .byte 0x1 + .byte 0x51 + .byte 0x1 + .byte 0x38 + .uleb128 0x9 + .byte 0x1 + .byte 0x52 + .byte 0x1 + .byte 0x39 + .byte 0 + .uleb128 0x8 + .quad .LVL6 + .long 0x402 + .long 0x693 + .uleb128 0x9 + .byte 0x1 + .byte 0x55 + .byte 0x1 + .byte 0x31 + .uleb128 0x9 + .byte 0x1 + .byte 0x54 + .byte 0x1 + .byte 0x32 + .uleb128 0x9 + .byte 0x1 + .byte 0x51 + .byte 0x1 + .byte 0x33 + .uleb128 0x9 + .byte 0x1 + .byte 0x52 + .byte 0x1 + .byte 0x34 + .byte 0 + .uleb128 0xa + .quad .LVL7 + .long 0x4cd + .byte 0 + .uleb128 0xb + .string "vv" + .byte 0x1 + .byte 0x5 + .long 0x6ad + .byte 0x1 + .byte 0x1 + .uleb128 0xc + .long 0x50 + .uleb128 0xd + .string "vv" + .byte 0x1 + .byte 0x5 + .long 0x6ad + .byte 0x1 + .byte 0x9 + .byte 0x3 + .quad vv + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x10 + .uleb128 0x6 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0xc + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0xc + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x40 + .uleb128 0xa + .uleb128 0x2117 + .uleb128 0xc + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0xa + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0xa + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0xc + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x40 + .uleb128 0x6 + .uleb128 0x2117 + .uleb128 0xc + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x4109 + .byte 0x1 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x31 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x410a + .byte 0 + .uleb128 0x2 + .uleb128 0xa + .uleb128 0x2111 + .uleb128 0xa + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x4109 + .byte 0 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x31 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0xc + .uleb128 0x3c + .uleb128 0xc + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x35 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0xc + .uleb128 0x2 + .uleb128 0xa + .byte 0 + .byte 0 + .byte 0 + .section .debug_loc,"",@progbits +.Ldebug_loc0: +.LLST0: + .quad .LFB4-.Ltext0 + .quad .LCFI0-.Ltext0 + .value 0x2 + .byte 0x77 + .sleb128 8 + .quad .LCFI0-.Ltext0 + .quad .LCFI1-.Ltext0 + .value 0x2 + .byte 0x77 + .sleb128 16 + .quad .LCFI1-.Ltext0 + .quad .LFE4-.Ltext0 + .value 0x2 + .byte 0x77 + .sleb128 8 + .quad 0 + .quad 0 + .section .debug_aranges,"",@progbits + .long 0x2c + .value 0x2 + .long .Ldebug_info0 + .byte 0x8 + .byte 0 + .value 0 + .value 0 + .quad .Ltext0 + .quad .Letext0-.Ltext0 + .quad 0 + .quad 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF4: + .string "unsigned int" +.LASF6: + .string "_Decimal32" +.LASF7: + .string "_Decimal128" +.LASF2: + .string "long unsigned int" +.LASF12: + .string "long long unsigned int" +.LASF5: + .string "_Decimal64" +.LASF13: + .string "main" +.LASF3: + .string "long int" +.LASF10: + .string "/tmp" +.LASF0: + .string "double" +.LASF11: + .string "long long int" +.LASF1: + .string "float" +.LASF8: + .string "GNU C 4.7.0 20110708 (experimental) [trunk revision 176048]" +.LASF9: + .string "typeddwarf.c" + .ident "GCC: (GNU) 4.7.0 20110708 (experimental) [trunk revision 176048]" + .section .note.GNU-stack,"",@progbits diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.c b/gdb/testsuite/gdb.dwarf2/typeddwarf.c index e5f7d672c08..40497da6f12 100644 --- a/gdb/testsuite/gdb.dwarf2/typeddwarf.c +++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.c @@ -25,7 +25,7 @@ f1 (double a, double b, double c, float d, float e, int f, unsigned int g, long double w = d / 4.0; /* { dg-final { gdb-test 29 "w" "1" } } */ double x = a + b + 1.0; /* { dg-final { gdb-test 29 "x" "4" } } */ double y = b + c + 2.0; /* { dg-final { gdb-test 29 "y" "7" } } */ - float z = d + e + 3.0f; /* { dg-final { gdb-test 29 "z" "12" } } */ + float z = d + e + 3.0f; /* { dg-final { xfail-gdb-test 29 "z" "12" "x86_64-*-*"} } */ vv++; } diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp index e6a420ac814..36a17e5372d 100644 --- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp +++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp @@ -22,12 +22,16 @@ if ![dwarf2_support] { return 0 } -# This test can only be run on x86 targets. -if { ![is_x86_like_target] } { +# This test can only be run on x86 and amd64 targets. +if { [is_x86_like_target] } { + set sfile ${test}.S +} elseif {[istarget "x86_64-*-*"]} { + set sfile ${test}-amd64.S +} else { return 0 } -if { [prepare_for_testing "${test}.exp" "${test}" ${test}.S {nodebug additional_flags=-nostdlib}] } { +if { [prepare_for_testing "${test}.exp" "${test}" ${sfile} {nodebug additional_flags=-nostdlib}] } { return -1 } @@ -45,10 +49,19 @@ proc gdb-test {line var value} { lappend tests($line) [list $var $value 0] } -proc xfail-gdb-test {line var value} { +# Add an XFAIL'd test. If ARCH_PATTERN is given, and does not match +# the target, then the test is simply added and not XFAIL'd. +proc xfail-gdb-test {line var value {arch_pattern ""}} { global tests - lappend tests($line) [list $var $value 1] + set flag 1 + if {$arch_pattern != ""} { + if {! [istarget $arch_pattern]} { + set flag 0 + } + } + + lappend tests($line) [list $var $value $flag] } proc scan_gdb_tests {} {