mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
2007-12-06 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c: Allow compilation if CORE_ADDR is 8 byte long. Add "gdb_stdint.h" dependency required for uintptr_t type use. (handle_output_debug_string): Use uintptr_t typecast. (handle_exception): Ditto. (win32_xfer_memory): Ditto. * Makefile.in (win32-nat.o): Add dependency to gdb_stdint header.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2007-12-06 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
|
||||||
|
* win32-nat.c: Allow compilation if CORE_ADDR is 8 byte long.
|
||||||
|
Add "gdb_stdint.h" dependency required for uintptr_t type use.
|
||||||
|
(handle_output_debug_string): Use uintptr_t typecast.
|
||||||
|
(handle_exception): Ditto.
|
||||||
|
(win32_xfer_memory): Ditto.
|
||||||
|
* Makefile.in (win32-nat.o): Add dependency to gdb_stdint header.
|
||||||
|
|
||||||
2007-12-04 Jim Blandy <jimb@codesourcery.com>
|
2007-12-04 Jim Blandy <jimb@codesourcery.com>
|
||||||
|
|
||||||
Support lexical blocks and function bodies that occupy
|
Support lexical blocks and function bodies that occupy
|
||||||
|
@ -2946,7 +2946,7 @@ win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
|
|||||||
$(regcache_h) $(top_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
|
$(regcache_h) $(top_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
|
||||||
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(solist_h) \
|
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(solist_h) \
|
||||||
$(solib_h) $(i386_tdep_h) $(i387_tdep_h) $(gdb_obstack_h) \
|
$(solib_h) $(i386_tdep_h) $(i387_tdep_h) $(gdb_obstack_h) \
|
||||||
$(xml_support_h) $(i386_cygwin_tdep_h)
|
$(xml_support_h) $(i386_cygwin_tdep_h) $(gdb_stdint_h)
|
||||||
win32-termcap.o: win32-termcap.c
|
win32-termcap.o: win32-termcap.c
|
||||||
wrapper.o: wrapper.c $(defs_h) $(value_h) $(exceptions_h) $(wrapper_h) \
|
wrapper.o: wrapper.c $(defs_h) $(value_h) $(exceptions_h) $(wrapper_h) \
|
||||||
$(ui_out_h)
|
$(ui_out_h)
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
#include "gdb_obstack.h"
|
#include "gdb_obstack.h"
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
|
#include "gdb_stdint.h"
|
||||||
#include "gdbthread.h"
|
#include "gdbthread.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -828,7 +829,8 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
|
|||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
if (!target_read_string
|
if (!target_read_string
|
||||||
((CORE_ADDR) current_event.u.DebugString.lpDebugStringData, &s, 1024, 0)
|
((CORE_ADDR) (uintptr_t) current_event.u.DebugString.lpDebugStringData,
|
||||||
|
&s, 1024, 0)
|
||||||
|| !s || !*s)
|
|| !s || !*s)
|
||||||
/* nothing to do */;
|
/* nothing to do */;
|
||||||
else if (strncmp (s, _CYGWIN_SIGNAL_STRING, sizeof (_CYGWIN_SIGNAL_STRING) - 1) != 0)
|
else if (strncmp (s, _CYGWIN_SIGNAL_STRING, sizeof (_CYGWIN_SIGNAL_STRING) - 1) != 0)
|
||||||
@ -1022,7 +1024,8 @@ handle_exception (struct target_waitstatus *ourstatus)
|
|||||||
and will be sent as a cygwin-specific-signal. So, ignore SEGVs if they show up
|
and will be sent as a cygwin-specific-signal. So, ignore SEGVs if they show up
|
||||||
within the text segment of the DLL itself. */
|
within the text segment of the DLL itself. */
|
||||||
char *fn;
|
char *fn;
|
||||||
bfd_vma addr = (bfd_vma) current_event.u.Exception.ExceptionRecord.ExceptionAddress;
|
bfd_vma addr = (bfd_vma) (uintptr_t) current_event.u.Exception.
|
||||||
|
ExceptionRecord.ExceptionAddress;
|
||||||
if ((!cygwin_exceptions && (addr >= cygwin_load_start && addr < cygwin_load_end))
|
if ((!cygwin_exceptions && (addr >= cygwin_load_start && addr < cygwin_load_end))
|
||||||
|| (find_pc_partial_function (addr, &fn, NULL, NULL)
|
|| (find_pc_partial_function (addr, &fn, NULL, NULL)
|
||||||
&& strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0))
|
&& strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0))
|
||||||
@ -1935,17 +1938,20 @@ win32_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, int len,
|
|||||||
if (write)
|
if (write)
|
||||||
{
|
{
|
||||||
DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%08lx\n",
|
DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%08lx\n",
|
||||||
len, (DWORD) memaddr));
|
len, (DWORD) (uintptr_t) memaddr));
|
||||||
if (!WriteProcessMemory (current_process_handle, (LPVOID) memaddr, our,
|
if (!WriteProcessMemory (current_process_handle,
|
||||||
|
(LPVOID) (uintptr_t) memaddr, our,
|
||||||
len, &done))
|
len, &done))
|
||||||
done = 0;
|
done = 0;
|
||||||
FlushInstructionCache (current_process_handle, (LPCVOID) memaddr, len);
|
FlushInstructionCache (current_process_handle,
|
||||||
|
(LPCVOID) (uintptr_t) memaddr, len);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_MEM (("gdb: read target memory, %d bytes at 0x%08lx\n",
|
DEBUG_MEM (("gdb: read target memory, %d bytes at 0x%08lx\n",
|
||||||
len, (DWORD) memaddr));
|
len, (DWORD) (uintptr_t) memaddr));
|
||||||
if (!ReadProcessMemory (current_process_handle, (LPCVOID) memaddr, our,
|
if (!ReadProcessMemory (current_process_handle,
|
||||||
|
(LPCVOID) (uintptr_t) memaddr, our,
|
||||||
len, &done))
|
len, &done))
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "objfiles.h"
|
#include "objfiles.h"
|
||||||
#include "gdb_obstack.h"
|
#include "gdb_obstack.h"
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
|
#include "gdb_stdint.h"
|
||||||
#include "gdbthread.h"
|
#include "gdbthread.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -828,7 +829,8 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
|
|||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
if (!target_read_string
|
if (!target_read_string
|
||||||
((CORE_ADDR) current_event.u.DebugString.lpDebugStringData, &s, 1024, 0)
|
((CORE_ADDR) (uintptr_t) current_event.u.DebugString.lpDebugStringData,
|
||||||
|
&s, 1024, 0)
|
||||||
|| !s || !*s)
|
|| !s || !*s)
|
||||||
/* nothing to do */;
|
/* nothing to do */;
|
||||||
else if (strncmp (s, _CYGWIN_SIGNAL_STRING, sizeof (_CYGWIN_SIGNAL_STRING) - 1) != 0)
|
else if (strncmp (s, _CYGWIN_SIGNAL_STRING, sizeof (_CYGWIN_SIGNAL_STRING) - 1) != 0)
|
||||||
@ -1022,7 +1024,8 @@ handle_exception (struct target_waitstatus *ourstatus)
|
|||||||
and will be sent as a cygwin-specific-signal. So, ignore SEGVs if they show up
|
and will be sent as a cygwin-specific-signal. So, ignore SEGVs if they show up
|
||||||
within the text segment of the DLL itself. */
|
within the text segment of the DLL itself. */
|
||||||
char *fn;
|
char *fn;
|
||||||
bfd_vma addr = (bfd_vma) current_event.u.Exception.ExceptionRecord.ExceptionAddress;
|
bfd_vma addr = (bfd_vma) (uintptr_t) current_event.u.Exception.
|
||||||
|
ExceptionRecord.ExceptionAddress;
|
||||||
if ((!cygwin_exceptions && (addr >= cygwin_load_start && addr < cygwin_load_end))
|
if ((!cygwin_exceptions && (addr >= cygwin_load_start && addr < cygwin_load_end))
|
||||||
|| (find_pc_partial_function (addr, &fn, NULL, NULL)
|
|| (find_pc_partial_function (addr, &fn, NULL, NULL)
|
||||||
&& strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0))
|
&& strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0))
|
||||||
@ -1935,17 +1938,20 @@ win32_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, int len,
|
|||||||
if (write)
|
if (write)
|
||||||
{
|
{
|
||||||
DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%08lx\n",
|
DEBUG_MEM (("gdb: write target memory, %d bytes at 0x%08lx\n",
|
||||||
len, (DWORD) memaddr));
|
len, (DWORD) (uintptr_t) memaddr));
|
||||||
if (!WriteProcessMemory (current_process_handle, (LPVOID) memaddr, our,
|
if (!WriteProcessMemory (current_process_handle,
|
||||||
|
(LPVOID) (uintptr_t) memaddr, our,
|
||||||
len, &done))
|
len, &done))
|
||||||
done = 0;
|
done = 0;
|
||||||
FlushInstructionCache (current_process_handle, (LPCVOID) memaddr, len);
|
FlushInstructionCache (current_process_handle,
|
||||||
|
(LPCVOID) (uintptr_t) memaddr, len);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_MEM (("gdb: read target memory, %d bytes at 0x%08lx\n",
|
DEBUG_MEM (("gdb: read target memory, %d bytes at 0x%08lx\n",
|
||||||
len, (DWORD) memaddr));
|
len, (DWORD) (uintptr_t) memaddr));
|
||||||
if (!ReadProcessMemory (current_process_handle, (LPCVOID) memaddr, our,
|
if (!ReadProcessMemory (current_process_handle,
|
||||||
|
(LPCVOID) (uintptr_t) memaddr, our,
|
||||||
len, &done))
|
len, &done))
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user