OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [gdb/] [gdbserver/] [win32-low.h] - Diff between revs 157 and 223

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 157 Rev 223
/* Internal interfaces for the Win32 specific target code for gdbserver.
/* Internal interfaces for the Win32 specific target code for gdbserver.
   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 
 
   This file is part of GDB.
   This file is part of GDB.
 
 
   This program is free software; you can redistribute it and/or modify
   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
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
#include <windows.h>
#include <windows.h>
 
 
/* Thread information structure used to track extra information about
/* Thread information structure used to track extra information about
   each thread.  */
   each thread.  */
typedef struct win32_thread_info
typedef struct win32_thread_info
{
{
  /* The Win32 thread identifier.  */
  /* The Win32 thread identifier.  */
  DWORD tid;
  DWORD tid;
 
 
  /* The handle to the thread.  */
  /* The handle to the thread.  */
  HANDLE h;
  HANDLE h;
 
 
  /* Non zero if SuspendThread was called on this thread.  */
  /* Non zero if SuspendThread was called on this thread.  */
  int suspended;
  int suspended;
 
 
#ifdef _WIN32_WCE
#ifdef _WIN32_WCE
  /* The context as retrieved right after suspending the thread. */
  /* The context as retrieved right after suspending the thread. */
  CONTEXT base_context;
  CONTEXT base_context;
#endif
#endif
 
 
  /* The context of the thread, including any manipulations.  */
  /* The context of the thread, including any manipulations.  */
  CONTEXT context;
  CONTEXT context;
} win32_thread_info;
} win32_thread_info;
 
 
struct win32_target_ops
struct win32_target_ops
{
{
  /* The number of target registers.  */
  /* The number of target registers.  */
  int num_regs;
  int num_regs;
 
 
  /* Perform initializations on startup.  */
  /* Perform initializations on startup.  */
  void (*initial_stuff) (void);
  void (*initial_stuff) (void);
 
 
  /* Fetch the context from the inferior.  */
  /* Fetch the context from the inferior.  */
  void (*get_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
  void (*get_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
 
 
  /* Flush the context back to the inferior.  */
  /* Flush the context back to the inferior.  */
  void (*set_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
  void (*set_thread_context) (win32_thread_info *th, DEBUG_EVENT *current_event);
 
 
  /* Called when a thread was added.  */
  /* Called when a thread was added.  */
  void (*thread_added) (win32_thread_info *th);
  void (*thread_added) (win32_thread_info *th);
 
 
  /* Fetch register from gdbserver regcache data.  */
  /* Fetch register from gdbserver regcache data.  */
  void (*fetch_inferior_register) (win32_thread_info *th, int r);
  void (*fetch_inferior_register) (win32_thread_info *th, int r);
 
 
  /* Store a new register value into the thread context of TH.  */
  /* Store a new register value into the thread context of TH.  */
  void (*store_inferior_register) (win32_thread_info *th, int r);
  void (*store_inferior_register) (win32_thread_info *th, int r);
 
 
  void (*single_step) (win32_thread_info *th);
  void (*single_step) (win32_thread_info *th);
 
 
  const unsigned char *breakpoint;
  const unsigned char *breakpoint;
  int breakpoint_len;
  int breakpoint_len;
 
 
  /* What string to report to GDB when it asks for the architecture,
  /* What string to report to GDB when it asks for the architecture,
     or NULL not to answer.  */
     or NULL not to answer.  */
  const char *arch_string;
  const char *arch_string;
};
};
 
 
extern struct win32_target_ops the_low_target;
extern struct win32_target_ops the_low_target;
 
 
/* Map the Windows error number in ERROR to a locale-dependent error
/* Map the Windows error number in ERROR to a locale-dependent error
   message string and return a pointer to it.  Typically, the values
   message string and return a pointer to it.  Typically, the values
   for ERROR come from GetLastError.
   for ERROR come from GetLastError.
 
 
   The string pointed to shall not be modified by the application,
   The string pointed to shall not be modified by the application,
   but may be overwritten by a subsequent call to strwinerror
   but may be overwritten by a subsequent call to strwinerror
 
 
   The strwinerror function does not change the current setting
   The strwinerror function does not change the current setting
   of GetLastError.  */
   of GetLastError.  */
extern char * strwinerror (DWORD error);
extern char * strwinerror (DWORD error);
 
 
/* in wincecompat.c */
/* in wincecompat.c */
 
 
extern void to_back_slashes (char *);
extern void to_back_slashes (char *);
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.