This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patches for building GDB with MinGW


I needed the following two patches to build the MinGW port of
GDB 7.3.

The first part is needed to avoid a compilation error due to
uintptr_t being undefined.

The second part, about Python initializations, was discussed
in this thread:

  http://sourceware.org/ml/gdb/2011-07/msg00107.html

Okay to commit?


gdb/gdbserver/ChangeLog:

2011-07-31  Eli Zaretskii  <eliz@gnu.org>

	* win32-low.c: Include <stdint.h>.


--- gdb/gdbserver/win32-low.c~	2011-01-01 16:33:24 +0200
+++ gdb/gdbserver/win32-low.c	2011-07-31 16:03:10 +0300
@@ -26,6 +26,7 @@
 #include "mem-break.h"
 #include "win32-low.h"
 
+#include <stdint.h>
 #include <windows.h>
 #include <winnt.h>
 #include <imagehlp.h>


gdb/ChangeLog:

2011-07-31  Eli Zaretskii  <eliz@gnu.org>

	* python/py-breakpoint.c (gdbpy_initialize_breakpoints): Move the
	initialization of the tp_new member to the corresponding
	gdbpy_initialize_* function.
	* python/py-cmd.c (gdbpy_initialize_commands): Likewise.
	* python/py-frame.c (gdbpy_initialize_frames): Likewise.
	* python/py-function.c (gdbpy_initialize_functions): Likewise.
	* python/py-inferior.c (gdbpy_initialize_inferior): Likewise.
	* python/py-param.c (gdbpy_initialize_parameters): Likewise.


--- gdb/python/py-breakpoint.c~	2011-03-14 17:09:54 +0200
+++ gdb/python/py-breakpoint.c	2011-07-31 15:48:51 +0300
@@ -861,6 +861,7 @@ gdbpy_initialize_breakpoints (void)
 {
   int i;
 
+  breakpoint_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&breakpoint_object_type) < 0)
     return;
 
@@ -1015,5 +1016,4 @@ static PyTypeObject breakpoint_object_ty
   0,				  /* tp_dictoffset */
   bppy_init,			  /* tp_init */
   0,				  /* tp_alloc */
-  PyType_GenericNew		  /* tp_new */
 };
--- gdb/python/py-cmd.c~	2011-02-28 19:55:22 +0200
+++ gdb/python/py-cmd.c	2011-07-31 15:53:22 +0300
@@ -556,6 +556,7 @@ gdbpy_initialize_commands (void)
 {
   int i;
 
+  cmdpy_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&cmdpy_object_type) < 0)
     return;
 
@@ -643,7 +644,6 @@ static PyTypeObject cmdpy_object_type =
   0,				  /* tp_dictoffset */
   cmdpy_init,			  /* tp_init */
   0,				  /* tp_alloc */
-  PyType_GenericNew		  /* tp_new */
 };
 
 
--- gdb/python/py-frame.c~	2011-04-29 10:32:40 +0300
+++ gdb/python/py-frame.c	2011-07-31 15:54:28 +0300
@@ -593,6 +593,7 @@ frapy_richcompare (PyObject *self, PyObj
 void
 gdbpy_initialize_frames (void)
 {
+  frame_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&frame_object_type) < 0)
     return;
 
@@ -702,5 +703,4 @@ static PyTypeObject frame_object_type =
   0,				  /* tp_dictoffset */
   0,				  /* tp_init */
   0,				  /* tp_alloc */
-  PyType_GenericNew		  /* tp_new */
 };
--- gdb/python/py-function.c~	2011-03-22 10:38:15 +0200
+++ gdb/python/py-function.c	2011-07-31 15:55:23 +0300
@@ -181,6 +181,7 @@ fnpy_init (PyObject *self, PyObject *arg
 void
 gdbpy_initialize_functions (void)
 {
+  fnpy_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&fnpy_object_type) < 0)
     return;
 
@@ -230,5 +231,4 @@ static PyTypeObject fnpy_object_type =
   0,				  /* tp_dictoffset */
   fnpy_init,			  /* tp_init */
   0,				  /* tp_alloc */
-  PyType_GenericNew		  /* tp_new */
 };
--- gdb/python/py-inferior.c~	2011-06-03 18:32:14 +0300
+++ gdb/python/py-inferior.c	2011-07-31 15:57:02 +0300
@@ -666,6 +666,7 @@ gdbpy_initialize_inferior (void)
   observer_attach_target_resumed (python_on_resume);
   observer_attach_inferior_exit (python_inferior_exit);
 
+  membuf_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&membuf_object_type) < 0)
     return;
 
@@ -803,5 +804,4 @@ static PyTypeObject membuf_object_type =
   0,				  /* tp_dictoffset */
   0,				  /* tp_init */
   0,				  /* tp_alloc */
-  PyType_GenericNew		  /* tp_new */
 };
--- gdb/python/py-param.c~	2011-03-10 13:29:08 +0200
+++ gdb/python/py-param.c	2011-07-31 15:58:08 +0300
@@ -743,6 +743,7 @@ gdbpy_initialize_parameters (void)
 {
   int i;
 
+  parmpy_object_type.tp_new = PyType_GenericNew;
   if (PyType_Ready (&parmpy_object_type) < 0)
     return;
 
@@ -808,5 +809,4 @@ static PyTypeObject parmpy_object_type =
   0,				  /* tp_dictoffset */
   parmpy_init,			  /* tp_init */
   0,				  /* tp_alloc */
-  PyType_GenericNew		  /* tp_new */
 };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]