diff options
Diffstat (limited to 'gdb/amd64-windows-tdep.c')
-rw-r--r-- | gdb/amd64-windows-tdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c index 1bec6de..4570622 100644 --- a/gdb/amd64-windows-tdep.c +++ b/gdb/amd64-windows-tdep.c @@ -30,6 +30,7 @@ #include "coff/pe.h" #include "libcoff.h" #include "value.h" +#include <algorithm> /* The registers used to pass integer arguments during a function call. */ static int amd64_windows_dummy_call_integer_regs[] = @@ -141,7 +142,7 @@ amd64_windows_store_arg_in_reg (struct regcache *regcache, gdb_assert (TYPE_LENGTH (type) <= 8); memset (buf, 0, sizeof buf); - memcpy (buf, valbuf, min (TYPE_LENGTH (type), 8)); + memcpy (buf, valbuf, std::min (TYPE_LENGTH (type), (unsigned int) 8)); regcache_cooked_write (regcache, regno, buf); } @@ -1143,7 +1144,7 @@ amd64_windows_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) else if (target_read_memory (image_base + unwind_info, (gdb_byte *) &ex_ui, sizeof (ex_ui)) == 0 && PEX64_UWI_VERSION (ex_ui.Version_Flags) == 1) - return max (pc, image_base + start_rva + ex_ui.SizeOfPrologue); + return std::max (pc, image_base + start_rva + ex_ui.SizeOfPrologue); } /* See if we can determine the end of the prologue via the symbol @@ -1155,7 +1156,7 @@ amd64_windows_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) = skip_prologue_using_sal (gdbarch, func_addr); if (post_prologue_pc != 0) - return max (pc, post_prologue_pc); + return std::max (pc, post_prologue_pc); } return pc; |