summaryrefslogtreecommitdiff
path: root/debian/patches/struct-thread_info.patch
blob: e9583b5633654627a9bcdd25f9777d6767ab02d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
From: =?utf-8?b?SMOpY3RvciBPcsOzbiBNYXJ0w61uZXo=?= <zumbi@debian.org>
Date: Wed, 20 Feb 2019 13:25:36 +0100
Subject: struct-thread_info

===================================================================
---
 gdb/breakpoint.c              |  2 +-
 gdb/infcmd.c                  |  4 ++--
 gdb/linux-tdep.c              |  2 +-
 gdb/mi/mi-main.c              |  2 +-
 gdb/progspace-and-thread.c    |  2 +-
 gdb/python/py-record-btrace.c |  8 ++++----
 gdb/remote.c                  |  6 +++---
 gdb/thread.c                  | 22 +++++++++++-----------
 8 files changed, 24 insertions(+), 24 deletions(-)

Index: gdb/gdb/breakpoint.c
===================================================================
--- gdb.orig/gdb/breakpoint.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/breakpoint.c	2019-02-22 11:33:07.552034296 +0100
@@ -12682,7 +12682,7 @@
 
 longjmp_breakpoint::~longjmp_breakpoint ()
 {
-  thread_info *tp = find_thread_global_id (this->thread);
+  struct thread_info *tp = find_thread_global_id (this->thread);
 
   if (tp != NULL)
     tp->initiating_frame = null_frame_id;
Index: gdb/gdb/infcmd.c
===================================================================
--- gdb.orig/gdb/infcmd.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/infcmd.c	2019-02-22 11:33:07.552034296 +0100
@@ -663,7 +663,7 @@
   /* Queue a pending event so that the program stops immediately.  */
   if (run_how == RUN_STOP_AT_FIRST_INSN)
     {
-      thread_info *thr = inferior_thread ();
+      struct thread_info *thr = inferior_thread ();
       thr->suspend.waitstatus_pending_p = 1;
       thr->suspend.waitstatus.kind = TARGET_WAITKIND_STOPPED;
       thr->suspend.waitstatus.value.sig = GDB_SIGNAL_0;
@@ -913,7 +913,7 @@
   set_step_info (frame, sal);
 
   CORE_ADDR pc = get_frame_pc (frame);
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
   tp->control.step_start_function = find_pc_function (pc);
 }
 
Index: gdb/gdb/linux-tdep.c
===================================================================
--- gdb.orig/gdb/linux-tdep.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/linux-tdep.c	2019-02-22 11:33:07.552034296 +0100
@@ -1654,7 +1654,7 @@
    buffer.  */
 
 static gdb::byte_vector
-linux_get_siginfo_data (thread_info *thread, struct gdbarch *gdbarch)
+linux_get_siginfo_data (struct thread_info *thread, struct gdbarch *gdbarch)
 {
   struct type *siginfo_type;
   LONGEST bytes_read;
Index: gdb/gdb/mi/mi-main.c
===================================================================
--- gdb.orig/gdb/mi/mi-main.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/mi/mi-main.c	2019-02-22 11:33:07.556034345 +0100
@@ -553,7 +553,7 @@
     error (_("-thread-select: USAGE: threadnum."));
 
   int num = value_as_long (parse_and_eval (argv[0]));
-  thread_info *thr = find_thread_global_id (num);
+  struct thread_info *thr = find_thread_global_id (num);
   if (thr == NULL)
     error (_("Thread ID %d not known."), num);
 
Index: gdb/gdb/progspace-and-thread.c
===================================================================
--- gdb.orig/gdb/progspace-and-thread.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/progspace-and-thread.c	2019-02-22 11:33:07.556034345 +0100
@@ -28,7 +28,7 @@
 
   if (inf != NULL && inf->pid != 0)
     {
-      thread_info *tp = any_live_thread_of_inferior (inf);
+      struct thread_info *tp = any_live_thread_of_inferior (inf);
 
       if (tp != NULL)
 	{
Index: gdb/gdb/python/py-record-btrace.c
===================================================================
--- gdb.orig/gdb/python/py-record-btrace.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/python/py-record-btrace.c	2019-02-22 11:33:07.556034345 +0100
@@ -72,7 +72,7 @@
 {
   const btrace_insn *insn;
   const recpy_element_object *obj;
-  thread_info *tinfo;
+  struct thread_info *tinfo;
   btrace_insn_iterator iter;
 
   if (Py_TYPE (pyobject) != &recpy_insn_type)
@@ -115,7 +115,7 @@
 {
   const btrace_function *func;
   const recpy_element_object *obj;
-  thread_info *tinfo;
+  struct thread_info *tinfo;
   btrace_call_iterator iter;
 
   if (Py_TYPE (pyobject) != &recpy_func_type)
@@ -153,7 +153,7 @@
    gdb.RecordInstruction or gdb.RecordGap object for it accordingly.  */
 
 static PyObject *
-btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number)
+btpy_insn_or_gap_new (struct thread_info *tinfo, Py_ssize_t number)
 {
   btrace_insn_iterator iter;
   int err_code;
@@ -338,7 +338,7 @@
 recpy_bt_func_level (PyObject *self, void *closure)
 {
   const btrace_function * const func = btrace_func_from_recpy_func (self);
-  thread_info *tinfo;
+  struct thread_info *tinfo;
 
   if (func == NULL)
     return NULL;
Index: gdb/gdb/remote.c
===================================================================
--- gdb.orig/gdb/remote.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/remote.c	2019-02-22 11:33:07.556034345 +0100
@@ -2403,7 +2403,7 @@
   return inf;
 }
 
-static remote_thread_info *get_remote_thread_info (thread_info *thread);
+static remote_thread_info *get_remote_thread_info (struct thread_info *thread);
 static remote_thread_info *get_remote_thread_info (ptid_t ptid);
 
 /* Add thread PTID to GDB's thread list.  Tag it as executing/running
@@ -2528,7 +2528,7 @@
 /* Return THREAD's private thread data, creating it if necessary.  */
 
 static remote_thread_info *
-get_remote_thread_info (thread_info *thread)
+get_remote_thread_info (struct thread_info *thread)
 {
   gdb_assert (thread != NULL);
 
@@ -4344,7 +4344,7 @@
   /* Add the main thread and switch to it.  Don't try reading
      registers yet, since we haven't fetched the target description
      yet.  */
-  thread_info *tp = add_thread_silent (curr_ptid);
+  struct thread_info *tp = add_thread_silent (curr_ptid);
   switch_to_thread_no_regs (tp);
 }
 
Index: gdb/gdb/thread.c
===================================================================
--- gdb.orig/gdb/thread.c	2019-02-22 11:33:07.560034396 +0100
+++ gdb/gdb/thread.c	2019-02-22 11:35:39.389924517 +0100
@@ -68,21 +68,21 @@
 class scoped_inc_dec_ref
 {
 public:
-  explicit scoped_inc_dec_ref (const std::vector<thread_info *> &thrds)
+  explicit scoped_inc_dec_ref (const std::vector<struct thread_info *> &thrds)
     : m_thrds (thrds)
   {
-    for (thread_info *thr : m_thrds)
+    for (struct thread_info *thr : m_thrds)
       thr->incref ();
   }
 
   ~scoped_inc_dec_ref ()
   {
-    for (thread_info *thr : m_thrds)
+    for (struct thread_info *thr : m_thrds)
       thr->decref ();
   }
 
 private:
-  const std::vector<thread_info *> &m_thrds;
+  const std::vector<struct thread_info *> &m_thrds;
 };
 
 
@@ -201,7 +201,7 @@
 /* Set the TP's state as exited.  */
 
 static void
-set_thread_exited (thread_info *tp, int silent)
+set_thread_exited (struct thread_info *tp, int silent)
 {
   /* Dead threads don't need to step-over.  Remove from queue.  */
   if (tp->step_over_next != NULL)
@@ -243,7 +243,7 @@
 static struct thread_info *
 new_thread (struct inferior *inf, ptid_t ptid)
 {
-  thread_info *tp = new thread_info (inf, ptid);
+  struct thread_info *tp = new struct thread_info (inf, ptid);
 
   if (inf->thread_list == NULL)
     inf->thread_list = tp;
@@ -1433,7 +1433,7 @@
    order is determined by TP_ARRAY_COMPAR_ASCENDING.  */
 
 static bool
-tp_array_compar (const thread_info *a, const thread_info *b)
+tp_array_compar (const struct thread_info *a, const struct thread_info *b)
 {
   if (a->inf->num != b->inf->num)
     {
@@ -1530,10 +1530,10 @@
 	 thread, in case the command is one that wipes threads.  E.g.,
 	 detach, kill, disconnect, etc., or even normally continuing
 	 over an inferior or thread exit.  */
-      std::vector<thread_info *> thr_list_cpy;
+      std::vector<struct thread_info *> thr_list_cpy;
       thr_list_cpy.reserve (tc);
 
-      for (thread_info *tp : all_non_exited_threads ())
+      for (struct thread_info *tp : all_non_exited_threads ())
 	thr_list_cpy.push_back (tp);
       gdb_assert (thr_list_cpy.size () == tc);
 
@@ -1545,7 +1545,7 @@
 
       scoped_restore_current_thread restore_thread;
 
-      for (thread_info *thr : thr_list_cpy)
+      for (struct thread_info *thr : thr_list_cpy)
 	if (thread_alive (thr))
 	  thr_try_catch_cmd (thr, cmd, from_tty, flags);
     }
@@ -1790,7 +1790,7 @@
 /* See gdbthread.h.  */
 
 void
-thread_select (const char *tidstr, thread_info *tp)
+thread_select (const char *tidstr, struct thread_info *tp)
 {
   if (!thread_alive (tp))
     error (_("Thread ID %s has terminated."), tidstr);