-/* Copyright (C) 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2014 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "osabi.h"
#include "amd64-tdep.h"
-#include "solib.h"
-#include "solib-target.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "regcache.h"
call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
- && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
+ && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
pc += 5;
}
}
ex_ui.CountOfCodes, ex_ui.FrameRegisterOffset);
/* Check version. */
- if (PEX64_UWI_VERSION (ex_ui.Version_Flags) != 1)
+ if (PEX64_UWI_VERSION (ex_ui.Version_Flags) != 1
+ && PEX64_UWI_VERSION (ex_ui.Version_Flags) != 2)
return;
if (j == 0
return;
end_insns = &insns[codes_count * 2];
- for (p = insns; p < end_insns; p += 2)
+ p = insns;
+
+ /* Skip opcodes 6 of version 2. This opcode is not documented. */
+ if (PEX64_UWI_VERSION (ex_ui.Version_Flags) == 2)
+ {
+ for (; p < end_insns; p += 2)
+ if (PEX64_UNWCODE_CODE (p[1]) != 6)
+ break;
+ }
+
+ for (; p < end_insns; p += 2)
{
int reg;
CORE_ADDR chain_vma;
chain_vma = cache->image_base + unwind_info
- + sizeof (ex_ui) + ((codes_count + 1) & ~1) * 2 + 8;
+ + sizeof (ex_ui) + ((codes_count + 1) & ~1) * 2;
if (target_read_memory (chain_vma, (gdb_byte *) &d, sizeof (d)) != 0)
return;
extract_unsigned_integer (d.rva_EndAddress, 4, byte_order);
unwind_info =
extract_unsigned_integer (d.rva_UnwindData, 4, byte_order);
+
+ if (frame_debug)
+ fprintf_unfiltered
+ (gdb_stdlog,
+ "amd64_windows_frame_decodes_insn (next in chain):"
+ " unwind_data=%s, start_rva=%s, end_rva=%s\n",
+ paddress (gdbarch, unwind_info),
+ paddress (gdbarch, cache->start_rva),
+ paddress (gdbarch, cache->end_rva));
}
/* Allow the user to break this loop. */
= (indirect_addr
? lookup_minimal_symbol_by_pc (indirect_addr).minsym
: NULL);
- const char *symname = indsym ? SYMBOL_LINKAGE_NAME (indsym) : NULL;
+ const char *symname = indsym ? MSYMBOL_LINKAGE_NAME (indsym) : NULL;
if (symname)
{
amd64_init_abi (info, gdbarch);
+ windows_init_abi (info, gdbarch);
+
/* On Windows, "long"s are only 32bit. */
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_skip_trampoline_code (gdbarch,
amd64_windows_skip_trampoline_code);
- set_gdbarch_iterate_over_objfiles_in_search_order
- (gdbarch, windows_iterate_over_objfiles_in_search_order);
-
set_gdbarch_skip_prologue (gdbarch, amd64_windows_skip_prologue);
set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset);
-
- set_solib_ops (gdbarch, &solib_target_so_ops);
}
/* -Wmissing-prototypes */