]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/testsuite/gdb.base/long_long.exp: Fix ARM EABI target
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b1fbec62
GB
12013-06-04 Gary Benson <gbenson@redhat.com>
2
3 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4 to qSupported response when appropriate.
5 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6 with nonzero-length annex.
7 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8 arguments supplied in annex.
9
d1ec4ce7
DE
102013-05-31 Doug Evans <dje@google.com>
11
ac44adcb 12 PR server/15594
d1ec4ce7
DE
13 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14 64 bits in 64-cross-32 environment.
15
9b25f2d3
PA
162013-05-28 Pedro Alves <palves@redhat.com>
17
18 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
19 (aarch64-without-fpu.c): Delete rule.
20 * configure.srv (aarch64*-*-linux*): Remove references to
21 aarch64-without-fpu.o and aarch64-without-fpu.xml.
22 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
23 declaration.
24
6740dc9c
PA
252013-05-24 Pedro Alves <palves@redhat.com>
26
27 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
28 instead of strchr/decode_address. Error if the range isn't split
29 with a ','. Don't assume there's be a ':' in the action.
30
c2d6af84
PA
312013-05-23 Yao Qi <yao@codesourcery.com>
32 Pedro Alves <palves@redhat.com>
33
34 * linux-low.c (lwp_in_step_range): New function.
35 (linux_wait_1): If the thread was range stepping and stopped
36 outside the stepping range, report the stop to GDB. Otherwise,
37 continue stepping. Add range stepping debug output.
38 (linux_set_resume_request): Copy the step range from the resume
39 request to the lwp.
40 (linux_supports_range_stepping): New.
41 (linux_target_ops) <supports_range_stepping>: Set to
42 linux_supports_range_stepping.
43 * linux-low.h (struct linux_target_ops)
44 <supports_range_stepping>: New field.
45 (struct lwp_info) <step_range_start, step_range_end>: New fields.
46 * linux-x86-low.c (x86_supports_range_stepping): New.
47 (the_low_target) <supports_range_stepping>: Set to
48 x86_supports_range_stepping.
49 * server.c (handle_v_cont): Handle 'r' action.
50 (handle_v_requests): Append ";r" if the target supports range
51 stepping.
52 * target.h (struct thread_resume) <step_range_start,
53 step_range_end>: New fields.
54 (struct target_ops) <supports_range_stepping>:
55 New field.
56 (target_supports_range_stepping): New macro.
57
58794e1a
JB
582013-05-17 Joel Brobecker <brobecker@adacore.com>
59
60 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
61 confusion in comment.
62
d631c5a7
JB
632013-05-17 Joel Brobecker <brobecker@adacore.com>
64
65 * lynx-low.c (struct process_info_private): New type.
66 (lynx_add_process): New function.
67 (lynx_create_inferior, lynx_attach): Replace calls to
68 add_process by calls to lynx_add_process.
69 (lynx_resume): If PTID is null, then try using
70 current_process()->private->last_wait_event_ptid.
71 Add comments.
72 (lynx_clear_inferiors): Delete. The contents of that function
73 has been inlined in lynx_mourn;
74 (lynx_wait_1): Save the ptid in the process's private data.
75 (lynx_mourn): Free the process' private data. Replace call
76 to lynx_clear_inferiors by call to clear_inferiors.
77
96f7a20f
YQ
782013-05-17 Yao Qi <yao@codesourcery.com>
79
80 * i386-low.c (i386_length_and_rw_bits): Move the comment to
81 the right place.
82
db0dfaa0
LM
832013-05-16 Luis Machado <lgustavo@codesourcery.com>
84
85 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
86 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
87 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
88 PT_TEXT_END_ADDR guards. Update comments.
89 (linux_target_op) <read_offsets>: Conditionally define to
90 linux_read_offsets if the target is UCLIBC and if it defines
91 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
92
68f5f838
SL
932013-05-06 Sandra Loosemore <sandra@codesourcery.com>
94 Andrew Jenner <andrew@codesourcery.com>
95
96 * Makefile.in (SFILES): Add linux-nios2-low.c.
97 (clean): Add action to delete nios2-linux.c.
98 (nios2-linux.c): New rule.
99 * configure.srv: Add nios2*-*-linux*.
100 * linux-nios2-low.c: New.
101
1ebff1fd
HAQ
1022013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
103
104 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
105
f6150862
HZ
1062013-04-25 Hui Zhu <hui@codesourcery.com>
107
108 PR gdb/15186
f6150862
HZ
109 * ax.c (ax_printf): Add fflush.
110
614c279d
TT
1112013-04-22 Tom Tromey <tromey@redhat.com>
112
113 * Makefile.in (SFILES): Add filestuff.c.
114 (OBS): Add filestuff.o.
115 (filestuff.o): New target.
116 * config.in, configure: Rebuild.
117 * configure.ac: Check for fdwalk, pipe2.
118
7d4e5717
PA
1192013-04-17 Pedro Alves <palves@redhat.com>
120
121 * configure.ac (USE_THREAD_DB): Delete variable.
122 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
123 Don't AC_SUBST USE_THREAD_DB.
124 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
125 * config.in, configure: Regenerate.
126
d5c93e41
PA
1272013-04-16 Pedro Alves <palves@redhat.com>
128
129 * linux-low.h (struct lwp_info) <thread_known>: Move under
130 the USE_THREAD_DB #ifdef.
131
04f5fe89
PA
1322013-04-16 Pedro Alves <palves@redhat.com>
133
134 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
135 (linux-low.o): Delete rule.
136 * linux-low.h: Always include "gdb_thread_db.h" instead of
137 conditionally including thread_db.h.
138 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
139 HAVE_THREAD_DB_H.
140
480b27bf
JK
1412013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
142
143 * Makefile.in (install-only): Fix make install regression.
144
43662968
JK
1452013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
146
147 Convert man pages to texinfo, new gdbinit.5 texinfo page.
148 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
149 installation.
150 * gdbserver.1: Remove.
151
3e74e146
PA
1522013-03-22 Pedro Alves <palves@redhat.com>
153
154 * linux-low.c (handle_extended_wait): Don't call
155 linux_enable_event_reporting.
156
a8347a2a
TT
1572013-03-15 Tony Theodore <tonyt@logyst.com>
158
159 PR build/9098:
160 * Makefile.in (SHELL): Use @SHELL@.
161
eeb56fa7
SDJ
1622013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
163
164 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
165 compiler warning.
166
4fa7e2ff
JB
1672013-03-13 Joel Brobecker <brobecker@adacore.com>
168
169 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
170 Remove extraneous NULL element.
171
8ddb1965
YQ
1722013-03-13 Yao Qi <yao@codesourcery.com>
173
174 * tracepoint.c (traceframe_read_tsv): Look for the last matched
175 'V' block in trace frame.
176
9accd112
MM
1772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
178
179 * target.h (struct target_ops): Add btrace ops.
180 (target_supports_btrace): New macro.
181 (target_enable_btrace): New macro.
182 (target_disable_btrace): New macro.
183 (target_read_btrace): New macro.
184 * gdbthread.h (struct thread_info): Add btrace field.
185 * server.c: Include btrace-common.h.
186 (handle_btrace_general_set): New function.
187 (handle_btrace_enable): New function.
188 (handle_btrace_disable): New function.
189 (handle_general_set): Call handle_btrace_general_set.
190 (handle_qxfer_btrace): New function.
191 (struct qxfer qxfer_packets[]): Add btrace entry.
192 * inferiors.c (remove_thread): Disable btrace.
193 * linux-low: Include linux-btrace.h.
194 (linux_low_enable_btrace): New function.
195 (linux_low_read_btrace): New function.
196 (linux_target_ops): Add btrace ops.
197 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
198 Add srv_linux_btrace=yes.
199 (x86_64-*-linux*): Add linux-btrace.o.
200 Add srv_linux_btrace=yes.
201 * configure.ac: Define HAVE_LINUX_BTRACE.
202 * config.in: Regenerated.
203 * configure: Regenerated.
204
5cc22e4c
MM
2052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
206
207 * server.c (handle_qxfer): Preserve error message if -3 is
208 returned.
209 (qxfer): Document the -3 return value.
210
7c97f91e
MM
2112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
212
213 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
214 (linux_btrace_h): New variable.
215 (linux-btrace.o): New rule.
216
be9a119c 2172013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
218 Hafiz Abid Qadeer <abidh@codesourcery.com>
219
220 * tracepoint.c (trace_buffer_size): New global.
221 (DEFAULT_TRACE_BUFFER_SIZE): New define.
222 (init_trace_buffer): Change to one-argument function. Allocate
223 trace buffer memory.
224 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
225 handle QTBuffer:size packet.
226 (cmd_bigqtbuffer_size): New function.
227 (initialize_tracepoint): Call init_trace_buffer with
228 DEFAULT_TRACE_BUFFER_SIZE.
229 * server.c (handle_query): Add QTBuffer:size in the
230 supported packets.
231
e64f7499
YQ
2322013-03-07 Yao Qi <yao@codesourcery.com>
233
234 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
235 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
236 of -1.
237 (cmd_qtsp): Adjust condition. Do post increment.
238 Set cur_action and cur_step_action back to 0.
239
f0ae6fc3
PA
2402013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
241
242 PR server/15236
243 * linux-low.c (linux_write_memory): Return early success if LEN is
244 zero.
245
b5b0b0af
CV
2462013-03-05 Corinna Vinschen <vinschen@redhat.de>
247
334ad4a8 248 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 249
589bc927
TT
2502013-02-28 Tom Tromey <tromey@redhat.com>
251
252 * configure.ac: Invoke AC_SYS_LARGEFILE.
253 * configure, config.in: Rebuild.
254
dfe07582
CV
2552013-02-28 Corinna Vinschen <vinschen@redhat.com>
256
257 * win32-low.c: Throughout, fix format strings and casts of
258 printf-like functions to avoid type related warnings on all
259 platforms.
260 (get_child_debug_event): Print dwDebugEventCode as hex since
261 that's how it's usually documented.
262
736cd585
YQ
2632013-02-28 Yao Qi <yao@codesourcery.com>
264
265 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
266 pulongest.
267
e1f58301
JW
2682013-02-27 Jiong Wang <jiwang@tilera.com>
269
270 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
271 (reg-tilegx32.c): New rule.
272 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
273 * linux-tile-low.c (tile_arch_setup): New function. Invoke
274 different register info initializer according to elf class.
275 (init_registers_tilgx32): New function. The tilegx32 register info
276 initializer.
277 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
278 (tile_store_gregset): Likewise.
279
d171ca78
YQ
2802013-02-27 Yao Qi <yao@codesourcery.com>
281
282 * server.c (process_point_options): Print debug message when
283 debug_threads is true.
284
282bbdf3
YQ
2852013-02-26 Yao Qi <yao@codesourcery.com>
286
287 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
288
aca22551
PA
2892013-02-19 Pedro Alves <palves@redhat.com>
290 Kai Tietz <ktietz@redhat.com>
291
292 PR gdb/15161
293
294 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
295 instead of strtoul to extract address from packet.
296 (process_serial_event) <'z'>: Likewise.
297
4f3cee1c
YQ
2982013-02-18 Yao Qi <yao@codesourcery.com>
299
300 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
301
8e1d55a3
PA
3022013-02-14 Pedro Alves <palves@redhat.com>
303
304 Plug memory leak.
305
306 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
307 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
308
458820da
PA
3092013-02-14 Pedro Alves <palves@redhat.com>
310
311 * tracepoint.c (cmd_qtdpsrc): Use savestring.
312
baea0dae
PA
3132013-02-14 Pedro Alves <palves@redhat.com>
314
315 * tracepoint.c (save_string): Delete.
316 (add_tracepoint_action): Use savestring instead of save_string.
317
0b1afbb3
PA
3182013-02-12 Pedro Alves <palves@redhat.com>
319
320 * linux-xtensa-low.c: Ditto.
321 * xtensa-xtregs.c: Ditto.
322
8a4ac37e
PA
3232013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
324
325 * thread-db.c (thread_db_get_tls_address): NULL pointer check
326 thread_db.
327
148de6bb
MS
3282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
329
330 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
331 aarch64_num_wp_regs and aarch64_num_bp_regs to
332 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
333
55fac6e0
MS
3342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
335
336 * linux-aarch64-low.c (ps_get_thread_area): Replace
337 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
338
176eb98c
MS
3392013-02-04 Jim MacArthur <jim.macarthur@arm.com>
340 Marcus Shawcroft <marcus.shawcroft@arm.com>
341 Nigel Stephens <nigel.stephens@arm.com>
342 Yufeng Zhang <yufeng.zhang@arm.com>
343
344 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
345 (aarch64.c, aarch64-without-fpu.c): New targets.
346 * configure.srv (aarch64*-*-linux*): New.
347 * linux-aarch64-low.c: New file.
348
56f7af9c
MS
3492013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
350
43aaf8b6 351 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
352 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
353 (dequeue_one_deferred_signal, linux_resume_one_thread)
354 (fetch_register, linux_write_memory, linux_enable_event_reporting)
355 (linux_tracefork_grandchild, linux_test_for_tracefork)
356 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
357 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
358 where the argument is 0.
359
60f662b0
YQ
3602013-01-25 Yao Qi <yao@codesourcery.com>
361
362 * event-loop.c: Include "queue.h".
363 (gdb_event_p): New typedef.
364 (struct gdb_event) <next_event>: Remove.
365 (event_queue): Change to QUEUE(gdb_event_p).
366 (async_queue_event): Remove.
367 (gdb_event_xfree): New.
368 (initialize_event_loop): New.
369 (process_event): Use API from QUEUE.
370 (wait_for_event): Likewise.
371 * server.c (main): Call initialize_event_loop.
372 * server.h (initialize_event_loop): Declare.
373
5ae4861a
YQ
3742013-01-18 Yao Qi <yao@codesourcery.com>
375
376 * ax.h (struct eval_agent_expr_context): New.
377 (gdb_eval_agent_expr): Update declaration.
378 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
379 TFRAME. Add new argument CTX.
380 * server.h (struct eval_agent_expr_context): Declare.
381 (agent_mem_read, agent_tsv_read): Update declaration.
382 (agent_mem_read_string): Likewise.
383 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
384 (add_traceframe_block): Add new argument TPOINT.
385 Increase TPOINT->traceframe_usage.
386 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
387 eval_tracepoint_agent_expr.
388 (condition_true_at_tracepoint): Likewise.
389 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
390 (agent_mem_read_string, agent_tsv_read): Likewise.
391
85e00e85
YQ
3922013-01-16 Yao Qi <yao@codesourcery.com>
393
394 * linux-low.c (linux_resume_one_lwp): Don't check
395 'lwp->bp_reinsert != 0'.
396
4039cf45
JB
3972013-01-07 Joel Brobecker <brobecker@adacore.com>
398 Pedro Alves <palves@redhat.com>
399
400 * lynx-low.c (ptrace_request_to_str): Define a temporary
401 macro and use it to simplify this function's implementation.
402
9044dee2
JB
4032013-01-07 Joel Brobecker <brobecker@adacore.com>
404
405 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
406 sets errno.
407
e6352c8f
JB
4082013-01-07 Joel Brobecker <brobecker@adacore.com>
409
410 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
411
50681a27
JB
4122013-01-07 Joel Brobecker <brobecker@adacore.com>
413
414 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
415
3f6e77ef
JB
4162013-01-07 Joel Brobecker <brobecker@adacore.com>
417
418 * lynx-low.c (lynx_resume): Use the resume_info parameter
419 to determine the ptid for the lynx_ptrace call, unless
420 it is equal to minus_one_ptid, in which case we use the
421 ptid of the current_inferior.
422 (lynx_wait_1): After having received a thread create/exit
423 event, resume the inferior's execution using the signaling
424 thread's ptid, rather than the old ptid.
425
7fda33ae
JB
4262013-01-07 Joel Brobecker <brobecker@adacore.com>
427
428 * lynx-low.c (lynx_resume): Delete variable ret.
429
b9786c74
JB
4302013-01-01 Joel Brobecker <brobecker@adacore.com>
431
432 * gdbreplay.c (gdbreplay_version): Update copyright year.
433 * server.c (gdbserver_version): Likewise.
434
8b93d60f
JB
4352012-12-17 Joel Brobecker <brobecker@adacore.com>
436
437 * lynx-low.c (lynx_wait_1): Add debug trace before adding
438 new thread.
439
037335a7
JB
4402012-12-17 Joel Brobecker <brobecker@adacore.com>
441
442 * lynx-low.c (ptrace_request_to_str): Add handling for
443 PTRACE_GETTRACESIG.
444
52d4cbd8
JB
4452012-12-17 Joel Brobecker <brobecker@adacore.com>
446
447 * lynx-low.c (lynx_attach): Delete variable new_process.
448
ab8f6ca9
JB
4492012-12-17 Joel Brobecker <brobecker@adacore.com>
450
451 * lynx-low.c (lynx_create_inferior): Delete variable
452 new_process.
453
78cbc024
JB
4542012-12-17 Joel Brobecker <brobecker@adacore.com>
455
456 * lynx-low.c (ptrace_request_to_str): Do not handle
457 PTRACE_GETTHREADLIST if this macro does not exist.
458
14a00470
YQ
4592012-12-15 Yao Qi <yao@codesourcery.com>
460
461 * Makefile.in (OBS): Add notif.o.
462 * notif.c, notif.h: New.
463 * server.c: Include "notif.h".
464 (struct vstop_notif) <next>: Remove.
465 <base>: New field.
466 (queue_stop_reply): Update.
467 (push_event, send_next_stop_reply): Remove.
468 (discard_queued_stop_replies): Update.
469 (notif_stop): New variable.
470 (handle_v_stopped): Remove.
471 (handle_v_requests): Don't call handle_v_stopped. Call
472 handle_ack_notif instead.
473 (queue_stop_reply_callback): Call notif_event_enque instead
474 of queue_stop_reply.
475 (handle_status): Don't call send_next_stop_reply, call
476 notif_write_event instead.
477 (kill_inferior_callback): Likewise.
478 (detach_or_kill_inferior_callback): Likewise.
479 (main): Call initialize_notif.
480 (process_serial_event): Call QUEUE_is_empty.
481 (handle_target_event): Call notif_push instead of push event.
482 * server.h (push_event): Remove declaration.
483
61c125b9
TT
4842012-12-10 Tom Tromey <tromey@redhat.com>
485
486 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
487 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
488 macros.
489 (.c.o): Rewrite.
490 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
491 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
492 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
493 (amd64-linux-ipa.o, ax.o): Rewrite.
494 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
495 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
496 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
497 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
498 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
499 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
500 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
501 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
502 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
503 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
504 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
505 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
506 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
507 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
508 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
509 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
510 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
511 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
512 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
513 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
514 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
515 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
516 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
517 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
518 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
519 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
520 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
521 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
522 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
523 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
524 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
525 (reg-tilegx.o): Remove.
526 (all_object_files): New macro.
527 Include .deps files.
528 * aclocal.m4, configure: Rebuild.
529 * acinclude.m4: Include depstand.m4, lead-dot.m4.
530 * configure.ac: Invoke ZW_CREATE_DEPDIR,
531 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
532
e90e9ad9
TT
5332012-12-05 Tom Tromey <tromey@redhat.com>
534
535 PR gdb/14917:
536 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
537
02d403bf 5382012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
539
540 * configure.ac: Check for linux/perf_event.h.
541 * config.in: Regenerated.
542 * configure: Regenerated.
543
0270a750
PA
5442012-11-26 Maxime Villard <rustyBSD@gmx.fr>
545
546 * hostio.c (handle_readlink): Decrease buffer size
547 parameter passed to readlink by one byte.
548
8c29b58e
YQ
5492012-11-26 Yao Qi <yao@codesourcery.com>
550
551 * configure.ac (build_warnings): Append '-Wempty-body'.
552 * configure: Regenerated.
553 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
554 body.
555
8bdce1ff
PM
5562012-11-15 Pierre Muller <muller@sourceware.org>
557
558 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
559 * config.in: Regenerate.
560 * configure: Regenerate.
561 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
562 Use "gdb_wait.h" header instead of <sys/wait.h> header.
563 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
564 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
565 header.
566 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
567 instead of <sys/wait.h> header.
568 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
569
02d403bf 5702012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
571
572 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
573 (various make rules): Remove -DGDBSERVER
574
fbd5db48
YQ
5752012-11-09 Yao Qi <yao@codesourcery.com>
576
577 * spu-low.c (current_ptid): Move it to ..
578 * gdbthread.h: ... here. New.
579 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
580 * server.c (myresume, process_serial_event): Likewise.
581 * thread-db.c (thread_db_find_new_threads): Likewise.
582 * tracepoint.c (run_inferior_command): Likewise.
583
b3dc46ff
AB
5842012-10-01 Andrew Burgess <aburgess@broadcom.com>
585
586 * server.c (handle_search_memory_1): Include access length in
587 warning message.
588
07c04788
HPN
5892012-09-05 Michael Brandt <michael.brandt@axis.com>
590
591 * linux-crisv32-low.c: Fix compile errors.
592
918d227b
YQ
5932012-09-04 Yao Qi <yao@codesourcery.com>
594
595 * tracepoint.c (cmd_qtsv): Adjust debug message.
596 Don't check CUR_TPOINT.
597
18c1b81a
YQ
5982012-08-28 Yao Qi <yao@codesourcery.com>
599
600 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
601 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
602 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
603 Remove declarations of xmalloc, xreallloc, xstrdup and
604 freeargv.
605 * Makefile.in (libiberty_h): New.
606 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
607 (linux-bfin-low.o): Append dependency 'libiberty.h'.
608
dc82f37b
YQ
6092012-08-23 Yao Qi <yao@codesourcery.com>
610
611 * server.h: Remove declaration of 'xsnprintf'.
612
406b1477
KS
6132012-08-22 Keith Seitz <keiths@redhat.com>
614
615 * server.h: Include build-gnulib-gbserver/config.h.
616 * gdbreplay.c: Likewise.
617
e6712ff1
DE
6182012-08-08 Doug Evans <dje@google.com>
619
620 * Makefile.in (SFILES): Add gdb_vecs.c.
621 (OBS): Add gdb_vecs.o.
622 (gdb_vecs_h, host_defs_h): New variables.
623 (thread-db.o): Add $(gdb_vecs_h) dependency.
624 (gdb_vecs.o): New rule.
625 * thread-db.c: #include "gdb_vecs.h".
626 (thread_db_load_search): Use a vector to iterate over path elements.
627 Handle text appearing after "$pdir".
628
629 * configure.ac: Add check for strstr.
630 * config.in: Regenerate.
631 * configure: Regenerate.
632
7c3270ae
UW
6332012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
634
635 * hostio.c (handle_pread): If pread fails, fall back to attempting
636 lseek/read.
637 (handle_pwrite): Likewise for pwrite.
638
b62e2b27
UW
6392012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
640
641 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
642 between unsupported TYPE and unimplementable ADDR/LEN combination.
643 (arm_insert_point): Act on new return value.
644
78a99e91
PA
6452012-07-31 Pedro Alves <palves@redhat.com>
646
647 * server.c (process_point_options): Only skip tokens if we find
648 one that is unrecognized. Don't treat 'X' specially while
649 skipping unrecognized tokens.
650
fcf303ab
UW
6512012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
652
653 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
654 to 4-byte-align HW breakpoint addresses for Thumb.
655
7255706c
YQ
6562012-07-27 Yao Qi <yao@codesourcery.com>
657
658 PR remote/14161.
659
660 * server.h: Declare gdb_agent_about_to_close.
661 * target.c (kill_inferior): Include "agent.h".
662 New. Send command 'kill'.
663 * target.h (kill_inferior): Removed macro.
664 * tracepoint.c (gdb_agent_about_to_close): New.
665 (gdb_agent_helper_thread): Handle command 'close'.
666 Wait endlessly until the inferior stops.
667 Install gdb_agent_remove_socket to atexit hook.
668 (agent_socket_name): New static variable.
669 (gdb_agent_socket_init): Replace local variable 'name' with
670 'agent_socket_name'.
671 (gdb_agent_remove_socket): New.
672
5a3f286f
YQ
6732012-07-27 Yao Qi <yao@codesourcery.com>
674
675 * server.c (process_point_options): Stop at 'X' when parsing.
676
961bd387
ME
6772012-07-19 Michael Eager <eager@eagercon.com>
678
679 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
680 to hw_execute.
681 * linux-x86-low.c (x86_insert_point, x86_remove_point):
682 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
683 hardware breakpoint.
684
aa7c7447
JK
6852012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
686
687 * gdbserver/linux-low.c (initialize_low): Call
688 linux_ptrace_init_warnings.
689
7f216e7c
DE
6902012-07-02 Doug Evans <dje@google.com>
691
692 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
693 pointer to int.
694
d3ce09f5
SS
6952012-07-02 Stan Shebs <stan@codesourcery.com>
696
697 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
698 (ax.o): Add it to build rule.
699 (ax-ipa.o): Ditto.
700 (OBS): Add format.o.
701 (IPA_OBS): Add format.o.
702 * server.c (handle_query): Claim support for breakpoint commands.
703 (process_point_options): Add command case.
704 (process_serial_event): Leave running if there are printfs in
705 effect.
706 * mem-break.h (any_persistent_commands): Declare.
707 (add_breakpoint_commands): Declare.
708 (gdb_no_commands_at_breakpoint): Declare.
709 (run_breakpoint_commands): Declare.
710 * mem-break.c (struct point_command_list): New struct.
711 (struct breakpoint): New field command_list.
712 (any_persistent_commands): New function.
713 (add_commands_to_breakpoint): New function.
714 (add_breakpoint_commands): New function.
715 (gdb_no_commands_at_breakpoint): New function.
716 (run_breakpoint_commands): New function.
717 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
718 locally.
719 * ax.c: Include format.h.
720 (ax_printf): New function.
721 (gdb_eval_agent_expr): Add printf opcode.
722
2f8f6aed
YQ
7232012-06-13 Yao Qi <yao@codesourcery.com>
724
725 * server.c (start_inferior): Remove duplicated writes to fields
726 'last_resume_kind' and 'last_status' of 'current_inferior'.
727
0c9070b3
YQ
7282012-06-12 Yao Qi <yao@codesourcery.com>
729 Pedro Alves <palves@redhat.com>
730
731 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
732 comment.
733 * server.c (handle_v_cont): Extend comment.
734
c52daf70
YQ
7352012-06-11 Yao Qi <yao@codesourcery.com>
736
737 * linux-low.c (linux_attach): Add 'static'.
738
d38bbb0a
YQ
7392012-06-06 Yao Qi <yao@codesourcery.com>
740
741 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
742
89dc0afd
JK
7432012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
744
745 Fix gcc -flto compilation warning.
746 * server.c (main): Make variable multi_mode and attach volatile.
747
75f62ce7
TJB
7482012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
749
750 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
751 if the platform doesn't know about it.
752
65f479b6
PA
7532012-05-30 Jeff Kenton <jkenton@tilera.com>
754
755 * Makefile.in (SFILES): Add linux-tile-low.c.
756 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
757 * configure.srv: Handle tilegx-*-linux*.
758 * linux-tile-low.c: New file.
759
0c5bf5a9
JK
7602012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
761
762 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
763
a493e3e2
PA
7642012-05-24 Pedro Alves <palves@redhat.com>
765
766 PR gdb/7205
767
43aaf8b6 768 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 769
2ea28649
PA
7702012-05-24 Pedro Alves <palves@redhat.com>
771
772 PR gdb/7205
773
774 Replace target_signal with gdb_signal throughout.
775
8d409d16
MR
7762012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
777
778 * linux-low.c (linux_store_registers): Avoid the copying sequence
779 when no data has been retrieved by ptrace.
780
23512c01
MGD
7812012-05-22 Will Deacon <will.deacon@arm.com>
782
783 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
784 Include asm/ptrace.h.
785 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
786 already defined.
787
4934b29e
MR
7882012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
789
790 * linux-low.c (linux_store_registers): Don't re-retrieve data
791 with ptrace that has already been obtained from /proc. Always
792 copy any data retrieved with ptrace to the buffer supplied.
793
bde24c0a
PA
7942012-05-11 Yao Qi <yao@codesourcery.com>
795 Pedro Alves <palves@redhat.com>
796
797 * linux-low.c (enum stopping_threads_kind): New.
798 (stopping_threads): Change type to `enum stopping_threads_kind'.
799 (handle_extended_wait): If stopping and suspending threads, leave
800 the new_lwp suspended too.
801 (linux_wait_for_event): Adjust.
802 (stop_all_lwps): Set `stopping_threads' to
803 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
804 whether we're suspending threads or just stopping them. Assert no
805 recursion happens.
806
623b6bdf
YQ
8072012-04-29 Yao Qi <yao@codesourcery.com>
808
809 * server.h: Move some code to ...
810 * gdbthread.h: ... here. New.
811 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
812 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
813 (nto-low.o, win32-low.o): Likewise.
814 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
815 * regcache.c, remote-utils.c, server.c: Likewise.
816 * target.c, tracepoint.c, win32-low.c: Likewise.
817
f15f9948
TJB
8182012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
819
820 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
821 (PTRACE_ARG4_TYPE): Likewise.
822 (PTRACE_XFER_TYPE): Likewise.
823 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
824 ptrace to PTRACE_ARG3_TYPE.
825 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
826 (PTRACE_ARG4_TYPE): Likewise.
827 (PTRACE_XFER_TYPE): Likewise.
828 (linux_detach_one_lwp): Cast fourth argument of
829 ptrace to long then PTRACE_ARG4_TYPE.
830 (regsets_fetch_inferior_registers): Cast third argument of
831 ptrace to long then PTRACE_ARG3_TYPE.
832 (regsets_store_inferior_registers): Likewise.
833
38ea300a
PA
8342012-04-20 Pedro Alves <palves@redhat.com>
835
836 * configure: Regenerate.
837
c971b7fa
PA
8382012-04-19 Pedro Alves <palves@redhat.com>
839
43aaf8b6 840 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 841 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
842 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
843 (all, install-only, uninstall, clean-info, all-lib, clean): No
844 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
845 (maintainer-clean realclean distclean): Use subdir_do.
846 (subdir_do): New.
847 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 848 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
849 * acinclude.m4: Include acx_configure_dir.m4.
850 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
851 calls. Call AC_PROG_RANLIB. Configure gnulib using
852 ACX_CONFIGURE_DIR.
853 (GNULIB): New.
854 (GNULIB_STDINT_H): Adjust.
855 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
856 * gdbreplay.c: Include build-gnulib/config.h.
857 * server.h: Likewise.
858 * aclocal.m4: Regenerate.
859 * config.in: Regenerate.
860 * configure: Regenerate.
c971b7fa 861
809277f8
PA
8622012-04-19 Pedro Alves <palves@redhat.com>
863
864 * Makefile.in (LIBGNU, INCGNU): Adjust.
865 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
866 (all, install-only, uninstall, clean-info, all-lib, clean)
867 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
868 * configure.ac: Adjust AC_OUTPUT output.
869 * aclocal.m4: Regenerate.
870 * configure: Regenerate.
871
fd9bb8b8
PA
8722012-04-19 Pedro Alves <palves@redhat.com>
873
874 * Makefile.in (generated_files): New.
875 (server_h): Remove the explicit dependency on config.h, and depend
876 on $generated_files.
877
1c298c66
PA
8782012-04-19 Pedro Alves <palves@redhat.com>
879
880 * Makefile.in (INCGNU): Add -Ignulib.
881
57c4b50b
PA
8822012-04-19 Pedro Alves <palves@redhat.com>
883
884 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
885 (INCGNU): ... this, and spell out -I here.
886 (GNULIB_LIB): Rename to ...
887 (LIBGNU): ... this.
888 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
889
1030e047
PA
8902012-04-19 Pedro Alves <palves@redhat.com>
891
892 * config.in: Regenerate.
893
447d4319
PA
8942012-04-19 Pedro Alves <palves@redhat.com>
895
896 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
897 * server.h (memmem): Remove declaration.
898 * config.in: Regenerate.
899 * configure: Regenerate.
900
aad9eab9
YQ
9012012-04-19 Yao Qi <yao@codesourcery.com>
902
903 * Makefile.in (SFILES): Add common/vec.c.
904 (OBS): Add vec.o.
905 (vec.o): New rule.
906
3e10640f
YQ
9072012-04-19 Yao Qi <yao@codesourcery.com>
908
909 * remote-utils.c (prepare_resume_reply): Replace with macro
910 target_core_of_thread.
911 * server.c (handle_qxfer_threads_proper): Likewise.
912 * target.h (traget_core_of_thread): New macro.
913
71622373
PA
9142012-04-18 Pedro Alves <palves@redhat.com>
915
916 * aclocal.m4: Regenerate.
917 * configure: Regenerate.
918
80d26939
YQ
9192012-04-16 Yao Qi <yao@codesourcery.com>
920
921 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
922 duplicated on address.
923
42476b70
YQ
9242012-04-16 Yao Qi <yao@codesourcery.com>
925
926 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
927 (struct tracepoint_action_ops) <send>: New field.
928 (m_tracepoint_action_send, r_tracepoint_action_send): New.
929 (agent_expr_send, x_tracepoint_action_send): New.
930 (l_tracepoint_action_send): New.
931 (cmd_qtdp): Download and install tracepoint
932 according to `use_agent'.
933 (run_inferior_command): Add one more parameter `len'.
934 Update callers.
935 (tracepoint_send_agent): New.
936 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
937
7bc83639
YQ
9382012-04-16 Yao Qi <yao@codesourcery.com>
939
940 * tracepoint.c (download_tracepoints): Moved to ...
941 (cmd_qtstart): ... here.
942
5f18041e
YQ
9432012-04-14 Yao Qi <yao@codesourcery.com>
944
945 * tracepoint.c: Include inttypes.h.
946 (struct collect_memory_action): Use sized types.
947 (struct tracepoint): Likewise.
948 (cmd_qtdp, stop_tracing): Update print specifiers.
949 (cmd_qtp, response_tracepoint): Likewise.
950 (collect_data_at_tracepoint): Likewise.
951 (collect_data_at_step): Likewise.
952
55a8c076
YQ
9532012-04-14 Yao Qi <yao@codesourcery.com>
954
955 Import gnulib module inttypes.
956 * aclocal.m4, config.in, configure: Regenerated.
957
dc750257
YQ
9582012-04-14 Yao Qi <yao@codesourcery.com>
959
960 * Makefile.in (maintainer-clean, realclean, distclean): Remove
961 Makefile and config.status at last.
962
0ab5faf9
YQ
9632012-04-13 Yao Qi <yao@codesourcery.com>
964
965 * tracepoint.c: Include stdint.h unconditionally.
966
18f5fd81
TJB
9672012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
968
969 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
970 on BFD_HAVE_SYS_PROCFS_TYPE.
971 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
972 * configure: Regenerate.
973 * config.in: Likewise.
974
4d47af5c
L
9752012-04-13 H.J. Lu <hongjiu.lu@intel.com>
976
977 * Makefile.in (clean): Also remove x32.c x32-linux.c
978 x32-avx.c x32-avx-linux.c.
979 (x32.o): New target.
980 (x32.c): Likewise.
981 (x32-linux.o): Likewise.
982 (x32-linux.c): Likewise.
983 (x32-avx.o): Likewise.
984 (x32-avx.c): Likewise.
985 (x32-avx-linux.o): Likewise.
986 (x32-avx-linux.c): Likewise.
987
988 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
989 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
990 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
991 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
992 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
993 i386/x32-avx-linux.xml.
994
995 * linux-x86-low.c (init_registers_x32_linux): New prototype.
996 (init_registers_x32_avx_linux): Likwise.
997 (x86_linux_update_xmltarget): Call init_registers_x32_linux
998 or init_registers_x32_avx_linux if linux_is_elf64 is false.
999
ecedbe58
PA
10002012-04-13 Pedro Alves <palves@redhat.com>
1001
1002 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1003 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1004 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1005 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1006 the sub-make.
1007
c92b5177
L
10082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 * linux-x86-low.c (compat_x32_clock_t): New.
1011 (compat_x32_siginfo_t): Likewise.
1012 (compat_x32_siginfo_from_siginfo): Likewise.
1013 (siginfo_from_compat_x32_siginfo): Likewise.
1014 (linux_is_elf64): Likewise.
1015 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1016 and siginfo_from_compat_x32_siginfo for x32.
1017 (x86_arch_setup): Set linux_is_elf64.
1018
214d508e
L
10192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1020
1021 PR gdb/13969
1022 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1023 e_machine field.
1024 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1025 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1026 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1027 compatible with process.
1028
c9a1864a
YQ
10292012-04-12 Yao Qi <yao@codesourcery.com>
1030
1031 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1032 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1033 (install-only, install-info, clean): Handle sub dir gnulib.
1034 (all-lib, am--refresh): New targets.
1035 (memmem.o): Remove target.
1036 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1037 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1038 (AC_REPLACE_FUNCS): Remove memmem.
1039 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1040 (AC_OUTPUT): Generate Makefile in gnulib/.
1041 * aclocal.m4, config.in, configure: Regenerated.
1042
367ba2c2
MR
10432012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1044
1045 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1046
9d236627
PA
10472012-04-05 Pedro Alves <palves@redhat.com>
1048
1049 -Werror=strict-aliasing
1050
1051 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1052 pointer.
1053
111217b3
PA
10542012-04-04 Pedro Alves <palves@redhat.com>
1055
1056 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1057 (sparc_store_gregset_from_stack, sparc_store_gregset)
1058 (sparc_breakpoint_at): Fix formatting.
1059
8365dcf5
TJB
10602012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1061
1062 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1063 are available.
1064 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1065 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1066 * config.in: Regenerate.
1067 * configure: Likewise.
1068
689cc2ae
PA
10692012-03-29 Pedro Alves <palves@redhat.com>
1070
1071 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1072 Correct ptrace arguments.
1073
c14dfd32
PA
10742012-03-28 Pedro Alves <palves@redhat.com>
1075
1076 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1077 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1078 (IA64_FR1_REGNUM): New defines.
1079 (ia64_fetch_register): New.
1080 (the_low_target): Install it.
1081 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1082 field.
1083 * linux-low.c (linux_fetch_registers): Try the
1084 the_low_target.fetch_register hook first.
1085
1086 * linux-arm-low.c (the_low_target): Adjust.
1087 * linux-bfin-low.c (the_low_target): Adjust.
1088 * linux-cris-low.c (the_low_target): Adjust.
1089 * linux-crisv32-low.c (the_low_target): Adjust.
1090 * linux-m32r-low.c (the_low_target): Adjust.
1091 * linux-m68k-low.c (the_low_target): Adjust.
1092 * linux-mips-low.c (the_low_target): Adjust.
1093 * linux-ppc-low.c (the_low_target): Adjust.
1094 * linux-s390-low.c (the_low_target): Adjust.
1095 * linux-sh-low.c (the_low_target): Adjust.
1096 * linux-sparc-low.c (the_low_target): Adjust.
1097 * linux-tic6x-low.c (the_low_target): Adjust.
1098 * linux-x86-low.c (the_low_target): Adjust.
1099 * linux-xtensa-low.c (the_low_target): Adjust.
1100
63c88e13
PA
11012012-03-26 Pedro Alves <palves@redhat.com>
1102
1103 * server.c (handle_qxfer_libraries): Don't bail early if
1104 the_target->qxfer_libraries_svr4 is not NULL.
1105
fb723180
PA
11062012-03-26 Pedro Alves <palves@redhat.com>
1107
1108 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1109
0afae3cf
PA
11102012-03-23 Pedro Alves <palves@redhat.com>
1111
1112 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1113 "library-list-svr4" element's start tag when the the DSO list is
1114 empty.
1115
485f1ee4
PA
11162012-03-23 Pedro Alves <palves@redhat.com>
1117
1118 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1119 a variable whose type size is the same as the inferior's pointer
1120 size.
1121
a5362b9a
TS
11222012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1123
1124 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1125 struct siginfo.
1126 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1127 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1128 * linux-low.h: Include <signal.h>.
1129 (struct siginfo): Remove forward declaration.
1130 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1131 struct siginfo.
1132
d226c142
MF
11332012-03-21 Mike Frysinger <vapier@gentoo.org>
1134
1135 * .gitignore: Ignore more files.
1136
122f36ef
PA
11372012-03-19 Pedro Alves <palves@redhat.com>
1138 Jan Kratochvil <jan.kratochvil@redhat.com>
1139
1140 * server.c (cont_thread, general_thread): Add describing comments.
1141 (start_inferior): Clear `cont_thread'.
1142 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1143 of a process.
1144
fc3e5175
YQ
11452012-03-15 Yao Qi <yao@codesourcery.com>
1146
1147 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1148 handling to ...
1149 (cmd_qtdp): ... here.
1150
8d0d92cd
YQ
11512012-03-15 Yao Qi <yao@codesourcery.com>
1152
1153 * tracepoint.c (struct tracepoint_action_ops): New.
1154 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1155 (m_tracepoint_action_download): New.
1156 (r_tracepoint_action_download): New.
1157 (x_tracepoint_action_download): New.
1158 (l_tracepoint_action_download): New.
1159 (add_tracepoint_action): Install `action->ops' according type.
1160 (download_tracepoint_1): Move code `download' function pointer
1161 of various tracepoint_action_ops.
1162
87b0bb13
JK
11632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1164
1165 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1166 linux_ptrace_attach_warnings.
1167
5f572dec
JK
11682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1169
1170 * Makefile.in (linux-ptrace.o): New.
1171 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1172 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1173 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1174 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1175 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1176 of these targets.
1177 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1178
f4647387
YQ
11792012-03-08 Yao Qi <yao@codesourcery.com>
1180 Pedro Alves <palves@redhat.com>
1181
1182 Fix PR server/13392.
1183 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1184 offset of JMP insn.
1185 * tracepoint.c (remove_tracepoint): New.
1186 (cmd_qtdp): Call remove_tracepoint when failed to install.
1187
9b224c5e
PA
11882012-03-07 Pedro Alves <palves@redhat.com>
1189
1190 * linux-low.c (get_detach_signal): New.
1191 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1192 Pass on pending signals to PTRACE_DETACH. Check the result of the
1193 ptrace call.
1194 * server.c (program_signals, program_signals_p): New.
1195 (handle_general_set): Handle QProgramSignals.
1196 * server.h (program_signals, program_signals_p): Declare.
1197
e237a7e2
JK
11982012-03-05 Pedro Alves <palves@redhat.com>
1199 Jan Kratochvil <jan.kratochvil@redhat.com>
1200
1201 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1202 New comment why.
1203
5808517f
YQ
12042012-03-03 Yao Qi <yao@codesourcery.com>
1205
1206 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1207 agent_look_up_symbols.
1208
58b4daa5
YQ
12092012-03-03 Yao Qi <yao@codesourcery.com>
1210
1211 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1212 (linux-x86-low.o): Likewise.
1213 * server.h: Remove in_process_agent_loaded.
1214 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1215 common/agent.c.
1216 Update callers.
1217
8ffcbaaf
YQ
12182012-03-03 Yao Qi <yao@codesourcery.com>
1219
1220 * tracepoint.c (gdb_agent_capability): New global.
1221 (in_process_agent_loaded_ust): Renamed to
1222 `in_process_agent_supports_ust'.
1223 Update callers.
1224 (in_process_agent_supports_ust): Call agent_capability_check.
1225 (clear_installed_tracepoints): Assert that agent supports
1226 agent.
1227
d1feda86
YQ
12282012-03-03 Yao Qi <yao@codesourcery.com>
1229
1230 * linux-low.c (linux_supports_agent): New.
1231 (linux_target_ops): Initialize field `supports_agent' with
1232 linux_supports_agent.
1233 * target.h (struct target_ops) <supports_agent>: New.
1234 (target_supports_agent): New macro.
1235 * server.c (handle_general_set): Handle packet 'QAgent'.
1236 (handle_query): Send `QAgent+'.
1237 * Makefile.in (server.o): Depends on agent.h.
1238
2fa291ac
YQ
12392012-03-03 Yao Qi <yao@codesourcery.com>
1240
1241 * Makefile.in (OBS): Add agent.o.
1242 Add new rule for agent.o.
1243 Track dependence of tracepoint.c on agent.h.
1244 * tracepoint.c (run_inferior_command_1):
1245 (run_inferior_command): Call agent_run_command.
1246 (gdb_ust_connect_sync_socket): Deleted. Move it to
1247 common/agent.c.
1248 (resume_thread, stop_thread): Likewise.
1249 (gdb_ust_socket_init): Renamed to ...
1250 (gdb_agent_socket_init): ... New.
1251 (gdb_ust_thread): Renamed to ...
1252 (gdb_agent_helper_thread): ... New.
1253 (gdb_ust_init): Move some code to ...
1254 (gdb_agent_init): ... here. New.
1255 [HAVE_UST]: Call gdb_ust_init.
1256 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1257 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1258 * config.in, configure: Regenerated.
1259
05044653
PA
12602012-03-02 Pedro Alves <palves@redhat.com>
1261
1262 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1263 * linux-low.c (struct simple_pid_list): New.
1264 (stopped_pids): New a struct simple_pid_list pointer.
1265 (add_to_pid_list, pull_pid_from_list): New.
1266 (handle_extended_wait): Don't assume the first signal new children
1267 report is SIGSTOP. Adjust call to pull_pid_from_list.
1268 (linux_wait_for_lwp): Adjust.
1269
8d00225b
YQ
12702012-03-02 Yao Qi <yao@codesourcery.com>
1271
1272 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1273 debug log.
1274
19560ba5
YQ
12752012-03-02 Yao Qi <yao@codesourcery.com>
1276
1277 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1278 `stop_pc' and `tpoint'. Update caller.
1279
1faeff08
MR
12802012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1281
1282 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1283 * linux-low.c (use_linux_regsets): New macro.
1284 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1285 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1286 (linux_register_in_regsets): New function.
1287 (usr_fetch_inferior_registers): Skip registers covered by
1288 regsets.
1289 (usr_store_inferior_registers): Likewise.
1290 (usr_fetch_inferior_registers): New macro.
1291 (usr_store_inferior_registers): Likewise.
1292 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1293 (linux_store_registers): Likewise.
1294 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1295 prototype.
1296 (init_registers_mips64_dsp_linux): Likewise.
1297 (init_registers_mips_linux): New macro.
1298 (init_registers_mips_dsp_linux): Likewise.
1299 (mips_dsp_num_regs): Likewise.
1300 (DSP_BASE, DSP_CONTROL): New fallback macros.
1301 (mips_base_regs): New macro.
1302 (mips_regmap): Use it. Fix the size.
1303 (mips_dsp_regmap): New variable.
1304 (mips_dsp_regset_bitmap): Likewise.
1305 (mips_arch_setup): New function.
1306 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1307 than mips_regmap.
1308 (mips_cannot_store_register): Likewise.
1309 (the_low_target): Update .arch_setup, .num_regs and .regmap
1310 initializers. Add .regset_bitmap initializer.
1311 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1312 initializer.
1313 * linux-bfin-low.c (the_low_target): Likewise.
1314 * linux-cris-low.c (the_low_target): Likewise.
1315 * linux-crisv32-low.c (the_low_target): Likewise.
1316 * linux-ia64-low.c (the_low_target): Likewise.
1317 * linux-m32r-low.c (the_low_target): Likewise.
1318 * linux-m68k-low.c (the_low_target): Likewise.
1319 * linux-ppc-low.c (the_low_target): Likewise.
1320 * linux-s390-low.c (the_low_target): Likewise.
1321 * linux-sh-low.c (the_low_target): Likewise.
1322 * linux-sparc-low.c (the_low_target): Likewise.
1323 * linux-tic6x-low.c (the_low_target): Likewise.
1324 * linux-x86-low.c (the_low_target): Likewise.
1325 * linux-xtensa-low.c (the_low_target): Likewise.
1326 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1327 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1328 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1329 srv_xmlfiles.
1330 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1331 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1332
c03e6ccc
YQ
13332012-02-29 Yao Qi <yao@codesourcery.com>
1334 Pedro Alves <palves@redhat.com>
1335
1336 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1337 `step_over_finished' is true.
1338
644cebc9
PA
13392012-02-27 Pedro Alves <palves@redhat.com>
1340
1341 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1342 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1343
c14d7ab2
PA
13442012-02-27 Pedro Alves <palves@redhat.com>
1345
1346 PR server/9684
1347 * linux-low.c (pid_is_stopped): New.
1348 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1349
412c89dd
LM
13502012-02-25 Luis Machado <lgustavo@codesourcery.com>
1351
1352 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1353 of conditions.
1354
b745defe
MR
13552012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1356
1357 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1358
9f3a5c85
LM
13592012-02-24 Luis Machado <lgustavo@codesourcery>
1360
1361 * server.c (handle_query): Advertise support for target-side
1362 breakpoint condition evaluation.
1363 (process_point_options): New function.
1364 (process_serial_event): When inserting a breakpoint, check for
1365 a target-side condition that should be evaluated.
1366
1367 * mem-break.c: Include regcache.h and ax.h.
1368 (point_cond_list_t): New data structure.
1369 (breakpoint) <cond_list>: New field.
1370 (find_gdb_breakpoint_at): Make non-static.
1371 (delete_gdb_breakpoint_at): Clear any target-side
1372 conditions.
1373 (clear_gdb_breakpoint_conditions): New function.
1374 (add_condition_to_breakpoint): Likewise.
1375 (add_breakpoint_condition): Likewise.
1376 (gdb_condition_true_at_breakpoint): Likewise.
1377 (gdb_breakpoint_here): Return result directly instead
1378 of going through a local variable.
1379
1380 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1381 (clear_gdb_breakpoint_conditions): Likewise.
1382 (add_breakpoint_condition): Likewise.
1383 (gdb_condition_true_at_breakpoint): Likewise.
1384
1385 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1386 (need_step_over_p): Take target-side breakpoint condition into
1387 consideration.
1388
5e1dc496
LM
13892012-02-24 Luis Machado <lgustavo@codesourcery>
1390
1391 * server.h: Include tracepoint.h.
1392 (agent_mem_read, agent_get_trace_state_variable_value,
1393 agent_set_trace_state_variable_value,
1394 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1395 get_set_tsv_func_addr): New prototypes.
1396
1397 * ax.h: New include file.
1398 * ax.c: New source file.
1399
1400 * tracepoint.c: Include ax.h.
1401 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1402 agent_expr, eval_result_type): Move to ax.h.
1403 (parse_agent_expr): Rename to ...
1404 (gdb_parse_agent_expr): ... this, make it non-static and move
1405 to ax.h.
1406 (unparse_agent_expr) Rename to ...
1407 (gdb_unparse_agent_expr): ... this, make it non-static and move
1408 to ax.h.
1409 (eval_agent_expr): Rename to ...
1410 (eval_tracepoint_agent_expr): ... this.
1411 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1412 forward declarations.
1413 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1414 (agent_get_trace_state_variable_value): New function.
1415 (agent_set_trace_state_variable_value): New function.
1416 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1417 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1418 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1419 (condition_true_at_tracepoint): Likewise.
1420 (parse_agent_expr): Rename to ...
1421 (gdb_parse_agent_expr): ... this and move to ax.c.
1422 (unparse_agent_expr): Rename to ...
1423 (gdb_unparse_agent_expr): ... this and move to ax.c.
1424 (gdb_agent_op_name): Move to ax.c.
1425 (eval_agent_expr): Rename to ...
1426 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1427 and move to ax.c.
1428 (eval_tracepoint_agent_expr): New function.
1429 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 1430 non-static.
5e1dc496
LM
1431 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1432 ax.c.
1433 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1434 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1435 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1436 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1437 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1438 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1439 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1440 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1441 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1442 (compile_bytecodes): Remove forward declaration.
1443 (is_goto_target): Move to ax.c.
1444 (compile_bytecodes): Move to ax.c and call
1445 agent_get_trace_state_variable_value (...) and
1446 agent_set_trace_state_variable_value (...).
1447
1448 * Makefile.in: Update ax.c and IPA dependencies.
1449
277e4e52
PA
14502012-02-24 Pedro Alves <palves@redhat.com>
1451
1452 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1453 (cmd_bigqtbuffer_circular): ... this. Only handle
1454 'QTBuffer:circular:'.
1455 (handle_tracepoint_general_set): Adjust.
1456
bf4c19f7
YQ
14572012-02-16 Yao Qi <yao@codesourcery.com>
1458
1459 * inferiors.c: Move code to ...
1460 * dll.c: .... here. New.
1461 * server.h: Declare clear_dlls.
1462 * Makefile.in (SFILES): Add dll.c.
1463 (OBS): Add dll.o
1464 (dll.o): New rule.
1465
d73f2619
YQ
14662012-02-11 Yao Qi <yao@codesourcery.com>
1467
1468 * server.c: (handle_monitor_command): Add a new parameter
1469 `own_buf'.
1470 (handle_query): Update caller.
1471
f8255c2a
JB
14722012-02-09 Joel Brobecker <brobecker@adacore.com>
1473
1474 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1475 * configure, config.in: Regenerate.
1476 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1477 is not defined.
1478
da84f473
PA
14792012-02-02 Pedro Alves <palves@redhat.com>
1480
1481 Try SIGKILL first, then PTRACE_KILL.
1482 * linux-low.c (linux_kill_one_lwp): New.
1483 (linux_kill_one_lwp): Rename to ...
1484 (kill_one_lwp_callback): ... this. Use the new
1485 linux_kill_one_lwp.
1486
e886a173
PA
14872012-02-02 Pedro Alves <palves@redhat.com>
1488
1489 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1490 inferior.
1491
be07f1a2
PA
14922012-01-27 Pedro Alves <palves@redhat.com>
1493
1494 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1495 (elf_64_file_p): Make static.
1496 (linux_pid_exe_is_elf_64_file): New.
1497 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1498 Delete declarations.
1499 (linux_pid_exe_is_elf_64_file): Declare.
1500 * linux-x86-low.c (x86_arch_setup): Use
1501 linux_pid_exe_is_elf_64_file.
1502
d8301ad1
JK
15032012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1504
1505 * linux-low.c (linux_wait_for_event_1): Rename to ...
1506 (linux_wait_for_event): ... here and merge it with former
1507 linux_wait_for_event - new variable wait_ptid, use it.
1508 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1509
01b17894
PA
15102012-01-23 Pedro Alves <palves@redhat.com>
1511
1512 * server.c (main): Avoid yet another case of infinite loop while
1513 detaching/killing after a longjmp.
1514
e825046f
JK
15152012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1516
1517 Code cleanup.
1518 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1519
b9e7b9c3
UW
15202012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1521
1522 * hostio.c (handle_readlink): New function.
1523 (handle_vFile): Call it to handle "vFile:readlink" packets.
1524
901f9912
UW
15252012-01-20 Pedro Alves <palves@redhat.com>
1526 Ulrich Weigand <ulrich.weigand@linaro.org>
1527
1528 * server.c (handle_v_requests): Only support vAttach and vRun to
1529 start multiple processes when in extended protocol mode.
1530
fc1ab1a0
PA
15312012-01-17 Pedro Alves <palves@redhat.com>
1532
1533 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1534 memalign plus mprotect to allocate the scratch buffer.
1535
7d5d4e98
PA
15362012-01-13 Pedro Alves <palves@redhat.com>
1537
1538 * server.c (attach_inferior): Clear `cont_thread'.
1539
f128d5e9
PA
15402012-01-13 Pedro Alves <palves@redhat.com>
1541
1542 * server.c (main): Avoid infinite loop while detaching/killing
1543 after a longjmp.
1544
06db92f0
DE
15452012-01-09 Doug Evans <dje@google.com>
1546
1547 * server.c (start_inferior): Set last_ptid in --wrapper case.
1548
32d92999
YQ
15492012-01-06 Yao Qi <yao@codesourcery.com>
1550
1551 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1552 defined.
1553 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1554
5e0a92a9
YQ
15552012-01-04 Yao Qi <yao@codesourcery.com>
1556
1557 * tracepoint.c (cmd_qtdp): Print debug message
1558 for static tracepoint.
1559
ae639e8c
YQ
15602012-01-04 Yao Qi <yao@codesourcery.com>
1561
1562 * tracepoint.c (trace_vdebug): Differentiate debug message
1563 between gdbserver and IPA.
1564
f72429c5
YQ
15652012-01-03 Yao Qi <yao@codesourcery.com>
1566
1567 * tracepoint.c (tracepoint_was_hit): Don't collect for
1568 static tracepoint.
1569
12c3e59c
JB
15702012-01-02 Joel Brobecker <brobecker@adacore.com>
1571
1572 * terminal.h: Reformat copyright header.
1573
67827812
JB
15742012-01-02 Joel Brobecker <brobecker@adacore.com>
1575
1576 * server.c (gdbserver_version): Update copyright year.
1577 * gdbreplay.c (gdbreplay_version): Likewise.
1578
3e52c33d
JK
15792011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1580
1581 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1582
1583 Revert:
1584 2011-12-18 Hui Zhu <teawater@gmail.com>
1585 * linux-low.c (linux_create_inferior): Save return value to ret.
1586
66f1260e
HZ
15872011-12-18 Hui Zhu <teawater@gmail.com>
1588
1589 * linux-low.c (linux_create_inferior): Save return value to ret.
1590
e77616d7
DE
15912011-12-16 Doug Evans <dje@google.com>
1592
e7b06c57
DE
1593 * linux-low.c (linux_create_inferior): If stdio connection,
1594 redirect stdin from /dev/null, stdout to stderr.
1595 * remote-utils.c (remote_is_stdio): New static global.
1596 (remote_connection_is_stdio): New function.
1597 (remote_prepare): Handle stdio connection.
1598 (remote_open): Ditto.
1599 (remote_close): Don't close stdin for stdio connections.
1600 (read_prim,write_prim): New functions. Replace all calls to
1601 read/write to these.
1602 * server.c (main): Watch for "-" argument. Move call to
1603 remote_prepare before start_inferior.
1604 * server.h (STDIO_CONNECTION_NAME): New macro.
1605 (remote_connection_is_stdio): Declare.
1606
e77616d7
DE
1607 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1608 in debugging output.
1609
82067193
YQ
16102011-12-15 Yao Qi <yao@codesourcery.com>
1611
1612 * tracepoint.c: Include sys/syscall.h.
1613 (gdb_ust_thread): Remove preprocessor conditional.
1614
82bfbe7e
PA
16152011-12-14 Pedro Alves <pedro@codesourcery.com>
1616
1617 * linux-low.c (linux_detach_one_lwp): Call
1618 the_low_target.prepare_to_resume before detaching.
1619
712c6575
YQ
16202011-12-14 Yao Qi <yao@codesourcery.com>
1621
1622 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1623 of write.
1624
d54d1edf
YQ
16252011-12-14 Yao Qi <yao@codesourcery.com>
1626
1627 * i386-low.c (i386_low_stopped_data_address): Initialize local
1628 variable `control'.
1629
6210a125
PA
16302011-12-13 Pedro Alves <pedro@codesourcery.com>
1631
1632 PR remote/13492
1633
1634 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1635 DR_CONTROL unless necessary. Extend comments.
1636 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1637 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1638
2ece8244
YQ
16392011-12-13 Yao Qi <yao@codesourcery.com>
1640
1641 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1642 macros.
1643 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1644
784867a5
JK
16452011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1646
1647 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1648 Print new debug message for such case.
1649
6bf36717
JK
16502011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1651
1652 Fix overlapping memcpy.
1653 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1654 the read_inferior_memory transfer.
1655 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1656 write_inferior_memory transfer.
1657 (set_fast_tracepoint_jump): New variable buf. Use it for the
1658 read_inferior_memory and write_inferior_memory transfers.
1659 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1660 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1661 Use it for the write_inferior_memory transfer.
1662 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1663 buffers.
1664
50275556
MR
16652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1666
1667 * linux-low.c (fetch_register, store_register): Make code
1668 consistent, fix formatting.
1669
7325beb4
MR
16702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1671
1672 * linux-low.c (usr_store_inferior_registers): Factor out code
1673 to handle individual registers into...
1674 (store_register): ... this new function.
1675
c642a434
UW
16762011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1677
1678 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1679 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1680 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1681 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1682 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1683 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1684 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1685 (srv_xmlfiles): Add new XML files.
1686
1687 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1688 and <sys/uio.h>.
1689 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1690 (init_registers_s390_linux32v1): Add prototype.
1691 (init_registers_s390_linux32v2): Likewise.
1692 (init_registers_s390_linux64v1): Likewise.
1693 (init_registers_s390_linux64v2): Likewise.
1694 (init_registers_s390x_linux64v1): Likewise.
1695 (init_registers_s390x_linux64v2): Likewise.
1696 (s390_num_regs): Increment to 52.
1697 (s390_regmap): Add orig_r2 register.
1698 (s390_num_regs_3264): Increment to 68.
1699 (s390_regmap_3264): Add orig_r2 register.
1700 (s390_collect_ptrace_register): Handle orig_r2 register.
1701 (s390_supply_ptrace_register): Likewise.
1702 (s390_fill_last_break): New function.
1703 (s390_store_last_break): Likewise.
1704 (s390_fill_system_call): New function.
1705 (s390_store_system_call): Likewise.
1706 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1707 register sets.
1708 (s390_check_regset): New function.
1709 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1710 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1711 Update target_regsets for available register sets.
1712
2268b414
JK
17132011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1714 Jan Kratochvil <jan.kratochvil@redhat.com>
1715
1716 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1717 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1718 New.
1719 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1720 * linux-low.h (struct process_info_private): New member r_debug.
1721 * server.c (handle_qxfer_libraries): Call
1722 the_target->qxfer_libraries_svr4.
1723 (handle_qxfer_libraries_svr4): New function.
1724 (qxfer_packets): New entry "libraries-svr4".
1725 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1726 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1727 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1728 PACKET_qXfer_libraries_svr4.
1729
d6db1fab
UW
17302011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1731
1732 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1733 PSW address/mask between 8-byte and 16-byte formats.
1734 (s390_supply_ptrace_register): Likewise.
1735 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1736 basic addressing mode bit.
1737
242f5f1c
SS
17382011-11-24 Stan Shebs <stan@codesourcery.com>
1739
1740 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1741
f196051f
SS
17422011-11-17 Stan Shebs <stan@codesourcery.com>
1743
1744 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1745 (tracing_start_time): New global.
1746 (tracing_stop_time): New global.
1747 (tracing_user_name): New global.
1748 (tracing_notes): New global.
1749 (tracing_stop_note): New global.
1750 (cmd_qtstart): Set traceframe_usage, start_time.
1751 (stop_tracing): Set stop_time.
1752 (cmd_qtstatus): Report additional status.
1753 (cmd_qtp): New function.
1754 (handle_tracepoint_query): Call it.
1755 (cmd_qtnotes): New function.
1756 (handle_tracepoint_general_set): Call it.
1757 (get_timestamp): Rename from tsv_get_timestamp.
1758
405f8e94
SS
17592011-11-14 Stan Shebs <stan@codesourcery.com>
1760 Kwok Cheung Yeung <kcy@codesourcery.com>
1761
1762 * linux-x86-low.c (small_jump_insn): New.
1763 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1764 trampoline and error message, build a trampoline and issue a small
1765 jump instruction to it.
1766 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1767 trampoline and error message.
1768 (x86_get_min_fast_tracepoint_insn_len): New.
1769 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1770 * linux-low.h (struct linux_target_ops): Add arguments to
1771 install_fast_tracepoint_jump_pad operation, add new operation.
1772 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1773 arguments.
1774 (linux_get_min_fast_tracepoint_insn_len): New function.
1775 (linux_target_op): Add new operation.
1776 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1777 (gdb_trampoline_buffer_end): Ditto.
1778 (gdb_trampoline_buffer_error): Ditto.
1779 (struct ipa_sym_addresses): Add fields for new IPA variables.
1780 (symbol_list): Add entries for new IPA variables.
1781 (struct tracepoint): Add fields to hold the address range of the
1782 trampoline used by the tracepoint.
1783 (trampoline_buffer_head): New static variable.
1784 (trampoline_buffer_tail): Ditto.
1785 (claim_trampoline_space): New function.
1786 (have_fast_tracepoint_trampoline_buffer): New function.
1787 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1788 structure.
1789 (install_fast_tracepoint): Ditto, also add error buffer argument.
1790 (cmd_qtminftpilen): New function.
1791 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1792 (fast_tracepoint_from_trampoline_address): New function.
1793 (fast_tracepoint_collecting): Handle trampoline as part of jump
1794 pad space.
1795 (set_trampoline_buffer_space): New function.
1796 (initialize_tracepoint): Initialize new IPA variables.
1797 * target.h (struct target_ops): Add arguments to
1798 install_fast_tracepoint_jump_pad operation, add new
1799 get_min_fast_tracepoint_insn_len operation.
1800 (target_get_min_fast_tracepoint_insn_len): New.
1801 (install_fast_tracepoint_jump_pad): Add arguments.
1802 * server.h (IPA_BUFSIZ): Define.
1803 * linux-i386-ipa.c: Include extra header files.
1804 (initialize_fast_tracepoint_trampoline_buffer): New function.
1805 (initialize_low_tracepoint): Call it.
1806 * server.h (set_trampoline_buffer_space): Declare.
1807 (claim_trampoline_space): Ditto.
1808 (have_fast_tracepoint_trampoline_buffer): Ditto.
1809
1e4d1764
YQ
18102011-11-14 Yao Qi <yao@codesourcery.com>
1811
1812 * server.c (handle_query): Handle InstallInTrace for qSupported.
1813 * tracepoint.c (add_tracepoint): Sort list.
1814 (install_tracepoint, download_tracepoint): New.
1815 (cmd_qtdp): Call them to install and download tracepoints.
1816 (sort_tracepoints): Removed.
1817 (cmd_qtstart): Update.
1818
5c73ff4e
YQ
18192011-11-14 Yao Qi <yao@codesourcery.com>
1820
1821 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1822 * mem-break.h: Declare.
1823 * tracepoint.c (cmd_qtstart): Move some code to ...
1824 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1825 New.
1826 (download_tracepoints): Move some code to ...
1827 (download_tracepoint_1): ... here. New.
1828
86a30030
YQ
18292011-11-08 Yao Qi <yao@codesourcery.com>
1830
1831 * remote-utils.c (relocate_instruction): A comment fix.
1832
8d26e50c
JB
18332011-11-07 Joel Brobecker <brobecker@adacore.com>
1834
1835 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1836 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1837 dr_status_mirror and dr_control_mirror from debug_reg_state.
1838 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1839 (i386_initial_stuff): Remove use of deleted globals.
1840 (i386_get_thread_context, i386_set_thread_context,
1841 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1842 from debug_reg_state.
1843
a59306a3
YQ
18442011-11-05 Yao Qi <yao@codesourcery.com>
1845
1846 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1847 address as TPOINT's.
1848
3065dfb6
SS
18492011-11-02 Stan Shebs <stan@codesourcery.com>
1850
1851 * tracepoint.c (agent_mem_read_string): New function.
1852 (eval_agent_expr): Call it for tracenz.
1853 * server.c (handle_query): Report support for tracenz.
1854
fd0d8c7c
YQ
18552011-11-02 Yao Qi <yao@codesourcery.com>
1856
1857 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1858
609086b1
YQ
18592011-11-02 Yao Qi <yao@codesourcery.com>
1860
1861 * target.h: Fix a typo in comment.
1862
b9fd1791
PA
18632011-10-31 Pedro Alves <pedro@codesourcery.com>
1864
1865 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1866 clobber the breakpoints' shadows with fast tracepoint jumps.
1867 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1868 * target.c (write_inferior_memory): Also pass MYADDR down to
1869 check_mem_write.
1870
03583c20
UW
18712011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1872
1873 * configure.ac: Check support for personality routine.
1874 * configure: Regenerate.
1875 * config.in: Likewise.
1876 * linux-low.c: Include <sys/personality.h>.
1877 Define ADDR_NO_RANDOMIZE if necessary.
1878 (linux_create_inferior): Disable address space randomization when
1879 forking inferior, if requested.
1880 (linux_supports_disable_randomization): New function.
1881 (linux_target_ops): Install it.
1882 * server.h (disable_randomization): Declare.
1883 * server.c (disable_randomization): New global variable.
1884 (handle_general_set): Handle QDisableRandomization.
1885 (handle_query): Likewise for qSupported.
1886 (main): Support --disable-randomization and --no-disable-randomization
1887 command line arguments.
1888 * target.h (struct target_ops): Add supports_disable_randomization.
1889 (target_supports_disable_randomization): New macro.
1890
723b724b
MF
18912011-09-29 Mike Frysinger <vapier@gentoo.org>
1892
1893 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1894 ifdef check.
1895 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1896 [!PT_GETDSBT] (target_loadmap): New definition.
1897 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1898 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1899 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1900 and PT_GETDSBT to LINUX_LOADMAP.
1901 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1902 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1903
55329a5c 19042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
1905
1906 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1907 (arm_linux_hwbp_cap): New static variable.
1908 (arm_linux_get_hwbp_cap): Replace by ...
1909 (arm_linux_init_hwbp_cap): ... this new function.
1910 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1911 (arm_linux_get_hw_watchpoint_count): Likewise.
1912 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1913 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1914 (arm_prepare_to_resume): Use perror_with_name instead of error.
1915
55329a5c 19162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
1917
1918 * linux-arm-low.c: Include <signal.h>.
1919 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1920 (struct arm_linux_hwbp_cap): New data type.
1921 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1922 (struct arm_linux_hw_breakpoint): New data type.
1923 (MAX_BPTS, MAX_WPTS): Define.
1924 (struct arch_process_info, struct arch_lwp_info): New data types.
1925 (arm_linux_get_hwbp_cap): New function.
1926 (arm_linux_get_hw_breakpoint_count): Likewise.
1927 (arm_linux_get_hw_watchpoint_count): Likewise.
1928 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1929 (arm_hwbp_control_initialize): Likewise.
1930 (arm_hwbp_control_is_enabled): Likewise.
1931 (arm_hwbp_control_is_initialized): Likewise.
1932 (arm_hwbp_control_disable): Likewise.
1933 (arm_linux_hw_breakpoint_equal): Likewise.
1934 (arm_linux_hw_point_initialize): Likewise.
1935 (struct update_registers_data): New data structure.
1936 (update_registers_callback: New function.
1937 (arm_insert_point): Likewise.
1938 (arm_remove_point): Likewise.
1939 (arm_stopped_by_watchpoint): Likewise.
1940 (arm_stopped_data_address): Likewise.
1941 (arm_new_process): Likewise.
1942 (arm_new_thread): Likewise.
1943 (arm_prepare_to_resume): Likewise.
1944 (the_low_target): Register arm_insert_point, arm_remove_point,
1945 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1946 arm_new_thread, and arm_prepare_to_resume.
1947
6b9801d4
SS
19482011-09-15 Stan Shebs <stan@codesourcery.com>
1949
1950 * server.h (struct emit_ops): Add compare-goto fields.
1951 * tracepoint.c (gdb_agent_op_sizes): New table.
1952 (emit_eq_goto): New function.
1953 (emit_ne_goto): New function.
1954 (emit_lt_goto): New function.
1955 (emit_le_goto): New function.
1956 (emit_gt_goto): New function.
1957 (emit_ge_goto): New function.
1958 (is_goto_target): New function.
1959 (compile_bytecodes): Recognize special cases of compare-goto
1960 combinations and call specialized emitters for them.
1961 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1962 (amd64_emit_ne_goto): New function.
1963 (amd64_emit_lt_goto): New function.
1964 (amd64_emit_le_goto): New function.
1965 (amd64_emit_gt_goto): New function.
1966 (amd64_emit_ge_goto): New function.
1967 (amd64_emit_ops): Add the new functions.
1968 (i386_emit_eq_goto): New function.
1969 (i386_emit_ne_goto): New function.
1970 (i386_emit_lt_goto): New function.
1971 (i386_emit_le_goto): New function.
1972 (i386_emit_gt_goto): New function.
1973 (i386_emit_ge_goto): New function.
1974 (i386_emit_ops): Add the new functions.
1975
bf15cbda
SS
19762011-09-08 Stan Shebs <stan@codesourcery.com>
1977
1978 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1979 (i386_emit_epilogue): Restore %ebx.
1980
943ca1dd
JZ
19812011-08-31 Jie Zhang <jzhang918@gmail.com>
1982
1983 * server.c (step_thread): Remove definition.
1984 (process_serial_event): Don't handle Hs.
1985 * server.h (step_thread): Remove declaration.
1986 * target.c (set_desired_inferior): Remove use of step_thread.
1987
e3deef73
LM
19882011-08-24 Luis Machado <lgustavo@codesourcery.com>
1989
1990 * linux-low.c: Include linux-procfs.h.
1991 (linux_attach_lwp_1): Update comments.
1992 (linux_attach): Scan for existing threads when attaching to a
1993 process that is the tgid.
1994 * Makefile.in: Update dependencies.
1995
13da1c97
LM
19962011-08-24 Luis Machado <lgustavo@codesourcery.com>
1997
1998 * configure.srv: Add linux-procfs.o dependencies.
1999
881127c9
YQ
20002011-08-14 Yao Qi <yao@codesourcery.com>
2001
2002 * target.h (struct target_ops): Fix indent.
2003 * win32-low.c (win32_target_ops): Fix comment.
2004
58dbd541
YQ
20052011-08-14 Andrew Jenner <andrew@codesourcery.com>
2006 Yao Qi <yao@codesourcery.com>
2007
2008 * Makefile.in (clean): Remove tic6x-*.c files.
2009 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2010 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2011 (tic6x-c64xp-linux.c): Likewise.
2012 * configure.srv: Add support for tic6x-*-uclinux.
2013 * linux-tic6x-low.c: New.
2014 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2015
78d85199
YQ
20162011-08-14 Andrew Stubbs <ams@codesourcery.com>
2017 Yao Qi <yao@codesourcery.com>
2018
2019 * target.h (struct target_ops): Add read_loadmap.
2020 * linux-low.c (struct target_loadseg): New type.
2021 (struct target_loadmap): New type.
2022 (linux_read_loadmap): New function.
2023 (linux_target_ops): Add linux_read_loadmap.
2024 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
2025 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2026 to NULL.
78d85199 2027
a959a88d
EZ
20282011-08-05 Eli Zaretskii <eliz@gnu.org>
2029
2030 * win32-low.c: Include <stdint.h>.
2031
1ced966e
PA
20322011-07-22 Pedro Alves <pedro@codesourcery.com>
2033
2034 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2035 to the inferior here.
2036 (i386_remove_aligned_watchpoint): Ditto.
2037 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2038 fit part of the watchpoint in the debug registers.
2039 (i386_update_inferior_debug_regs): New.
2040 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2041 registers, and only update the inferior on success.
2042 (i386_low_remove_watchpoint): Ditto.
2043
d26e3629
KY
20442011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2045
2046 * linux-low.c (compare_ints, unique, list_threads, show_process,
2047 linux_core_of_thread): Delete.
2048 (linux_target_ops): Change linux_core_of_thread to
2049 linux_common_core_of_thread.
2050 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2051 * utils.c (malloc_failure): Change type of argument.
2052 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2053 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2054 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2055 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2056 (IPA_OBJS): Add common-utils-ipa.o.
2057 (ptid_h, linux_osdata_h): New macros.
2058 (server_h): Add common/common-utils.h, common/xml-utils.h,
2059 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2060 common/ptid.h.
2061 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2062 ptid.o, buffer.o): New rules.
2063 (linux-low.o): Add common/linux-osdata.h as a dependency.
2064 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2065 * configure.ac: Add AC_HEADER_DIRENT check.
2066 * config.in: Regenerate.
2067 * configure: Regenerate.
2068 * remote-utils.c (xml_escape_text): Delete.
2069 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2070 buffer_xml_printf): Move to common/buffer.c.
2071 * server.c (main): Remove call to initialize_inferiors.
2072 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2073 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2074 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2075 internal_error, gdb_assert, gdb_assert_fail): Delete.
2076 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2077 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2078 common/buffer.h.
2079 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2080 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2081 initialize_inferiors): Delete.
2082
2275a1a7
PA
20832011-07-20 Pedro Alves <pedro@codesourcery.com>
2084
2085 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2086 symbol error.
2087
0a5b1e09
PA
20882011-05-31 Pedro Alves <pedro@codesourcery.com>
2089
2090 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2091 assertion.
2092 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2093
6938fd34
YQ
20942011-05-26 Yao Qi <yao@codesourcery.com>
2095
2096 * Makefile.in (thread-db.o): Track dependence to
2097 common/gdb_thread_db.h.
2098 * thread-db.c: include gdb_thread_db.h from right place.
2099
b481f9e0
TT
21002011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2101
2102 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2103 __FILE__ and __LINE__ to internal_error.
2104
98a5dd13
DE
21052011-05-13 Doug Evans <dje@google.com>
2106
2107 * thread-db.c (try_thread_db_load_from_sdir): New function.
2108 (try_thread_db_load_from_dir): New function.
2109 (thread_db_load_search): Handle $sdir, ignore $pdir.
2110 Remove trying of system directories if search of
2111 libthread-db-search-path fails, that is now done via $sdir.
2112
d248b706
KY
21132011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2114
2115 * server.c (handle_query): Add EnableDisableTracepoints to the list
2116 of supported features.
43aaf8b6 2117 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 2118 tracepoints.
43aaf8b6
PA
2119 (cmd_qtenable_disable): New.
2120 (cmd_qtstart): Install tracepoints even if disabled.
2121 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2122 receiving a QTEnable or QTDisable packet.
2123 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2124 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2125 tracepoints.
2126 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 2127
84e578fb
DE
21282011-05-10 Doug Evans <dje@google.com>
2129
2130 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2131
71f55dd8
DE
21322011-05-04 Doug Evans <dje@google.com>
2133
2134 * linux-low.c (linux_join): Skip process lookup.
2135 * spu-low.c (spu_join): Ditto.
2136 * server.c (join_inferiors_callback): Delete.
2137 (process_serial_event): For 'D' packet (detach) call join_inferior
2138 directly.
2139
4d393d60
JM
21402011-05-04 Joseph Myers <joseph@codesourcery.com>
2141
2142 * README: Don't mention xscale*-*-linux*.
2143 * configure.srv (xscale*-*-linux*): Don't handle target.
2144
b00ad6ff
NF
21452011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2146
2147 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2148 casting pointers.
2149 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2150 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2151 (i386_emit_void_call_2): Likewise.
2152
af96c192
YQ
21532011-04-26 Yao Qi <yao@codesourcery.com>
2154
43aaf8b6
PA
2155 * linux-low.c: Move common macros to linux-ptrace.h.
2156 Include linux-ptrace.h.
af96c192
YQ
2157 * Makefile.in (linux_ptrace_h): New.
2158 (linux-low.o): Depends on linux-ptrace.h.
2159
03f2bd59
JK
21602011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2161
2162 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2163 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2164 (remote_prepare): New function with most of the TCP code from ...
2165 (remote_open): ... here. Detect PORT here unconditionally. Move also
2166 setting transport_is_reliable.
2167 * server.c (run_once): New variable.
2168 (gdbserver_usage): Document it.
2169 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2170 the first run if RUN_ONCE.
2171 * server.h (run_once, remote_prepare): New declarations.
2172
7a9dd1b2
TT
21732011-04-19 Tom Tromey <tromey@redhat.com>
2174
2175 * win32-low.c (handle_load_dll): Remove duplicate "the".
2176
81239425
PM
21772011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2178
2179 Remove support for old Cygwin 1.5 versions.
2180 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2181 function to avoid warning.
2182 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2183 warning.
2184
9e0627f1
PM
21852011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2186
2187 * gdbserver/server.h (Macro _): Define it if not available.
2188
588eebee
MS
21892011-03-14 Michael Snyder <msnyder@vmware.com>
2190
348af9f7 2191 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 2192
43f70d4c
JB
21932011-03-10 Joel Brobecker <brobecker@adacore.com>
2194
2195 * Makefile.in (maintainer-clean realclean distclean): Remove
2196 "make ... subdir_do" command.
2197
348af9f7
MS
21982011-03-10 Michael Snyder <msnyder@vmware.com>
2199
2200 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2201
2202 * server.c (handle_v_run): Free alloced buffer on early return.
2203
e637a4f5
YQ
22042011-03-09 Yao Qi <yao@codesourcery.com>
2205
2206 Revert:
2207 2011-03-04 Yao Qi <yao@codesourcery.com>
2208
2209 * Makefile.in: Remove GNU make feature --directory.
2210
2211 2011-03-05 Yao Qi <yao@codesourcery.com>
2212
2213 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2214 (subdir_do): New make target. Copied from gdb/Makefile.
2215 (maintainer-clean, realclean, distclean, clean): Call corresponding
2216 make targets in common/Makefile.
2217
2218 2011-02-11 Yao Qi <yao@codesourcery.com>
2219
2220 * configure.ac: Call AC_PROG_RANLIB.
2221 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2222 * configure: Regenerate.
2223
e6edda56
JK
22242011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2225
2226 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2227
e5141119
JB
22282011-03-06 Yao Qi <yao@codesourcery.com>
2229
2230 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2231
64794aa4
JB
22322011-03-05 Yao Qi <yao@codesourcery.com>
2233
2234 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2235 (subdir_do): New make target. Copied from gdb/Makefile.
2236 (maintainer-clean, realclean, distclean, clean): Call corresponding
2237 make targets in common/Makefile.
2238
7a762829
YQ
22392011-03-04 Yao Qi <yao@codesourcery.com>
2240
2241 * Makefile.in: Remove GNU make feature --directory.
2242
348af9f7
MS
22432011-03-04 Michael Snyder <msnyder@vmware.com>
2244
2245 * server.c (queue_stop_reply): Call xmalloc not malloc.
2246
22472011-03-02 Michael Snyder <msnyder@vmware.com>
2248
2249 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2250
9f72fee2
MS
22512011-02-28 Michael Snyder <msnyder@vmware.com>
2252
588eebee
MS
2253 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2254 (cmd_qtframe): Ditto.
2255 (cmd_qtbuffer): Ditto.
2256 (cmd_bigqtbuffer): Ditto.
2257
9f72fee2
MS
2258 * utils.c (decimal2str): Initialize 'width' to nine, then
2259 don't mess with it.
2260
8040bd49
UW
22612011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2262
2263 * hostio.c (require_data): Free *data, not data.
2264
7e52cbd0
JK
22652011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2266
2267 * hostio.c (require_data): Use free, not xfree.
2268
9130f83e
MS
22692011-02-27 Michael Snyder <msnyder@vmware.com>
2270
4b812f4e
MS
2271 * server.c (handle_query): Discard unused value.
2272
9130f83e
MS
2273 * hostio.c (require_data): Free malloc memory before returning
2274 error.
2275
69d37113
MS
22762011-02-26 Michael Snyder <msnyder@vmware.com>
2277
2278 * linux-low.c (list_threads): Call closedir for dirent.
2279
35f5825a
MS
22802011-02-27 Michael Snyder <msnyder@vmware.com>
2281
2a589cef
MS
2282 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2283 a case statement falls through.
2284
0adea5f7
MS
2285 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2286
35f5825a
MS
2287 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2288 in comparison.
2289
238f1c74
MS
22902011-02-26 Michael Snyder <msnyder@vmware.com>
2291
2292 * utils.c (decimal2str): Eliminate dead code and dead param.
2293 (pulongest): Drop dead param from call to decimal2str.
2294 (plongest): Ditto.
2295
633ff500
JB
22962011-02-24 Joel Brobecker <brobecker@adacore.com>
2297
2298 Revert the following patch (not approved yet):
2299 2011-02-21 Hui Zhu <teawater@gmail.com>
2300 * tracepoint.c (tp_printf): New function.
2301 (eval_agent_expr): Handle gdb_agent_op_printf.
2302
f9c6ff72
HZ
23032011-02-21 Hui Zhu <teawater@gmail.com>
2304
2305 * tracepoint.c (tp_printf): New function.
2306 (eval_agent_expr): Handle gdb_agent_op_printf.
2307
94d5e490
TT
23082011-02-18 Tom Tromey <tromey@redhat.com>
2309
2310 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2311 (tracepoint.o): Likewise.
2312 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2313 (gdb_agent_op_names): Likewise.
2314
c7f96d2b
TT
23152011-02-18 Tom Tromey <tromey@redhat.com>
2316
2317 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2318 gdb_agent_op_rot>: New constants.
2319 (gdb_agent_op_names): Add pick and roll.
2320 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2321 cases.
2322
0feedb2c
JK
23232011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2324
2325 * aclocal.m4: Regenerated with aclocal-1.11.1.
2326
b3b9301e
PA
23272011-02-14 Pedro Alves <pedro@codesourcery.com>
2328
2329 * server.c (handle_qxfer_traceframe_info): New.
2330 (qxfer_packets): Register "traceframe-info".
2331 (handle_query): Report support for qXfer:traceframe-info:read+.
2332 * tracepoint.c (match_blocktype): New.
2333 (traceframe_find_block_type): Rename to ...
2334 (traceframe_walk_blocks): ... this. Add callback filter argument,
2335 and use it.
2336 (traceframe_find_block_type): New, reimplemented on top of
2337 traceframe_walk_blocks.
2338 (build_traceframe_info_xml): New.
2339 (traceframe_read_info): New.
2340 * server.h (traceframe_read_info): Declare.
2341
4f3e6fb7
YQ
23422011-02-11 Yao Qi <yao@codesourcery.com>
2343
2344 * configure.ac: Call AC_PROG_RANLIB.
2345 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2346 * configure: Regenerate.
2347
764880b7
PA
23482011-02-07 Pedro Alves <pedro@codesourcery.com>
2349
2350 * server.c (gdb_read_memory): Change return semantics to allow
2351 partial transfers.
2352 (handle_search_memory_1): Adjust.
2353 (process_serial_event) <'m' packet>: Handle partial transfers.
2354 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2355
1c79eb8a
PA
23562011-01-28 Pedro Alves <pedro@codesourcery.com>
2357
2358 * regcache.c (init_register_cache): Initialize
2359 regcache->register_status.
2360 (free_register_cache): Release regcache->register_status.
2361 (regcache_cpy): Copy register_status.
2362 (registers_to_string): Print 'x's for unavailable registers.
2363 (supply_register): Mark the register's status valid or
2364 unavailable, depending on whether a buffer was passed in or not.
2365 (supply_register_zeroed): New.
2366 (supply_regblock): Mark the registers' status valid or
2367 unavailable, depending on whether a buffer was passed in or not.
2368 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2369 (struct regcache): New `register_status' field.
2370 (supply_register_zeroed): Declare.
2371 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2372 supply_register_zeroed, rather than passing a NULL buffer to
2373 supply_register.
2374 * tracepoint.c (fetch_traceframe_registers): Update comment.
2375
85724a0e
PA
23762011-01-28 Pedro Alves <pedro@codesourcery.com>
2377
2378 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2379 buffer explicit.
2380
d08aafef
PA
23812011-01-25 Pedro Alves <pedro@codesourcery.com>
2382
2383 * server.h (decode_xfer_write): Change prototype.
2384 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2385 and don't extract the annex here.
2386 * server.c (decode_xfer_read): Remove `annex' parameter,
2387 and don't extract the annex here.
2388 (decode_xfer): New.
2389 (struct qxfer): New.
2390 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2391 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2392 (handle_qxfer_statictrace): New functions, abstracted out from
2393 handle_query, and made to use the struct qxfer interface.
2394 (handle_threads_qxfer_proper): Rename to ...
2395 (handle_qxfer_threads_proper): ... this.
2396 (handle_threads_qxfer): Rename to ...
2397 (handle_qxfer_threads): ... this. Adjust.
2398 (qxfer_packets): New array.
2399 (handle_qxfer): New function.
2400 (handle_query): Use handle_qxfer.
2401
493e2a69
MS
24022011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2403
2404 * gdbreplay.c: Shorten lines of >= 80 columns.
2405 * linux-low.c: Ditto.
2406 * linux-ppc-low.c: Ditto.
2407 * linux-s390-low.c: Ditto.
2408 * linux-sparc-low.c: Ditto.
2409 * linux-x86-low.c: Ditto.
2410 * linux-xtensa-low.c: Ditto.
2411 * mem-break.c: Ditto.
2412 * nto-low.c: Ditto.
2413 * regcache.h: Ditto.
2414 * remote-utils.c: Ditto.
2415 * server.c: Ditto.
2416 * server.h: Ditto.
2417 * thread-db.c: Ditto.
2418 * tracepoint.c: Ditto.
2419 * utils.c: Ditto.
2420 * win32-low.h: Ditto.
2421
44944448
JB
24222011-01-05 Joel Brobecker <brobecker@adacore.com>
2423
2424 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2425 update.
2426
71ce852c
JB
24272011-01-01 Joel Brobecker <brobecker@adacore.com>
2428
2429 * server.c (gdbserver_version): Update copyright year in version
2430 output.
2431 * gdbreplay.c (gdbreplay_version): Ditto.
2432
eb826dc6
MF
24332010-12-29 Jie Zhang <jie.zhang@analog.com>
2434
2435 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2436 * linux-bfin-low.c: New file.
2437 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2438 PT_DATA_ADDR for BFIN targets.
2439 * Makefile.in (SFILES): Add linux-bfin-low.c.
2440 (clean): Remove reg-bfin.c.
2441 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2442 * README: Mention supported Blackfin targets.
2443
39ab222a
MF
24442010-12-23 Mike Frysinger <vapier@gentoo.org>
2445
2446 * .gitignore: New file.
2447
a1f2ce7d
MF
24482010-11-16 Mike Frysinger <vapier@gentoo.org>
2449
2450 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2451
f474844c
JZ
24522010-10-22 Jie Zhang <jie@codesourcery.com>
2453
2454 * Makefile.in: Add FLAGS_TO_PASS variable.
2455 (install): Remove dependency of install-only and recursively
2456 invoke make for install-only.
2457
f1048712
DE
24582010-10-04 Doug Evans <dje@google.com>
2459
2460 * Makefile.in (uninstall): Use $(DESTDIR).
2461
b53a1623
PA
24622010-09-24 Pedro Alves <pedro@codesourcery.com>
2463
e6ee044d
PA
2464 PR gdb/11842
2465
b53a1623
PA
2466 * linux-x86-low.c (compat_siginfo_from_siginfo)
2467 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2468 si_code is < 0. Check for si_code == SI_TIMER before checking for
2469 si_code < 0.
2470
fa1bd1e4
JB
24712010-09-13 Joel Brobecker <brobecker@adacore.com>
2472
2473 * lynx-i386-low.c: New file.
2474 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2475
47fac8f8
JB
24762010-09-13 Joel Brobecker <brobecker@adacore.com>
2477
2478 * lynx-low.c (ptrace_request_to_str): Remove handling for
2479 request values that have been removed in LynxOS 5.x.
2480
1adfc54d
JB
24812010-09-13 Joel Brobecker <brobecker@adacore.com>
2482
2483 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2484 <ptrace.h>
2485
c2a66c29
NS
24862010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2487
2488 * configure.ac: Add --enable-inprocess-agent option.
2489 * configure: Rebuilt.
2490
32fcada3
YQ
24912010-09-06 Yao Qi <yao@codesourcery.com>
2492
2493 * linux-low.c (linux_kill): Remove unused variable.
2494 (linux_stabilize_threads): Likewise.
2495 * server.c (start_inferior): Likewise.
2496 (queue_stop_reply_callback): Likewise.
2497 * tracepoint.c (do_action_at_tracepoint): Likewise.
2498
0cccb683
YQ
24992010-09-06 Yao Qi <yao@codesourcery.com>
2500
2501 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2502 on return.
2503
423ec54c
JK
25042010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2505
2506 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2507
12ac6819
PA
25082010-09-06 Pedro Alves <pedro@codesourcery.com>
2509
2510 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2511 "$(IPA_DEPFILES)".
2512
8ed54b31
JB
25132010-09-01 Joel Brobecker <brobecker@adacore.com>
2514
2515 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2516 gdbserver/lynx-ppc-low.c: New files.
2517 * Makefile.in (lynx_low_h): New variable.
2518 (lynx-low.o, lynx-ppc-low.o): New rules.
2519 * configure.ac: On LynxOS, link with -lnetinet.
2520 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2521 * configure: regenerate.
2522
bb0116a4
JB
25232010-09-01 Joel Brobecker <brobecker@adacore.com>
2524
2525 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2526 * configure.ac: Add check for vasprintf and vsnprintf.
2527 * configure, config.in: Regenerate.
2528 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2529
a778ab81 25302010-09-01 Joel Brobecker <brobecker@adacore.com>
2531
2532 * gdbreplay.c: Move include of alloca.h up, next to include of
2533 malloc.h.
2534 * server.h: Add include of malloc.h.
2535 * mem-break.c: Remove include of malloc.h.
2536 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2537
8b034a19 25382010-09-01 Joel Brobecker <brobecker@adacore.com>
2539
2540 * Makefile.in (memmem.o): Build with -Wno-error.
2541
25422010-09-01 Joel Brobecker <brobecker@adacore.com>
2543
2544 * utils.c (xsnprintf): Make non-static.
2545 * server.h: Add xsnprintf declaration.
2546 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2547 replace calls to snprintf by calls to xsnprintf throughout.
2548
25492010-09-01 Joel Brobecker <brobecker@adacore.com>
2550
2551 * configure.ac: Add configure check for alloca.
2552 * configure, config.in: Regenerate.
2553 * server.h: Include alloca.h if it exists.
2554 * gdbreplay.c: Include alloca.h if it exists.
2555
1a981360
PA
25562010-08-28 Pedro Alves <pedro@codesourcery.com>
2557
2558 * linux-low.c (__SIGRTMIN): Define if not already defined.
2559 (linux_create_inferior): Check for __ANDROID__ rather than
2560 __SIGRTMIN.
2561 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2562 are already deferred.
2563 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2564 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2565 stopped and already has a pending signal to report.
2566 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2567 a pending signal to report or is moving out of a jump pad.
2568 (linux_init_signals): Check for __ANDROID__ rather than
2569 __SIGRTMIN.
2570
b4d51a55
PA
25712010-08-28 Pedro Alves <pedro@codesourcery.com>
2572
2573 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2574 debug_threads check. Avoid a linear search when not doing debug
2575 output.
2576
ec48365d
PA
25772010-08-27 Pedro Alves <pedro@codesourcery.com>
2578
2579 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2580 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2581 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2582 (process_event): Change local fd's type to gdb_fildes_t.
2583 (create_file_handler): Adjust prototype.
2584 (delete_file_handler): Adjust prototype.
2585 (handle_file_event): Adjust prototype. Use pfildes.
2586 (create_file_event): Adjsut prototype.
2587 * remote-utils.c (remote_desc, listen_desc): Change type to
2588 gdb_fildes_t.
2589 * server.h: New gdb_fildes_t typedef.
2590 [USE_WIN32API]: Include winsock2.h.
2591 (delete_file_handler, add_file_handler): Adjust prototypes.
2592 (pfildes): Declare.
2593 * utils.c (pfildes): New.
2594
854d88f0
PA
25952010-08-27 Pedro Alves <pedro@codesourcery.com>
2596
2597 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2598 * configure: Regenerate.
2599
0146f85b
PA
26002010-08-27 Pedro Alves <pedro@codesourcery.com>
2601
2602 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2603 (linux_done_accessing_memory): ... this.
2604 (linux_target_ops): Adjust.
2605 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2606 * nto-low.c (nto_target_ops): Adjust comment.
2607 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2608 * spu-low.c (spu_target_ops): Adjust comment.
2609 * target.h (target_ops): Rename unprepare_to_access_memory field
2610 to done_accessing_memory.
2611 (unprepare_to_access_memory): Rename to ...
2612 (done_accessing_memory): ... this.
2613
90d74c30
PA
26142010-08-26 Pedro Alves <pedro@codesourcery.com>
2615
2616 * linux-low.c (linux_prepare_to_access_memory): New.
2617 (linux_unprepare_to_access_memory): New.
2618 (linux_target_ops): Install them.
2619 * server.c (read_memory): Rename to ...
2620 (gdb_read_memory): ... this. Use
2621 prepare_to_access_memory/prepare_to_access_memory.
2622 (write_memory): Rename to ...
2623 (gdb_write_memory): ... this. Use
2624 prepare_to_access_memory/prepare_to_access_memory.
2625 (handle_search_memory_1): Adjust.
2626 (process_serial_event): Adjust.
2627 * target.h (struct target_ops): New fields
2628 prepare_to_access_memory and unprepare_to_access_memory.
2629 (prepare_to_access_memory, unprepare_to_access_memory): New.
2630 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2631 prepare_to_access_memory/prepare_to_access_memory.
2632 * nto-low.c (nto_target_ops): Adjust.
2633 * spu-low.c (spu_target_ops): Adjust.
2634 * win32-low.c (win32_target_ops): Adjust.
2635
fd467969
PA
26362010-08-26 Pedro Alves <pedro@codesourcery.com>
2637
2638 * Makefile.in (WARN_CFLAGS): Get it from configure.
2639 (WERROR_CFLAGS): New.
2640 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2641 * configure.ac: Introduce --enable-werror, which adds -Werror to
2642 the compiler command line. Enabled by default. Disable with
2643 --disable-werror. Add -Wdeclaration-after-statement
2644 Wpointer-arith and -Wformat-nonliteral to warning flags.
2645 * configure: Regenerate.
2646
331e2f5f
PA
26472010-08-26 Pedro Alves <pedro@codesourcery.com>
2648
2649 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2650
e581f2b4
PA
26512010-08-26 Pedro Alves <pedro@codesourcery.com>
2652
2653 * gdbreplay.c (remote_error): New.
2654 (gdbchar): New.
2655 (expect): Use gdbchar. Check for error reading from GDB.
2656 Clarify sync error output.
2657 (play): Check for errors writing to GDB.
2658 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2659 * remote-utils.c (getpkt): Check for errors writing to the remote
2660 descriptor.
2661
3c11dd79
PA
26622010-08-25 Pedro Alves <pedro@codesourcery.com>
2663
2664 * linux-low.c (linux_wait_1): Move non-debugging code out of
2665 `debug_threads' control.
2666
d20a8ad9
PA
26672010-08-25 Pedro Alves <pedro@codesourcery.com>
2668
2669 * linux-low.c (linux_wait_1): Don't set last_status here.
2670 * server.c (push_event, queue_stop_reply_callback): Assert we're
2671 not pushing a TARGET_WAITKIND_IGNORE event.
2672 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2673 (myresume, handle_target_event): Set the thread's last_resume_kind
2674 and last_status from the target returned status.
2675
964e4306
PA
26762010-08-25 Pedro Alves <pedro@codesourcery.com>
2677
2678 PR threads/10729
2679
2680 * linux-x86-low.c (update_debug_registers_callback): New.
2681 (i386_dr_low_set_addr): Use it.
2682 (i386_dr_low_get_addr): New.
2683 (i386_dr_low_set_control): Use update_debug_registers_callback.
2684 (i386_dr_low_get_control): New.
2685 (i386_dr_low_get_status): Adjust.
2686 * linux-low.c (linux_stop_lwp): New.
2687 * linux-low.h (linux_stop_lwp): Declare.
2688
2689 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2690 argument instead of a i386_debug_reg_state.
2691 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2692 a i386_debug_reg_state.
2693 (i386_insert_aligned_watchpoint): Adjust.
2694 (i386_remove_aligned_watchpoint): Adjust.
2695 (i386_low_stopped_data_address): Read the debug registers from the
2696 inferior instead of from the mirrors.
2697 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2698 (i386_dr_low_get_addr): Declare.
2699 (i386_dr_low_get_control): Declare.
2700 (i386_dr_low_get_status): Change prototype.
2701
2702 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2703 (i386_dr_low_get_addr): New.
2704 (i386_dr_low_get_control): New.
2705 (i386_dr_low_get_status): Adjust prototype. Return
2706 dr_status_mirror.
2707 (i386_initial_stuff): Clear dr_status_mirror and
2708 dr_control_mirror.
2709 (i386_get_thread_context): Adjust.
2710 (i386_set_thread_context): Adjust.
2711 (i386_thread_added): Adjust.
2712
5f21a75b
PA
27132010-08-24 Pedro Alves <pedro@codesourcery.com>
2714
2715 * linux-low.h (linux_thread_area): Delete declaration.
2716
3e4c1235
TS
27172010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2718
2719 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2720 after its termination.
2721
1971b033
PA
27222010-08-09 Pedro Alves <pedro@codesourcery.com>
2723
2724 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2725 (gdb_wants_all_stopped): Delete.
2726 (linux_wait_1): Don't call them.
2727 * server.c (handle_v_cont): Tag all threads as want-stopped.
2728 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2729 stopped as "client-wants-stopped".
2730
310444ac
PA
27312010-07-31 Pedro Alves <pedro@codesourcery.com>
2732
2733 * Makefile.in (signals_h): New.
2734 (server_h): Depend on it.
2735 (server.o): Don't depend on $(signals_def).
2736 (signals.o): Depend on $(signals_def).
2737
a19cae16
JK
27382010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2739
2740 * Makefile.in (signals_def): New.
2741 (server_h): Append include/gdb/signals.h and signals_def.
2742 (server.o): Append signals_def.
2743
30d50328
JK
27442010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2745
2746 * server.c (handle_target_event): Use target_signal_to_host for
2747 resume_info.sig initialization.
2748 * target.h (struct thread_resume) <sig>: New comment.
2749
5c3216e2
OS
27502010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2751
c6f46ca0
OS
2752 * server.c (handle_query): strcpy() the returned string from paddress()
2753 instead of sprintf().
5c3216e2
OS
2754 * utils.c (paddress): Return phex_nz().
2755
6bd31874
JB
27562010-07-07 Joel Brobecker <brobecker@adacore.com>
2757
2758 * server.c (handle_v_cont): Call mourn_inferior if process
2759 just exited.
2760 (myresume): Likewise.
2761
0fb4aa4b
PA
27622010-07-01 Pedro Alves <pedro@codesourcery.com>
2763
2764 Static tracepoints, and integration with UST.
2765
2766 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2767 * mem-break.c (uninsert_all_breakpoints)
2768 (reinsert_all_breakpoints): New.
2769 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2770 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2771 (gdb_agent_ust_loaded, helper_thread_id)
2772 (gdb_agent_helper_thread_id): New macros.
2773 (struct ipa_sym_addresses): Add addr_ust_loaded,
2774 addr_helper_thread_id, addr_cmd_buf.
2775 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2776 (in_process_agent_loaded_ust): New.
2777 (write_e_ust_not_loaded): New.
2778 (maybe_write_ipa_ust_not_loaded): New.
2779 (struct collect_static_trace_data_action): New.
2780 (enum tracepoint_type) <static_tracepoint>: New.
2781 (struct tracepoint) <handle>: Mention static tracepoints.
2782 (struct static_tracepoint_ctx): New.
2783 (CMD_BUF_SIZE): New.
2784 (add_tracepoint_action): Handle static tracepoint actions.
2785 (unprobe_marker_at): New.
2786 (clear_installed_tracepoints): Handle static tracepoints.
2787 (cmd_qtdp): Handle static tracepoints.
2788 (probe_marker_at): New.
2789 (cmd_qtstart): Handle static tracepoints.
2790 (response_tracepoint): Handle static tracepoints.
2791 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2792 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2793 (get_context_regcache): Handle static tracepoints.
2794 (do_action_at_tracepoint): Handle static tracepoint actions.
2795 (traceframe_find_block_type): Handle static trace data blocks.
2796 (traceframe_read_sdata): New.
2797 (download_tracepoints): Download static tracepoint actions.
2798 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2799 (GDB_PROBE_NAME): New.
2800 (ust_ops): New.
2801 (GET_UST_SYM): New.
2802 (USTF): New.
2803 (dlsym_ust): New.
2804 (ust_marker_to_static_tracepoint): New.
2805 (gdb_probe): New.
2806 (collect_ust_data_at_tracepoint): New.
2807 (gdb_ust_probe): New.
2808 (UNIX_PATH_MAX, SOCK_DIR): New.
2809 (gdb_ust_connect_sync_socket): New.
2810 (resume_thread, stop_thread): New.
2811 (run_inferior_command): New.
2812 (init_named_socket): New.
2813 (gdb_ust_socket_init): New.
2814 (cstr_to_hexstr): New.
2815 (next_st): New.
2816 (first_marker, next_marker): New.
2817 (response_ust_marker): New.
2818 (cmd_qtfstm, cmd_qtsstm): New.
2819 (unprobe_marker_at, probe_marker_at): New.
2820 (cmd_qtstmat, gdb_ust_thread): New.
2821 (gdb_ust_init): New.
2822 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2823 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2824 (ST_REGENTRY): New.
2825 (x86_64_st_collect_regmap): New.
2826 (X86_64_NUM_ST_COLLECT_GREGS): New.
2827 (AMD64_RIP_REGNUM): New.
2828 (supply_static_tracepoint_registers): New.
2829 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2830 (ST_REGENTRY): New.
2831 (i386_st_collect_regmap): New.
2832 (i386_NUM_ST_COLLECT_GREGS): New.
2833 (supply_static_tracepoint_registers): New.
2834 * server.c (handle_query): Handle qXfer:statictrace:read.
2835 <qSupported>: Report support for StaticTracepoints, and
2836 qXfer:statictrace:read features.
2837 * server.h (traceframe_read_sdata)
2838 (supply_static_tracepoint_registers): Declare.
2839 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2840 (unpack_varlen_hex): Include in IPA build.
2841 * Makefile.in (ustlibs, ustinc): New.
2842 (IPA_OBJS): Add remote-utils-ipa.o.
2843 ($(IPA_LIB)): Link -ldl and -lpthread.
2844 (UST_CFLAGS): New.
2845 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2846 * config.in, configure: Regenerate.
2847
9e4344e5
PA
28482010-06-20 Ian Lance Taylor <iant@google.com>
2849 Pedro Alves <pedro@codesourcery.com>
2850
2851 * linux-x86-low.c (always_true): Delete.
2852 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2853 trying to fool the compiler with always_true.
2854
c6beb2cb
PA
28552010-06-20 Pedro Alves <pedro@codesourcery.com>
2856
2857 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2858 conditions in gdbserver.
2859
d2ed6730
UW
28602010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2861
2862 * spu-low.c (spu_read_memory): Wrap around local store limit.
2863 (spu_write_memory): Likewise.
2864
4e29fb54
PA
28652010-06-15 Pedro Alves <pedro@codesourcery.com>
2866
2867 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2868 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2869 LONGEST uses.
2870 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2871 uses.
2872 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2873 uses with LONGEST uses.
2874
6a271cae
PA
28752010-06-14 Stan Shebs <stan@codesourcery.com>
2876 Pedro Alves <pedro@codesourcery.com>
2877
2878 Bytecode compiler.
2879
2880 * linux-x86-low.c: Include limits.h.
2881 (add_insns): New.
2882 (always_true): New.
2883 (EMIT_ASM): New.
2884 (EMIT_ASM32): New.
2885 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2886 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2887 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2888 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2889 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2890 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2891 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2892 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2893 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2894 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2895 (amd64_emit_void_call_2): New.
2896 (amd64_emit_ops): New.
2897 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2898 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2899 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2900 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2901 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2902 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2903 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2904 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2905 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2906 (i386_emit_stack_adjust, i386_emit_int_call_1)
2907 (i386_emit_void_call_2): New.
2908 (i386_emit_ops): New.
2909 (x86_emit_ops): New.
2910 (the_low_target): Install x86_emit_ops.
2911 * server.h (struct emit_ops): New.
2912 (get_raw_reg_func_addr): Declare.
2913 (current_insn_ptr, emit_error): Declare.
2914 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2915 (set_trace_state_variable_value): New defines.
2916 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2917 addr_get_trace_state_variable_value and
2918 addr_set_trace_state_variable_value.
2919 (symbol_list): New fields for get_raw_reg,
2920 get_trace_state_variable_value and set_trace_state_variable_value.
2921 (condfn): New typedef.
2922 (struct tracepoint): New field `compiled_cond'.
2923 (do_action_at_tracepoint): Clear compiled_cond.
2924 (get_trace_state_variable_value, set_trace_state_variable_value):
2925 Export in the IPA.
2926 (condition_true_at_tracepoint): If there's a compiled condition,
2927 run that.
2928 (current_insn_ptr, emit_error): New globals.
2929 (struct bytecode_address): New.
2930 (get_raw_reg_func_addr): New.
2931 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2932 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2933 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2934 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2935 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2936 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2937 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2938 (compile_tracepoint_condition, compile_bytecodes): New.
2939 * target.h (emit_ops): Forward declare.
2940 (struct target_ops): New field emit_ops.
2941 (target_emit_ops): New.
2942 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2943 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2944 * linux-low.c (linux_emit_ops): New.
2945 (linux_target_ops): Install it.
2946 * linux-low.h (struct linux_target_ops): New field emit_ops.
2947
92b72907
UW
29482010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2949
2950 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2951 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2952
fa593d66
PA
29532010-06-01 Pedro Alves <pedro@codesourcery.com>
2954 Stan Shebs <stan@codesourcery.com>
2955
2956 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2957 (all): Depend on $(extra_libraries).
2958 (install-only): Install the IPA.
2959 (IPA_OBJS, IPA_LIB): New.
2960 (clean): Remove the IPA lib.
2961 (IPAGENT_CFLAGS): New.
2962 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2963 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2964 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2965 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2966 * configure.ac: Check for atomic builtins support in the compiler.
2967 (IPA_DEPFILES, extra_libraries): Define.
2968 * configure.srv (ipa_obj): Add description.
2969 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2970 (i[34567]86-*-linux*): Set ipa_obj.
2971 (x86_64-*-linux*): Set ipa_obj.
2972 * linux-low.c (stabilizing_threads): New.
2973 (supports_fast_tracepoints): New.
2974 (linux_detach): Stabilize threads before detaching.
2975 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2976 the lwp is either not stabilizing, or is moving out of a jump pad.
2977 (linux_fast_tracepoint_collecting): New.
2978 (maybe_move_out_of_jump_pad): New.
2979 (enqueue_one_deferred_signal): New.
2980 (dequeue_one_deferred_signal): New.
2981 (linux_wait_for_event_1): If moving out of a jump pad, defer
2982 pending signals to later.
2983 (linux_stabilize_threads): New.
2984 (linux_wait_1): Check if threads need moving out of jump pads, and
2985 do it if so.
2986 (stuck_in_jump_pad_callback): New.
2987 (move_out_of_jump_pad_callback): New.
2988 (lwp_running): New.
2989 (linux_resume_one_lwp): Handle moving out of jump pads.
2990 (linux_set_resume_request): Dequeue deferred signals.
2991 (need_step_over_p): Also step over fast tracepoint jumps.
2992 (start_step_over): Also uninsert fast tracepoint jumps.
2993 (finish_step_over): Also reinsert fast tracepoint jumps.
2994 (linux_install_fast_tracepoint_jump): New.
2995 (linux_target_ops): Install linux_stabilize_threads and
2996 linux_install_fast_tracepoint_jump_pad.
2997 * linux-low.h (linux_target_ops) <get_thread_area,
2998 install_fast_tracepoint_jump_pad>: New fields.
2999 (struct lwp_info) <collecting_fast_tracepoint,
3000 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3001 (linux_get_thread_area): Declare.
3002 * linux-x86-low.c (jump_insn): New.
3003 (x86_get_thread_area): New.
3004 (append_insns): New.
3005 (push_opcode): New.
3006 (amd64_install_fast_tracepoint_jump_pad): New.
3007 (i386_install_fast_tracepoint_jump_pad): New.
3008 (x86_install_fast_tracepoint_jump_pad): New.
3009 (the_low_target): Install x86_get_thread_area and
3010 x86_install_fast_tracepoint_jump_pad.
3011 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3012 (struct fast_tracepoint_jump): New.
3013 (fast_tracepoint_jump_insn): New.
3014 (fast_tracepoint_jump_shadow): New.
3015 (find_fast_tracepoint_jump_at): New.
3016 (fast_tracepoint_jump_here): New.
3017 (delete_fast_tracepoint_jump): New.
3018 (set_fast_tracepoint_jump): New.
3019 (uninsert_fast_tracepoint_jumps_at): New.
3020 (reinsert_fast_tracepoint_jumps_at): New.
3021 (set_breakpoint_at): Use write_inferior_memory.
3022 (uninsert_raw_breakpoint): Use write_inferior_memory.
3023 (check_mem_read): Mask out fast tracepoint jumps.
3024 (check_mem_write): Mask out fast tracepoint jumps.
3025 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3026 (set_fast_tracepoint_jump): Declare.
3027 (delete_fast_tracepoint_jump)
3028 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3029 (reinsert_fast_tracepoint_jumps_at): Declare.
3030 * regcache.c: Don't compile many functions when building the
3031 in-process agent library.
3032 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3033 the register buffer in the heap.
3034 (free_register_cache): If the register buffer isn't owned by the
3035 regcache, don't free it.
3036 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3037 pre-existing register caches.
3038 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3039 type.
3040 (convert_ascii_to_int): : Constify `from' parameter type.
3041 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3042 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3043 the needed buffer in-place.
3044 (relocate_instruction): New.
3045 * server.c (handle_query) <qSymbols>: If the target supports
3046 tracepoints, give it a chance of looking up symbols. Report
3047 support for fast tracepoints.
3048 (handle_status): Stabilize threads.
3049 (process_serial_event): Adjust.
3050 * server.h (struct fast_tracepoint_jump): Forward declare.
3051 (struct process_info) <fast_tracepoint_jumps>: New field.
3052 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3053 (decode_X_packet, decode_M_packet): Adjust.
3054 (relocate_instruction): Declare.
3055 (in_process_agent_loaded): Declare.
3056 (tracepoint_look_up_symbols): Declare.
3057 (struct fast_tpoint_collect_status): Declare.
3058 (fast_tracepoint_collecting): Declare.
3059 (force_unlock_trace_buffer): Declare.
3060 (handle_tracepoint_bkpts): Declare.
3061 (initialize_low_tracepoint)
3062 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3063 * target.h (struct target_ops) <stabilize_threads,
3064 install_fast_tracepoint_jump_pad>: New fields.
3065 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3066 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3067 [HAVE_STDINT_H]: Include stdint.h.
3068 (trace_debug_1): Rename to ...
3069 (trace_vdebug): ... this.
3070 (trace_debug): Rename to ...
3071 (trace_debug_1): ... this. Add `level' parameter.
3072 (trace_debug): New.
3073 (ATTR_USED, ATTR_NOINLINE): New.
3074 (IP_AGENT_EXPORT): New.
3075 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3076 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3077 (about_to_request_buffer_space, trace_buffer_is_full)
3078 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3079 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3080 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3081 (traceframe_write_count, traceframes_created)
3082 (trace_state_variables)
3083 New renaming defines.
3084 (struct ipa_sym_addresses): New.
3085 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3086 (symbol_list): New.
3087 (ipa_sym_addrs): New.
3088 (all_tracepoint_symbols_looked_up): New.
3089 (in_process_agent_loaded): New.
3090 (write_e_ipa_not_loaded): New.
3091 (maybe_write_ipa_not_loaded): New.
3092 (tracepoint_look_up_symbols): New.
3093 (debug_threads) [IN_PROCESS_AGENT]: New.
3094 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3095 (UNKNOWN_SIDE_EFFECTS): New.
3096 (stop_tracing): New.
3097 (flush_trace_buffer): New.
3098 (stop_tracing_bkpt): New.
3099 (flush_trace_buffer_bkpt): New.
3100 (read_inferior_integer): New.
3101 (read_inferior_uinteger): New.
3102 (read_inferior_data_pointer): New.
3103 (write_inferior_data_pointer): New.
3104 (write_inferior_integer): New.
3105 (write_inferior_uinteger): New.
3106 (struct collect_static_trace_data_action): Delete.
3107 (enum tracepoint_type): New.
3108 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
3109 <actions_str, step_actions, step_actions_str>: Only include in
3110 GDBserver.
fa593d66
PA
3111 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3112 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3113 (tracepoints): Use IP_AGENT_EXPORT.
3114 (last_tracepoint): Don't include in the IPA.
3115 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3116 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3117 (alloced_trace_state_variables): New.
3118 (trace_state_variables): Use IP_AGENT_EXPORT.
3119 (traceframe_t): Delete unused variable.
3120 (circular_trace_buffer): Don't include in the IPA.
3121 (trace_buffer_start): Delete.
3122 (struct trace_buffer_control): New.
3123 (trace_buffer_free): Delete.
3124 (struct ipa_trace_buffer_control): New.
3125 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3126 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3127 New.
3128 (trace_buffer_ctrl): New.
3129 (TRACE_BUFFER_CTRL_CURR): New.
3130 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3131 Reimplement as macros.
3132 (trace_buffer_wrap): Delete.
3133 (traceframe_write_count, traceframe_read_count)
3134 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3135 (struct tracepoint_hit_ctx) <type>: New field.
3136 (struct fast_tracepoint_ctx): New.
3137 (memory_barrier): New.
3138 (cmpxchg): New.
3139 (record_tracepoint_error): Update atomically in the IPA.
3140 (clear_inferior_trace_buffer): New.
3141 (about_to_request_buffer_space): New.
3142 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3143 updating the same buffer.
3144 (add_tracepoint): Default the tracepoint's type to trap
3145 tracepoint, and orig_size to -1.
3146 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3147 internal variables.
3148 (create_trace_state_variable): New parameter `gdb'. Handle it.
3149 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3150 (cmd_qtdp): Handle fast tracepoints.
3151 (cmd_qtdv): Adjust.
3152 (max_jump_pad_size): New.
3153 (gdb_jump_pad_head): New.
3154 (get_jump_space_head): New.
3155 (claim_jump_space): New.
3156 (sort_tracepoints): New.
3157 (MAX_JUMP_SIZE): New.
3158 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3159 IPA.
3160 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3161 support. Upload fast traceframes, and delete internal IPA
3162 breakpoints.
3163 (stop_tracing_handler): New.
3164 (flush_trace_buffer_handler): New.
3165 (cmd_qtstop): Upload fast tracepoints.
3166 (response_tracepoint): Handle fast tracepoints.
3167 (tracepoint_finished_step): Upload fast traceframes. Set the
3168 tracepoint hit context's tracepoint type.
3169 (handle_tracepoint_bkpts): New.
3170 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3171 type. Add comment about fast tracepoints.
3172 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3173 non-existing action_str field.
3174 (get_context_regcache): Handle fast tracepoints.
3175 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3176 to the regcache.
3177 (fast_tracepoint_from_jump_pad_address): New.
3178 (fast_tracepoint_from_ipa_tpoint_address): New.
3179 (collecting_t): New.
3180 (force_unlock_trace_buffer): New.
3181 (fast_tracepoint_collecting): New.
3182 (collecting): New.
3183 (gdb_collect): New.
3184 (write_inferior_data_ptr): New.
3185 (target_tp_heap): New.
3186 (target_malloc): New.
3187 (download_agent_expr): New.
3188 (UALIGN): New.
3189 (download_tracepoints): New.
3190 (download_trace_state_variables): New.
3191 (upload_fast_traceframes): New.
3192 (IPA_FIRST_TRACEFRAME): New.
3193 (IPA_NEXT_TRACEFRAME_1): New.
3194 (IPA_NEXT_TRACEFRAME): New.
3195 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3196 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3197 (gdb_jump_pad_buffer_end): New.
3198 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3199 (initialize_tracepoint): Adjust.
3200 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3201 buffer. Initialize the low module.
3202 * utils.c (PREFIX, TOOLNAME): New.
3203 (malloc_failure): Use PREFIX.
3204 (error): In the IPA, an error causes an exit.
3205 (fatal, warning): Use PREFIX.
3206 (internal_error): Use TOOLNAME.
3207 (NUMCELLS): Increase to 10.
3208 * configure, config.in: Regenerate.
3209
d149dd1d
PA
32102010-06-01 Pedro Alves <pedro@codesourcery.com>
3211
3212 * server.c (handle_query) <qSupported>: Do two passes over the
3213 qSupported string to avoid nesting strtok.
3214
f6528abd
JK
32152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3216
3217 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3218 (CDEPS): New.
3219 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3220 -Wl,--dynamic-list.
3221 * configure: Regenerate.
3222 * proc-service.list: New.
3223
ca2a87a0
JK
32242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3225
3226 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3227 New comment.
3228
363a6e9f
OS
32292010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3230
3231 * gdbreplay.c (remote_open): Check error return from socket() call by
3232 its equality to -1 not by it being negative.
3233 * remote-utils.c (remote_open): Likewise.
3234
d23b6cb1
PA
32352010-05-23 Pedro Alves <pedro@codesourcery.com>
3236
3237 * config.h: Regenerate.
3238
28d3cf85
MK
32392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3240
3241 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3242 doesn't provide PTRACE_GET_THREAD_AREA.
3243
fea36a59
MK
32442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3245
3246 * linux-m68k-low.c: Include <asm/ptrace.h>
3247 (ps_get_thread_area): Implement.
3248
24b066ba
DE
32492010-05-03 Doug Evans <dje@google.com>
3250
3251 * event-loop.c (struct callback_event): New struct.
3252 (callback_list): New global.
3253 (append_callback_event, delete_callback_event): New functions.
3254 (process_callback): New function.
3255 (start_event_loop): Call it.
3256 * remote-utils.c (NOT_SCHEDULED): Define.
3257 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3258 moved out of readchar.
3259 (readchar): Rewrite. Call reschedule before returning.
3260 (reset_readchar): New function.
3261 (remote_close): Call it.
3262 (process_remaining, reschedule): New functions.
3263 * server.h (callback_handler_func): New typedef.
3264 (append_callback_event, delete_callback_event): Declare.
3265
9836d6ea
PA
32662010-05-03 Pedro Alves <pedro@codesourcery.com>
3267
3268 * proc-service.c (ps_pglobal_lookup): Use
3269 thread_db_look_up_one_symbol.
3270 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3271 parameter. Use it instead of all_symbols_looked_up.
3272 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3273 field.
3274 (all_symbols_looked_up): Don't declare.
3275 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3276 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3277 field.
3278 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3279 Set all_symbols_looked_up here.
3280 (thread_db_look_up_one_symbol): New.
3281 (thread_db_get_tls_address): Adjust.
3282 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3283 thread_db object on the heap, and tentatively set it in the
3284 process structure.
3285 (thread_db_init): Don't set all_symbols_looked_up here.
3286 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3287
7984d532
PA
32882010-05-03 Pedro Alves <pedro@codesourcery.com>
3289
3290 * linux-low.c (linux_kill, linux_detach): Adjust.
3291 (status_pending_p_callback): Remove redundant statement. Check
3292 for !TARGET_WAITIKIND_IGNORE, instead of
3293 TARGET_WAITKIND_STOPPED.
3294 (handle_tracepoints): Make sure LWP is locked. Adjust.
3295 (linux_wait_for_event_1): Adjust.
3296 (linux_cancel_breakpoints): New.
3297 (unsuspend_one_lwp): New.
3298 (unsuspend_all_lwps): New.
3299 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3300 (send_sigstop_callback): Change return type to int, add new
3301 `except' parameter and handle it.
3302 (suspend_and_send_sigstop_callback): New.
3303 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3304 pass them down. If SUSPEND, also increment the lwp's suspend
3305 count.
3306 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3307 (need_step_over_p): Don't consider suspended LWPs.
3308 (start_step_over): Adjust.
3309 (proceed_one_lwp): Change return type to int, add new `except'
3310 parameter and handle it.
3311 (unsuspend_and_proceed_one_lwp): New.
3312 (proceed_all_lwps): Use find_inferior instead of
3313 for_each_inferior.
3314 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3315 also decrement the suspend count of LWPs. Pass `except' down,
3316 instead of hacking its suspend count.
3317 (linux_pause_all): Add `freeze' parameter. Adjust.
3318 (linux_unpause_all): New.
3319 (linux_target_ops): Install linux_unpause_all.
3320 * server.c (handle_status): Adjust.
3321 * target.h (struct target_ops): New fields `unpause_all' and
3322 `cancel_breakpoints'. Add new parameter to `pause_all'.
3323 (pause_all): Add new `freeze' parameter.
3324 (unpause_all): New.
3325 (cancel_breakpoints): New.
3326 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3327 cancel breakpoints.
3328 (cmd_qtstart): Pause threads.
3329 (stop_tracing): Pause threads, and cancel breakpoints.
3330 * win32-low.c (win32_target_ops): Adjust.
3331
e471f25b
PA
33322010-05-03 Pedro Alves <pedro@codesourcery.com>
3333
3334 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3335 the inferior right away from here...
3336 (linux_wait_1): ... to here, and adjust to check the thread's
3337 last_resume_kind instead of the lwp's step or stop_expected flags.
3338
1915ef4f
PA
33392010-05-02 Pedro Alves <pedro@codesourcery.com>
3340
3341 * README: Use consistent `GDB' and `GDBserver' spellings.
3342
f9e39928
PA
33432010-05-02 Pedro Alves <pedro@codesourcery.com>
3344
3345 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3346 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3347 (linux_detach_one_lwp): Assume the lwp is stopped.
3348 (any_thread_of): Delete.
3349 (linux_detach): Stop all lwps here. Don't blindly delete all
3350 breakpoints.
3351 (delete_lwp_callback): New.
3352 (linux_mourn): Delete all lwps of the process that is gone.
3353 (linux_wait_1): Don't delete the last lwp of the process here.
3354 * mem-break.h (mark_breakpoints_out): Declare.
3355 * mem-break.c (mark_breakpoints_out): New.
3356 (free_all_breakpoints): Use it.
3357 * server.c (handle_target_event): If the process is gone, mark
3358 breakpoints out.
3359 * thread-db.c (struct thread_db) <create_bp>: New field.
3360 (thread_db_enable_reporting): Fix prototype. Store a thread event
3361 breakpoint reference in the thread_db struct.
3362 (thread_db_load_search): Clear the thread_db object.
3363 (try_thread_db_load_1): Ditto.
3364 (switch_to_process): New.
3365 (disable_thread_event_reporting): Use it.
3366 (remove_thread_event_breakpoints): New.
3367 (thread_db_detach, thread_db_mourn): Use it.
3368
1e7fc18c
PA
33692010-05-01 Pedro Alves <pedro@codesourcery.com>
3370
3371 * linux-low.c (linux_enable_event_reporting): New.
3372 (linux_wait_for_event_1, handle_extended_wait): Use it.
3373
02fc4de7
PA
33742010-04-30 Pedro Alves <pedro@codesourcery.com>
3375
3376 * linux-low.c (linux_kill_one_lwp, linux_kill)
3377 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3378 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3379 SIGSTOP even if the LWP is stopped.
3380 (send_sigstop_callback): New.
3381 (stop_all_lwps): Use send_sigstop_callback instead.
3382 (linux_resume_one_thread): Adjust.
3383 (proceed_one_lwp): Still proceed an LWP that the client has
3384 requested to stop, if we haven't reported it as stopped yet. Make
3385 sure that LWPs the client want stopped, have a pending SIGSTOP.
3386
bc3b5632
DE
33872010-04-26 Doug Evans <dje@google.com>
3388
ae1ada35
DE
3389 * server.c (handle_general_set): Make static.
3390
bc3b5632
DE
3391 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3392 Print received char after testing for error/eof instead of before.
3393 (input_interrupt): Tweak comment.
3394
65730243
DE
33952010-04-23 Doug Evans <dje@google.com>
3396
3397 * server.c (start_inferior): Print inferior argv if --debug.
3398
a8ae7dc0
AR
33992010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3400
3401 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3402 * nto-x86-low.c: Include server.h
3403
1c07cc19
PM
34042010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3405
3406 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3407 be consistent with other sources of this directory.
3408 (init_registers_amd64): Correct name of source file of this function
3409 in the comment.
3410
e0a61e09
PM
34112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3412
3413 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3414 64-bit executables.
3415
54709339
PM
34162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3417
3418 * win32-i386-low.c: Add 64-bit support.
3419 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3420 (init_registers_amd64): Declare.
3421 (mappings): Add 64-bit version of array.
3422 (init_windows_x86): New function.
3423 (the_low_target): Change init_arch field to init_windows_x86.
3424
e8f0053d
PM
34252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3426
3427 * win32-low.c: Adapt to support also 64-bit architecture.
3428 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3429 (get_image_name): Use SIZE_T type for local variable `done'.
3430 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3431 (toolhelp_get_dll_name): Idem.
3432 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3433 Use uintptr_t typecast to avoid warning.
3434 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3435 (handle_exception): Use phex_nz to avoid warning.
3436 (win32_wait): Remove unused local variable `process'.
3437
c481e77e
PM
34382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3439
3440 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3441 `amd64-avx.o'.
3442
12ea4b69
PM
34432010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3444
3445 * configure.ac: Use `ws2_32' library for srv_mingw.
3446 * configure: Regenerate.
3447 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3448 * remote-utils.c: Likewise.
3449
f6d1620c
L
34502010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3451
3452 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3453 if __x86_64__ is defined.
3454
8e642873
PM
34552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3456
3457 * configure: Regenerate.
3458
711e434b
PM
34592010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3460
3461 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3462 * target.h (target_ops): New get_tib_address field.
3463 * win32-low.h (win32_thread_info): Add thread_local_base field.
3464 * win32-low.c (child_add_thread): Add tlb argument.
3465 Set thread_local_base field to TLB.
3466 (get_child_debug_event): Adapt to child_add_thread change.
3467 (win32_get_tib_address): New function.
3468 (win32_target_ops): Set get_tib_address field to
3469 win32_get_tib_address.
3470 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3471
505106cd
PA
34722010-04-12 Pedro Alves <pedro@codesourcery.com>
3473
505106cd
PA
3474 * linux-low.c (linux_mourn): Also remove the process.
3475 * server.c (handle_target_event): Don't remove the process here.
3476 * nto-low.c (nto_mourn): New.
3477 (nto_target_ops): Install it.
3478 * spu-low.c (spu_mourn): New.
3479 (spu_target_ops): Install it.
3480 * win32-low.c (win32_mourn): New.
3481 (win32_target_ops): Install it.
3482
e8470a06
PA
34832010-04-12 Pedro Alves <pedro@codesourcery.com>
3484
3485 * server.h (buffer_xml_printf): Remove redundant `;'.
3486
45ba0d02
PA
34872010-04-12 Pedro Alves <pedro@codesourcery.com>
3488
3489 * regcache.c (set_register_cache): Invalidate regcaches before
3490 changing the register cache layout.
3491 (regcache_invalidate_one): Allow a NULL regcache.
3492 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3493 regcaches before changing the register cache layout or the target
3494 regsets.
3495
59e04013
L
34962010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3497
3498 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3499 variable warning on Linux/x86-64.
3500
8336d594
PA
35012010-04-11 Pedro Alves <pedro@codesourcery.com>
3502
3503 GDBserver disconnected tracing support.
3504
3505 * linux-low.c (linux_remove_process): Delete.
3506 (add_lwp): Don't set last_resume_kind here.
3507 (linux_kill): Use `mourn'.
3508 (linux_detach): Use `thread_db_detach', and `mourn'.
3509 (linux_mourn): New.
3510 (linux_attach_lwp_1): Adjust comment.
3511 (linux_attach): last_resume_kind moved the thread_info; adjust.
3512 (status_pending_p_callback): Adjust.
3513 (linux_wait_for_event_1): Adjust.
3514 (count_events_callback, select_singlestep_lwp_callback)
3515 (select_event_lwp_callback, cancel_breakpoints_callback)
3516 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3517 (proceed_one_lwp): Adjust.
3518 (linux_async): Add debug output.
3519 (linux_thread_stopped): New.
3520 (linux_pause_all): New.
3521 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3522 linux_pause_all.
3523 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3524 (thread_db_free): Delete declaration.
3525 (thread_db_detach, thread_db_mourn): Declare.
3526 * thread-db.c (thread_db_init): Use thread_db_mourn.
3527 (thread_db_free): Delete, split in two.
3528 (disable_thread_event_reporting): New.
3529 (thread_db_detach): New.
3530 (thread_db_mourn): New.
3531
3532 * server.h (struct thread_info) <last_resume_kind>: New field.
3533 <attached>: Add comment.
3534 <gdb_detached>: New field.
3535 (handler_func): Change return type to int.
3536 (handle_serial_event, handle_target_event): Ditto.
3537 (gdb_connected): Declare.
3538 (tracing): Delete.
3539 (disconnected_tracing): Declare.
3540 (stop_tracing): Declare.
3541
3542 * server.c (handle_query) <qSupported>: Report support for
3543 disconnected tracing.
3544 (queue_stop_reply_callback): Account for running threads.
3545 (gdb_wants_thread_stopped): New.
3546 (gdb_wants_all_threads_stopped): New.
3547 (gdb_reattached_process): New.
3548 (handle_status): Clear the `gdb_detached' flag of all processes.
3549 In all-stop, stop all threads.
3550 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3551 (process_serial_event): If the remote connection breaks, or if an
3552 exit was forced with "monitor exit", force an event loop exit.
3553 Handle disconnected tracing on detach.
3554 (handle_serial_event): Adjust.
3555 (handle_target_event): If GDB isn't connected, forward events back
3556 to the inferior, unless the last process exited, in which case,
3557 exit gdbserver. Adjust interface.
3558
3559 * remote-utils.c (remote_open): Don't block in accept. Instead
3560 register an event loop source on the listen socket file
3561 descriptor. Refactor bits into ...
3562 (listen_desc): ... this new global.
3563 (gdb_connected): ... this new function.
3564 (enable_async_notification): ... this new function.
3565 (handle_accept_event): ... this new function.
3566 (remote_close): Clear remote_desc.
3567
3568 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3569
3570 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3571 New fields.
3572 (mourn_inferior): Define.
3573 (target_process_qsupported): Avoid the dangling else problem.
3574 (thread_stopped): Define.
3575 (pause_all): Define.
3576 (target_waitstatus_to_string): Declare.
3577 * target.c (target_waitstatus_to_string): New.
3578
3579 * tracepoint.c (tracing): Make extern.
3580 (disconnected_tracing): New.
3581 (stop_tracing): Make extern. Handle tracing stops due to GDB
3582 disconnecting.
3583 (cmd_qtdisconnected): New.
3584 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3585 (handle_tracepoint_general_set): Handle QTDisconnected.
3586
3587 * event-loop.c (event_handler_func): Change return type to int.
3588 (process_event): Bail out if the event handler wants the event
3589 loop to stop.
3590 (handle_file_event): Ditto.
3591 (start_event_loop): Bail out if the event handler wants the event
3592 loop to stop.
3593
3594 * nto-low.c (nto_target_ops): Adjust.
3595 * spu-low.c (spu_wait): Don't remove the process here.
3596 (spu_target_ops): Adjust.
3597 * win32-low.c (win32_wait): Don't remove the process here.
3598 (win32_target_ops): Adjust.
3599
5d267c4c
PA
36002010-04-11 Pedro Alves <pedro@codesourcery.com>
3601
3602 * regcache.c (realloc_register_cache): Invalidate inferior's
3603 regcache before recreating it.
3604
623ccd72
PA
36052010-04-09 Pedro Alves <pedro@codesourcery.com>
3606
3607 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3608
219f2f23
PA
36092010-04-09 Stan Shebs <stan@codesourcery.com>
3610 Pedro Alves <pedro@codesourcery.com>
3611
3612 * server.h (LONGEST): New.
3613 (struct thread_info) <while_stepping>: New field.
3614 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3615 Declare.
3616 (initialize_tracepoint, handle_tracepoint_general_set)
3617 (handle_tracepoint_query, tracepoint_finished_step)
3618 (tracepoint_was_hit, release_while_stepping_state_list):
3619 (current_traceframe): Declare.
3620 * server.c (handle_general_set): Handle tracepoint packets.
3621 (read_memory): New.
3622 (write_memory): New.
3623 (handle_search_memory_1): Use read_memory.
3624 (handle_query): Report support for conditional tracepoints, trace
3625 state variables, and tracepoint sources. Handle tracepoint
3626 queries.
3627 (main): Initialize the tracepoints module.
3628 (process_serial_event): Handle traceframe reads/writes.
3629
3630 * linux-low.c (handle_tracepoints): New.
3631 (linux_wait_1): Call it.
3632 (linux_resume_one_lwp): Handle while-stepping.
3633 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3634 (linux_target_ops): Install them.
3635 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3636 New field.
3637 * linux-x86-low.c (x86_supports_tracepoints): New.
3638 (the_low_target). Install it.
3639
3640 * mem-break.h (delete_breakpoint): Declare.
3641 * mem-break.c (delete_breakpoint): Make external.
3642
3643 * target.h (struct target_ops): Add `supports_tracepoints',
3644 `read_pc', and `write_pc' fields.
3645 (target_supports_tracepoints): Define.
3646 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3647 (phex_nz): New.
3648
3649 * regcache.h (struct regcache) <registers_owned>: New field.
3650 (init_register_cache, regcache_cpy): Declare.
3651 (regcache_read_pc, regcache_write_pc): Declare.
3652 (register_cache_size): Declare.
3653 (supply_regblock): Declare.
3654 * regcache.c (init_register_cache): New.
3655 (new_register_cache): Use it.
3656 (regcache_cpy): New.
3657 (register_cache_size): New.
3658 (supply_regblock): New.
3659 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 3660
219f2f23
PA
3661 * tracepoint.c: New.
3662
3663 * Makefile.in (OBS): Add tracepoint.o.
3664 (tracepoint.o): New rule.
3665
3a13a53b
L
36662010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3667
3668 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3669 (i386-mmx.o): New.
3670 (i386-mmx.c): Likewise.
3671 (i386-mmx-linux.o): Likewise.
3672 (i386-mmx-linux.c): Likewise.
3673
3674 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3675 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3676 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3677 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3678
3679 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3680 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3681 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3682
1570b33e
L
36832010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3684
3685 * Makefile.in (clean): Updated.
3686 (i386-avx.o): New.
3687 (i386-avx.c): Likewise.
3688 (i386-avx-linux.o): Likewise.
3689 (i386-avx-linux.c): Likewise.
3690 (amd64-avx.o): Likewise.
3691 (amd64-avx.c): Likewise.
3692 (amd64-avx-linux.o): Likewise.
3693 (amd64-avx-linux.c): Likewise.
3694
3695 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3696 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3697 (srv_amd64_regobj): Add amd64-avx.o.
3698 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3699 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3700 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3701 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3702 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3703 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3704 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3705
3706 * i387-fp.c: Include "i386-xstate.h".
3707 (i387_xsave): New.
3708 (i387_cache_to_xsave): Likewise.
3709 (i387_xsave_to_cache): Likewise.
3710 (x86_xcr0): Likewise.
3711
3712 * i387-fp.h (i387_cache_to_xsave): Likewise.
3713 (i387_xsave_to_cache): Likewise.
3714 (x86_xcr0): Likewise.
3715
3716 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3717 * linux-crisv32-low.c (target_regsets): Likewise.
3718 * linux-m68k-low.c (target_regsets): Likewise.
3719 * linux-mips-low.c (target_regsets): Likewise.
3720 * linux-ppc-low.c (target_regsets): Likewise.
3721 * linux-s390-low.c (target_regsets): Likewise.
3722 * linux-sh-low.c (target_regsets): Likewise.
3723 * linux-sparc-low.c (target_regsets): Likewise.
3724 * linux-xtensa-low.c (target_regsets): Likewise.
3725
3726 * linux-low.c: Include <sys/uio.h>.
3727 (regsets_fetch_inferior_registers): Support nt_type.
3728 (regsets_store_inferior_registers): Likewise.
3729 (linux_process_qsupported): New.
3730 (linux_target_ops): Add linux_process_qsupported.
3731
3732 * linux-low.h (regset_info): Add nt_type.
3733 (linux_target_ops): Add process_qsupported.
3734
3735 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3736 and <sys/uio.h>.
3737 (init_registers_i386_avx_linux): New.
3738 (init_registers_amd64_avx_linux): Likewise.
3739 (xmltarget_i386_linux_no_xml): Likewise.
3740 (xmltarget_amd64_linux_no_xml): Likewise.
3741 (PTRACE_GETREGSET): Likewise.
3742 (PTRACE_SETREGSET): Likewise.
3743 (x86_fill_xstateregset): Likewise.
3744 (x86_store_xstateregset): Likewise.
3745 (use_xml): Likewise.
3746 (x86_linux_update_xmltarget): Likewise.
3747 (x86_linux_process_qsupported): Likewise.
3748 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3749 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3750 init_registers_i386_linux here. Call
3751 x86_linux_update_xmltarget.
3752 (the_low_target): Add x86_linux_process_qsupported.
3753
3754 * server.c (handle_query): Call target_process_qsupported.
3755
3756 * target.h (target_ops): Add process_qsupported.
3757 (target_process_qsupported): New.
3758
fc7238bb
PA
37592010-04-03 Pedro Alves <pedro@codesourcery.com>
3760
3761 * inferiors.c (add_thread): Set last_status kind to
3762 TARGET_WAITKIND_IGNORE.
3763 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3764 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3765 (linux_wait_1): Move `thread' local definition to block that uses
3766 it. Don't NULL initialize `event_child'.
3767 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3768 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3769 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3770
bdabb078
PA
37712010-04-01 Pedro Alves <pedro@codesourcery.com>
3772
3773 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3774 an extended waitstatus, or by a watchpoint.
3775 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3776 thread was stepping or has been stopped by a watchpoint.
3777
d3bbe7a0
PA
37782010-04-01 Pedro Alves <pedro@codesourcery.com>
3779
3780 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3781 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3782 of another, then delete the previous, and validate all
3783 breakpoints.
3784 (validate_inserted_breakpoint): New.
3785 (delete_disabled_breakpoints): New.
3786 (validate_breakpoints): New.
3787 (check_mem_read): Validate breakpoints before trusting their
3788 shadow. Delete disabled breakpoints.
3789 (check_mem_write): Validate breakpoints before trusting they
3790 should be inserted. Delete disabled breakpoints.
3791 * mem-break.h (validate_breakpoints):
3792 * server.c (handle_query): Validate breakpoints when we see a
3793 qSymbol query.
3794
8b07ae33
PA
37952010-04-01 Pedro Alves <pedro@codesourcery.com>
3796
3797 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3798 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3799 if we could tell there's a GDB breakpoint at stop_pc.
3800 (need_step_over_p): Don't do a step over if we find a GDB
3801 breakpoint at the resume PC.
3802
3803 * mem-break.c (struct raw_breakpoint): New.
3804 (enum bkpt_type): New type `gdb_breakpoint'.
3805 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3806 fields. New field `raw'.
3807 (find_raw_breakpoint_at): New.
3808 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3809 breakpoint instead.
3810 (set_breakpoint_at): Adjust.
3811 (delete_raw_breakpoint): New.
3812 (release_breakpoint): New.
3813 (delete_breakpoint): Rename to...
3814 (delete_breakpoint_1): ... this. Add proc parameter. Use
3815 release_breakpoint. Return ENOENT.
3816 (delete_breakpoint): Reimplement.
3817 (find_breakpoint_at): Delete.
3818 (find_gdb_breakpoint_at): New.
3819 (delete_breakpoint_at): Delete.
3820 (set_gdb_breakpoint_at): New.
3821 (delete_gdb_breakpoint_at): New.
3822 (gdb_breakpoint_here): New.
3823 (set_reinsert_breakpoint): Use release_breakpoint.
3824 (uninsert_breakpoint): Rename to ...
3825 (uninsert_raw_breakpoint): ... this.
3826 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3827 (reinsert_raw_breakpoint): Change parameter type to
3828 raw_breakpoint.
3829 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3830 instead.
3831 (check_breakpoints): Adjust. Use release_breakpoint.
3832 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3833 (breakpoint_inserted_here): Ditto.
3834 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3835 Don't trust the breakpoint's shadow if it is not inserted.
3836 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3837 (delete_all_breakpoints): Adjust.
3838 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3839 use delete_breakpoint_1.
3840
3841 * mem-break.h (breakpoints_supported): Delete declaration.
3842 (set_gdb_breakpoint_at): Declare.
3843 (gdb_breakpoint_here): Declare.
3844 (delete_breakpoint_at): Delete.
3845 (delete_gdb_breakpoint_at): Declare.
3846
3847 * server.h (struct raw_breakpoint): Forward declare.
3848 (struct process_info): New field `raw_breakpoints'.
3849
3850 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3851 breakpoints.
3852
6bf5e0ba
PA
38532010-03-24 Pedro Alves <pedro@codesourcery.com>
3854
3855 * linux-low.c (status_pending_p_callback): Fix comment.
3856 (linux_wait_for_event_1): Move most of the internal breakpoint
3857 handling from here...
3858 (linux_wait_1): ... to here.
3859 (count_events_callback): New.
3860 (select_singlestep_lwp_callback): New.
3861 (select_event_lwp_callback): New.
3862 (cancel_breakpoints_callback): New.
3863 (select_event_lwp): New.
3864 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3865 priority to all LWPs that have had events that should be reported
3866 to the client. Cancel breakpoints when about to reporting the
3867 event to the client, not while stopping lwps. No longer cancel
3868 finished single-steps here.
3869 (cancel_finished_single_step): Delete.
3870 (cancel_finished_single_steps): Delete.
3871
414a389f
PA
38722010-03-24 Pedro Alves <pedro@codesourcery.com>
3873
3874 * mem-break.c (enum bkpt_type): New.
3875 (struct breakpoint): New field `type'.
3876 (set_breakpoint_at): Change return type to struct breakpoint
3877 pointer. Set type to `other_breakpoint' by default.
3878 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3879 in the breakpoint list.
3880 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3881 (reinsert_breakpoint): Rename to ...
3882 (reinsert_raw_breakpoint): ... this.
3883 (reinsert_breakpoints_at): Adjust.
3884 * mem-break.h (struct breakpoint): Declare.
3885 (set_breakpoint_at): Change return type to struct breakpoint
3886 pointer.
3887
2280c721
PA
38882010-03-24 Pedro Alves <pedro@codesourcery.com>
3889
3890 * server.c (handle_query): Assign, not compare.
3891
d50171e4
PA
38922010-03-24 Pedro Alves <pedro@codesourcery.com>
3893
3894 Teach linux gdbserver to step-over-breakpoints.
3895
3896 * linux-low.c (can_hardware_single_step): New.
3897 (supports_breakpoints): New.
3898 (handle_extended_wait): If stopping threads, read the stop pc of
3899 the new cloned LWP.
3900 (get_pc): New.
3901 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3902 low target doesn't support retrieving the PC.
3903 (add_lwp): Set last_resume_kind to resume_continue.
3904 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3905 (linux_attach): Don't clear stop_expected. Set the lwp's
3906 last_resume_kind to resume_stop.
3907 (linux_detach_one_lwp): Don't check for removed breakpoints.
3908 (check_removed_breakpoint): Delete.
3909 (status_pending_p): Rename to ...
3910 (status_pending_p_callback): ... this. Don't check for removed
3911 breakpoints. Don't consider threads that are stopped from GDB's
3912 perspective.
3913 (linux_wait_for_lwp): Always read the stop_pc here.
3914 (cancel_breakpoint): New.
3915 (step_over_bkpt): New global.
3916 (linux_wait_for_event_1): Implement stepping over breakpoints.
3917 (gdb_wants_lwp_stopped): New.
3918 (gdb_wants_all_stopped): New.
3919 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3920 single-step traps here. Store the thread's last reported target
3921 wait status.
3922 (send_sigstop): Don't clear stop_expected. Always set it,
3923 instead.
3924 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3925 (cancel_finished_single_step): New.
3926 (cancel_finished_single_steps): New.
3927 (wait_for_sigstop): Don't cancel finished single-step traps here.
3928 (linux_resume_one_lwp): Don't check for removed breakpoints.
3929 Don't set `step' on non-hardware step archs.
3930 (linux_set_resume_request): Ignore resume_stop requests if already
3931 stopping or stopped. Set the lwp's last_resume_kind.
3932 (resume_status_pending_p): Don't check for removed breakpoints.
3933 (need_step_over_p): New.
3934 (start_step_over): New.
3935 (finish_step_over): New.
3936 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3937 requests. Clear the thread's last reported target waitstatus.
3938 Don't use the `suspended' flag. Don't consider pending breakpoints.
3939 (linux_resume): Start a step-over if necessary.
3940 (proceed_one_lwp): New.
3941 (proceed_all_lwps): New.
3942 (unstop_all_lwps): New.
3943 * linux-low.h (struct lwp_info): Rewrite comment for the
3944 `suspended' flag. Add the `stop_pc' field. Delete the
3945 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3946 Add `'last_resume_kind' and `need_step_over' fields.
3947 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3948 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3949 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3950 (set_raw_breakpoint_at): New.
3951 (set_breakpoint_at): Rewrite to use it.
3952 (reinsert_breakpoint_handler): Delete.
3953 (set_reinsert_breakpoint): New.
3954 (reinsert_breakpoint_by_bp): Delete.
3955 (delete_reinsert_breakpoints): New.
3956 (uninsert_breakpoint): Rewrite.
3957 (uninsert_breakpoints_at): New.
3958 (reinsert_breakpoint): Rewrite.
3959 (reinsert_breakpoints_at): New.
3960 (check_breakpoints): Rewrite.
3961 (breakpoint_here): New.
3962 (breakpoint_inserted_here): New.
3963 (check_mem_read): Adjust.
3964 * mem-break.h (breakpoints_supported, breakpoint_here)
3965 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3966 (reinsert_breakpoint_by_bp): Delete declaration.
3967 (delete_reinsert_breakpoints): Declare.
3968 (reinsert_breakpoint): Delete declaration.
3969 (reinsert_breakpoints_at): Declare.
3970 (uninsert_breakpoint): Delete declaration.
3971 (uninsert_breakpoints_at): Declare.
3972 (check_breakpoints): Adjust prototype.
3973 * server.h: Adjust include order.
3974 (struct thread_info): Declare here. Add a `last_status' field.
3975
30ba68cb
MS
39762010-03-23 Michael Snyder <msnyder@vmware.com>
3977
3978 * server.c (crc32): New function.
3979 (handle_query): Add handling for 'qCRC:' request.
3980
b9a881c2
PA
39812010-03-23 Pedro Alves <pedro@codesourcery.com>
3982
3983 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3984 lwp had been stopped by a watchpoint.
3985
e92d13d5
PA
39862010-03-16 Pedro Alves <pedro@codesourcery.com>
3987
3988 * server.h (internal_error): Declare.
3989 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3990 * utils.c (internal_error): New function.
3991
64daa791
AS
39922010-03-15 Andreas Schwab <schwab@redhat.com>
3993
3994 * configure.srv: Fix typo setting srv_regobj.
3995
f52cd8cd
PA
39962010-03-15 Pedro Alves <pedro@codesourcery.com>
3997
3998 * linux-low.c (fetch_register): Avoid passing a non string literal
3999 format to `error'.
4000 (usr_store_inferior_registers): Ditto.
4001
93ae6fdc
PA
40022010-03-14 Pedro Alves <pedro@codesourcery.com>
4003
4004 * linux-low.c (linux_write_memory): Bail out early if peeking
4005 memory failed.
4006
c3adc08c
PA
40072010-03-14 Pedro Alves <pedro@codesourcery.com>
4008
4009 * linux-low.h (struct lwp_info): New fields
4010 `stopped_by_watchpoint' and `stopped_data_address'.
4011 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4012 here, and cache them in the lwp object.
4013 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4014 directly.
4015 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4016 field.
4017 (linux_stopped_by_watchpoint): Rewrite.
4018 (linux_stopped_data_address): Rewrite.
4019
bce522a2
PA
40202010-03-06 Simo Melenius <simo.melenius@iki.fi>
4021
4022 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4023 switching the current inferior, not before.
4024
90884b2b
L
40252010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4026
4027 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4028 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4029 i386-linux.c and amd64-linux.c.
4030 (reg-i386.o): Removed.
4031 (reg-i386.c): Likewise.
4032 (reg-i386-linux.o): Likewise.
4033 (reg-i386-linux.c): Likewise.
4034 (reg-x86-64.o): Likewise.
4035 (reg-x86-64.c): Likewise.
4036 (reg-x86-64-linux.o): Likewise.
4037 (reg-x86-64-linux.c): Likewise.
4038 (i386.o): New.
4039 (i386.c): Likewise.
4040 (i386-linux.o): Likewise.
4041 (i386-linux.c): Likewise.
4042 (amd64.o): Likewise.
4043 (amd64.c): Likewise.
4044 (amd64-linux.o): Likewise.
4045 (amd64-linux.c): Likewise.
4046
4047 * configure.srv (srv_i386_regobj): New.
4048 (srv_i386_linux_regobj): Likewise.
4049 (srv_amd64_regobj): Likewise.
4050 (srv_amd64_linux_regobj): Likewise.
4051 (srv_i386_32bit_xmlfiles): Likewise.
4052 (srv_i386_64bit_xmlfiles): Likewise.
4053 (srv_i386_xmlfiles): Likewise.
4054 (srv_amd64_xmlfiles): Likewise.
4055 (srv_i386_linux_xmlfiles): Likewise.
4056 (srv_amd64_linux_xmlfiles): Likewise.
4057 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4058 srv_xmlfiles to $srv_i386_xmlfiles.
4059 (i[34567]86-*-mingw32ce*): Likewise.
4060 (i[34567]86-*-mingw*): Likewise.
4061 (i[34567]86-*-nto*): Likewise.
4062 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4063 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4064 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4065 (x86_64-*-linux*): Likewise.
4066
4067 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4068 (init_registers_amd64_linux): New.
4069 (x86_arch_setup): Replace init_registers_x86_64_linux with
4070 init_registers_amd64_linux.
4071
193f13e6
MK
40722010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4073
4074 * configure.ac: Check for libdl. If it is not available link against
4075 static libthread_db.
4076 * configure: Regenerate.
4077
85d721b8
PA
40782010-02-22 Pedro Alves <pedro@codesourcery.com>
4079
4080 PR9605
4081
4082 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4083 handing a read watchpoint.
4084 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4085
6076632b
DE
40862010-02-12 Doug Evans <dje@google.com>
4087
4088 * linux-low.c (linux_supports_tracefork_flag): Document.
4089 (linux_look_up_symbols): Add comment.
4090
3327ccf7
L
40912010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4092
4093 * regcache.c (supply_register): Clear regcache if buf is NULL.
4094
0718675c 40952010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 4096 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
4097
4098 * inferiors.c (find_inferior): Add function documentation.
4099 (unloaded_dll): Handle the case where the unloaded dll has not
4100 been previously registered in the dll list.
4101
177321bd
DJ
41022010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4103
4104 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4105 (thumb2_breakpoint): New.
4106 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4107
2b009048
DJ
41082010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4109
4110 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4111 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4112 breakpoints.
4113
3be029c7
PA
41142010-01-21 Pedro Alves <pedro@codesourcery.com>
4115
4116 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4117
18f5de3b
JK
41182010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4119
4120 * linux-s390-low.c (s390_collect_ptrace_register)
4121 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4122
3743bb4f
DE
41232010-01-21 Doug Evans <dje@google.com>
4124
14ce3065
DE
4125 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4126 (PTRACE_ARG4_TYPE): New macro.
4127 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4128 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4129 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4130 (usr_store_inferior_registers): Ditto.
4131 (linux_read_memory, linux_write_memory): Ditto.
4132 (linux_test_for_tracefork): Ditto.
4133
3743bb4f
DE
4134 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4135 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4136
8b315be5
PA
41372010-01-21 Pedro Alves <pedro@codesourcery.com>
4138
4139 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4140 target.
4141
85492558
PA
41422010-01-21 Pedro Alves <pedro@codesourcery.com>
4143
4144 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4145 prototype to take a regcache. Adjust.
4146
442ea881
PA
41472010-01-20 Pedro Alves <pedro@codesourcery.com>
4148
4149 * regcache.h (struct thread_info): Forward declare.
4150 (struct regcache): New.
4151 (new_register_cache): Adjust prototype.
4152 (get_thread_regcache): Declare.
4153 (free_register_cache): Adjust prototype.
4154 (registers_to_string, registers_from_string): Ditto.
4155 (supply_register, supply_register_by_name, collect_register)
4156 (collect_register_as_string, collect_register_by_name): Ditto.
4157 * regcache.c (struct inferior_regcache_data): Delete.
4158 (get_regcache): Rename to ...
4159 (get_thread_regcache): ... this. Adjust. Switch inferior before
4160 fetching registers.
4161 (regcache_invalidate_one): Adjust.
4162 (regcache_invalidate): Fix prototype.
4163 (new_register_cache): Return the new register cache.
4164 (free_register_cache): Change prototype.
4165 (realloc_register_cache): Adjust.
4166 (registers_to_string): Change prototype to take a regcache. Adjust.
4167 (registers_from_string): Ditto.
4168 (register_data): Ditto.
4169 (supply_register): Ditto.
4170 (supply_register_by_name): Ditto.
4171 (collect_register): Ditto.
4172 (collect_register_as_string): Ditto.
4173 (collect_register_by_name): Ditto.
4174 * server.c (process_serial_event): Adjust.
4175 * linux-low.h (regset_fill_func, regset_store_func): Change
4176 prototype.
4177 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4178 Change prototype.
4179 * linux-low.c (get_stop_pc): Adjust.
4180 (check_removed_breakpoint): Adjust.
4181 (linux_wait_for_event): Adjust.
4182 (linux_resume_one_lwp): Adjust.
4183 (fetch_register): Add regcache parameter. Adjust.
4184 (usr_store_inferior_registers): Ditto.
4185 (regsets_fetch_inferior_registers): Ditto.
4186 (regsets_store_inferior_registers): Ditto.
4187 (linux_fetch_registers, linux_store_registers): Ditto.
4188 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4189 regcache. Adjust.
43aaf8b6
PA
4190 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4191 Ditto.
442ea881
PA
4192 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4193 prototype to take a regcache.
4194 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4195 * remote-utils.c (convert_ascii_to_int, outreg)
4196 (prepare_resume_reply): Change prototype to take a regcache.
4197 Adjust.
4198 * target.h (struct target_ops) <fetch_registers, store_registers>:
4199 Change prototype to take a regcache.
4200 (fetch_inferior_registers, store_inferior_registers): Change
4201 prototype to take a regcache. Adjust.
4202 * proc-service.c (ps_lgetregs): Adjust.
4203 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4204 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4205 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4206 take a regcache. Adjust.
4207 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4208 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4209 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4210 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4211 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4212 (cris_cannot_fetch_register):
4213 (cris_breakpoint_at): Change prototype to take a regcache.
4214 Adjust.
4215 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4216 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4217 to take a regcache. Adjust.
4218 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4219 Adjust.
4220 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4221 take a regcache. Adjust.
4222 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4223 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4224 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4225 * linux-mips-low.c (mips_get_pc):
4226 (mips_set_pc): Change prototype to take a regcache. Adjust.
4227 (mips_reinsert_addr): Adjust.
4228 (mips_collect_register): Change prototype to take a regcache.
4229 Adjust.
4230 (mips_supply_register):
4231 (mips_collect_register_32bit, mips_supply_register_32bit)
4232 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4233 (mips_store_fpregset): Ditto.
43aaf8b6
PA
4234 * linux-ppc-low.c (ppc_supply_ptrace_register)
4235 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
4236 (parse_spufs_run): Adjust.
4237 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4238 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4239 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4240 take a regcache. Adjust.
4241 * linux-s390-low.c (s390_collect_ptrace_register)
4242 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4243 (s390_set_pc): Change prototype to take a regcache. Adjust.
4244 (s390_arch_setup): Adjust.
4245 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4246 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4247 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4248 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4249 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4250 regcache. Adjust.
4251 (sparc_breakpoint_at): Adjust.
4252 * linux-xtensa-low.c (xtensa_fill_gregset):
4253 (xtensa_store_gregset):
4254 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4255 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4256 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4257 prototype to take a regcache. Adjust.
4258 * win32-arm-low.c (arm_fetch_inferior_register)
4259 (arm_store_inferior_register): Change prototype to take a
4260 regcache. Adjust.
4261 * win32-i386-low.c (i386_fetch_inferior_register)
4262 (i386_store_inferior_register): Change prototype to take a
4263 regcache. Adjust.
4264 * win32-low.c (child_fetch_inferior_registers)
4265 (child_store_inferior_registers): Change prototype to take a
4266 regcache. Adjust.
4267 (win32_wait): Adjust.
4268 (win32_fetch_inferior_registers): Change prototype to take a
4269 regcache. Adjust.
4270 (win32_store_inferior_registers): Adjust.
4271 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4272 store_inferior_register>: Change prototype to take a regcache.
4273
60c3d7b0
DE
42742010-01-20 Doug Evans <dje@google.com>
4275
4276 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4277 #ifdef.
4278 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 4279 (W_STOPCODE): Provide definition if missing.
60c3d7b0 4280
dc146f7c
VP
42812010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4282
4283 * linux-low.c (linux_core_of_thread): New.
4284 (compare_ints, show_process, list_threads): New.
4285 (linux_qxfer_osdata): Report threads and cores.
4286 (linux_target_op): Register linux_core_of_thread.
4287 * remote-utils.c (prepare_resume_reply): Report the core.
4288 (buffer_xml_printf): Support %d specifier.
4289 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4290 New.
4291 (handle_query): Handle qXfer:threads. Announce availability
4292 thereof.
4293 * target.h (struct target_ops): New field core_of_thread.
4294
7803799a
UW
42952010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4296
4297 * Makefile.in (clean): Remove new generated files.
4298 (reg-s390.o, reg-s390.c): Remove rules.
4299 (reg-s390x.o, reg-s390x.c): Likewise.
4300 (s390-linux32.o, s390-linux32.c): Add rules.
4301 (s390-linux64.o, s390-linux64.c): Likewise.
4302 (s390x-linux64.o, s390x-linux64.c): Likewise.
4303 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4304 * linux-s390-low.c: Include <elf.h>.
4305 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4306 (init_registers_s390): Remove prototype.
4307 (init_registers_s390x): Likewise.
4308 (init_registers_s390_linux32): Add prototype.
4309 (init_registers_s390_linux64): Likewise.
4310 (init_registers_s390x_linux64): Likewise.
4311 (s390_num_regs_3264): New define.
4312 (s390_regmap_3264): New global variable.
4313 (s390_cannot_fetch_register): Remove obsolete check.
4314 (s390_cannot_store_register): Likewise.
4315 (s390_collect_ptrace_register): Handle upper/lower register halves.
4316 (s390_supply_ptrace_register): Likewise.
4317 (s390_fill_gregset): Update to register number changes.
4318 (s390_get_hwcap): New routine.
4319 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4320 Install appropriate regmap and register set.
4321
6e7ffa39
JB
43222010-01-01 Joel Brobecker <brobecker@adacore.com>
4323
4324 * server.c (gdbserver_version): Update copyright year to 2010.
4325 * gdbreplay.c (gdbreplay_version): Likewise.
4326
957f3f49
DE
43272009-12-28 Doug Evans <dje@google.com>
4328
4329 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4330 elf/external.h. Include <elf.h> instead but only if necessary.
4331
ca5c370d
PA
43322009-12-28 Pedro Alves <pedro@codesourcery.com>
4333
4334 * linux-low.c (linux_remove_process): Remove `detaching'
4335 parameter. Don't release/detach from thread_db here.
4336 (linux_kill): Release/detach from thread_db here, ...
4337 (linux_detach): ... and here, before actually detaching.
4338 (linux_wait_1): ... and here, when a process exits.
4339 * thread-db.c (any_thread_of): New.
4340 (thread_db_free): Switch the current inferior to a thread of the
4341 passed in process.
4342
4ee62156
DE
43432009-12-21 Doug Evans <dje@google.com>
4344
d90e6a88
DE
4345 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4346
c5f62d5f
DE
4347 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4348 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4349 warning ifndef __NR_tkill. Move setting of errno there too.
4350 Delete unnecessary resetting of errno after syscall.
4351 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4352
10e86dd7
DE
4353 * configure.ac: Check for dladdr.
4354 * config.in: Regenerate.
4355 * configure: Regenerate.
4356 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4357 (try_thread_db_load): Update.
4358
4ee62156
DE
4359 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4360
00f515da
DE
43612009-12-18 Doug Evans <dje@google.com>
4362
e9464885
DE
4363 * event-loop.c: Include unistd.h if it exists.
4364
07d4f67e
DE
4365 * linux-low.c (my_waitpid): Move definition away from being in
4366 between linux_tracefork_child/linux_test_for_tracefork.
4367
00f515da
DE
4368 * gdb_proc_service.h (psaddr_t): Fix type.
4369 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4370 signature to match glibc.
4371
1de1badb
DE
43722009-12-16 Doug Evans <dje@google.com>
4373
4374 * linux-low.c (linux_read_memory): Fix argument to read.
4375
aeeb81d1
PA
43762009-11-26 Pedro Alves <pedro@codesourcery.com>
4377
4378 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4379 events, don't leave current_inferior pointing at null.
4380
10357975
PA
43812009-11-26 Pedro Alves <pedro@codesourcery.com>
4382
4383 * win32-low.c (LOG): Delete.
4384 (OUTMSG): Output to stderr.
4385 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4386 on compile time LOG macro.
4387 (win32_wait): Fix debug output.
4388
cf6e3471
PA
43892009-11-26 Pedro Alves <pedro@codesourcery.com>
4390
4391 * win32-low.c (win32_add_one_solib): If the dll name is
4392 "ntdll.dll", prepend the system directory to the dll path.
4393
0c85e18e
MK
43942009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4395
4396 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4397
9ac544ce 43982009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 4399 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
4400
4401 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4402 * configure.ac: Check for __mcoldfire__ and set
4403 gdb_cv_m68k_is_coldfire.
4404 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4405 reg-cf.o and reg-m68k.o.
4406 * configure: Regenerated.
4407
fd7dd3e6
PA
44082009-11-16 Pedro Alves <pedro@codesourcery.com>
4409
4410 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4411 Pass it to thread_db_free.
4412 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4413 proper `detaching' argument to linux_remove_process.
4414 * linux-low.h (thread_db_free): Add `detaching' parameter.
4415 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4416 to thread_db_free.
4417 (thread_db_free): Add `detaching' parameter. Only
4418 call td_ta_clear_event if detaching from process.
4419
75aa492e
MK
44202009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4421
4422 * thread-db.c (thread_db_free): Fix typo.
4423
21e1bee4
PP
44242009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4425
4426 PR gdb/10838
4427 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4428
8838b45e
NS
44292009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4430
4431 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4432 with an i686 compiler.
4433 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4434 needed.
4435 * configure: Rebuilt.
4436
8a35fb51
SL
44372009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4438
4439 PR gdb/10783
4440
4441 * server.c (handle_search_memory_1): Correct read_addr initialization
4442 in loop for searching subsequent chunks.
4443
96f15937
PP
44442009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4445
4446 * configure.ac: New --with-libthread-db option.
4447 * thread-db.c: Allow direct dependence on libthread_db.
4448 (thread_db_free): Adjust.
4449 * config.in: Regenerate.
4450 * configure: Likewise.
889bf7c5 4451
5f7d1694
PP
44522009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4453
4454 PR gdb/10757
4455 * thread-db.c (attach_thread): New function.
4456 (maybe_attach_thread): Return success/failure.
4457 (find_new_threads_callback): Adjust.
889bf7c5
PA
4458 (thread_db_find_new_threads): Loop until no new threads.
4459
88e3b899
PA
44602009-10-13 Pedro Alves <pedro@codesourcery.com>
4461
4462 * proc-service.c (ps_lgetregs): Formatting.
4463
cdbfd419
PP
44642009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4465
4466 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4467 * configure.ac: Adjust.
4468 * linux-low.h (struct process_info_private): Move members to struct
4469 thread_db.
4470 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4471 * linux-low.c (linux_remove_process): Adjust.
4472 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4473 * server.c (handle_query): Move code ...
4474 (handle_monitor_command): ... here. New function.
4475 * target.h (struct target_ops): New member.
4476 * thread-db.c (struct thread_db): New.
4477 (libthread_db_search_path): New variable.
4478 (thread_db_create_event, thread_db_enable_reporting)
4479 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4480 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4481 (try_thread_db_load_1, dladdr_to_soname): New functions.
4482 (try_thread_db_load, thread_db_load_search): New functions.
4483 (thread_db_init): Search for libthread_db.
4484 (thread_db_free): New function.
4485 (thread_db_handle_monitor_command): Likewise.
4486 * config.in: Regenerate.
4487 * configure: Regenerate.
889bf7c5 4488
4168d2d6
UW
44892009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4490
4491 * spu-low.c (spu_kill): Wait for inferior to terminate.
4492 Call clear_inferiors.
4493 (spu_detach): Call clear_inferiors.
4494
81ecdfbb
RW
44952009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4496
4497 * aclocal.m4: Regenerate.
4498 * config.in: Likewise.
4499 * configure: Likewise.
4500
0b9ff2c0
UW
45012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4502
4503 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4504 (parse_spufs_run): New function.
4505 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4506 (ppc_breakpoint_at): Handle SPU breakpoints.
4507
efcbbd14
UW
45082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4509
4510 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4511 (SPUFS_MAGIC): Define.
4512 (spu_enumerate_spu_ids): New function.
4513 (linux_qxfer_spu): New function.
4514 (linux_target_ops): Install linux_qxfer_spu.
4515
f4d9bade
UW
45162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4517
4518 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4519 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4520 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4521 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4522 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4523 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4524 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4525 (init_registers_powerpc_cell32l): Add prototype.
4526 (init_registers_powerpc_cell64l): Likewise.
4527 (ppc_arch_setup): Detect Cell/B.E. architecture.
4528
96e946ca
RW
45292009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4530
4531 * Makefile.in (datarootdir): New variable.
4532
58d6951d
DJ
45332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4534
4535 * linux-low.c (linux_write_memory): Update debugging output.
4536 * Makefile.in (clean): Add new descriptions.
4537 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4538 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4539 * configure.srv: Add new files for arm*-*-linux*.
4540 * linux-arm-low.c: Add new declarations.
4541 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4542 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4543 (HWCAP_VFPv3D16): New.
4544 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4545 instead of __IWMMXT__.
4546 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4547 (arm_arch_setup): New.
4548 (target_regsets): Remove #ifdef. Add VFP regset.
4549 (the_low_target): Use arm_arch_setup.
4550
12b42a12
DJ
45512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4552
4553 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4554 the main thread again.
4555
ac8c974e
AR
45562009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4557
4558 Adding Neutrino gdbserver.
4559 * configure: Regenerated.
4560 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4561 * configure.srv (i[34567]86-*-nto*): New target.
4562 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4563 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4564 (nto_comctrl) [__QNX__]: New function.
4565 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4566
4424e0c3 45672009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
4568
4569 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4570 srv_tgtobj.
4571
912cf4ba
PA
45722009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4573 Pedro Alves <pedro@codesourcery.com>
4574
4575 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4576 don't support CONTEXT_EXTENDED_REGISTERS.
4577 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4578 (the_low_target): Install them.
4579 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4580 failing with ERROR_PIPE_NOT_CONNECTED.
4581
aa5ca48f
DE
45822009-06-30 Doug Evans <dje@google.com>
4583 Pierre Muller <muller@ics.u-strasbg.fr>
4584
4585 Add h/w watchpoint support to x86-linux, win32-i386.
4586 * Makefile.in (SFILES): Add i386-low.c
4587 (i386_low_h): Define.
4588 (i386-low.o): Add dependencies.
4589 (linux-x86-low.o): Add i386-low.h dependency.
4590 (win32-i386-low.o): Ditto.
4591 * i386-low.c: New file.
4592 * i386-low.h: New file.
4593 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4594 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4595 * linux-low.c (linux_add_process): Initialize arch_private.
4596 (linux_remove_process): Free arch_private.
4597 (add_lwp): Initialize arch_private.
4598 (delete_lwp): Free arch_private.
4599 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4600 provided.
4601 * linux-low.h (process_info_private): New member arch_private.
4602 (lwp_info): New member arch_private.
4603 (linux_target_ops): New members new_process, new_thread,
4604 prepare_to_resume.
4605 (ptid_of): New macro.
4606 * linux-x86-low.c: Include stddef.h, i386-low.h.
4607 (arch_process_info): New struct.
4608 (arch_lwp_info): New struct.
4609 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4610 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4611 (i386_dr_low_get_status): New function.
4612 (x86_insert_point, x86_remove_point): New functions.
4613 (x86_stopped_by_watchpoint): New function.
4614 (x86_stopped_data_address): New function.
4615 (x86_linux_new_process, x86_linux_new_thread): New functions.
4616 (x86_linux_prepare_to_resume): New function.
4617 (the_low_target): Add entries for insert_point, remove_point,
4618 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4619 prepare_to_resume.
4620 * server.c (debug_hw_points): New global.
4621 (monitor_show_help): Document set debug-hw-points.
4622 (handle_query): Process "set debug-hw-points".
4623 * server.h (debug_hw_points): Declare.
4624 (paddress): Declare.
4625 * utils.c (NUMCELLS, CELLSIZE): New macros.
4626 (get_sell, xsnprintf, paddress): New functions.
4627 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4628 remove_point, stopped_by_watchpoint, stopped_data_address.
4629 * win32-i386-low.c: Include i386-low.h.
4630 (debug_reg_state): Replaces dr.
4631 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4632 (i386_dr_low_get_status): New function.
4633 (i386_insert_point, i386_remove_point): New functions.
4634 (i386_stopped_by_watchpoint): New function.
4635 (i386_stopped_data_address): New function.
4636 (i386_initial_stuff): Update.
4637 (get_thread_context,set_thread_context,i386_thread_added): Update.
4638 (the_low_target): Add entries for insert_point,
4639 remove_point, stopped_by_watchpoint, stopped_data_address.
4640 * win32-low.c (win32_insert_watchpoint): New function.
4641 (win32_remove_watchpoint): New function.
4642 (win32_stopped_by_watchpoint): New function.
4643 (win32_stopped_data_address): New function.
4644 (win32_target_ops): Add entries for insert_watchpoint,
4645 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4646 * win32-low.h (win32_target_ops): New members insert_point,
4647 remove_point, stopped_by_watchpoint, stopped_data_address.
4648
d993e290
PA
46492009-06-25 Pedro Alves <pedro@codesourcery.com>
4650
4651 * server.c (process_serial_event): Re-return unsupported, not
4652 error, if the type isn't recognized. Re-allow supporting only
4653 insert or remove packets. Also call require_running for
4654 breakpoints. Add missing break statement to default case. Tidy.
4655 * target.h (struct target_ops): Rename insert_watchpoint to
4656 insert_point, and remove_watchpoint to remove_point.
4657
4658 * linux-low.h (struct linux_target_ops): Likewise.
4659 * linux-low.c (linux_insert_watchpoint): Rename to ...
4660 (linux_insert_point): ... this. Adjust.
4661 (linux_remove_watchpoint): Rename to ...
4662 (linux_remove_point): ... this. Adjust.
4663 (linux_target_ops): Adjust.
4664 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4665 (cris_insert_point): ... this.
4666 (cris_remove_watchpoint): Rename to ...
4667 (cris_remove_point): ... this.
4668 (the_low_target): Adjust.
4669
0f54c268
PM
46702009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4671
4672 * server.c (handle_v_kill): Pass signal_pid to
4673 kill_inferior if multi_process is zero.
4674
c6314022
AR
46752009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4676
4677 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4678 * target.h (target_ops): Comment for *_watchpoint to make it clear
4679 the functions can get types '0' and '1'.
4680
4463ce24
AR
46812009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4682
4683 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4684 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4685 * regcache.c (get_regcache): Likewise.
4686 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4687 * win32-low.c (child_fetch_inferior_registers): Remove check for
4688 regno 0.
4689
cf8fd78b
PA
46902009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4691 Pedro Alves <pedro@codesourcery.com>
4692
4693 * target.h (struct target_ops) <supports_multi_process>: New
4694 callback.
4695 (target_supports_multi_process): New.
4696 * server.c (handle_query): Even if GDB reports support, only
4697 enable multi-process if the target also supports it. Report
4698 multi-process support only if the target backend supports it.
4699 * linux-low.c (linux_supports_multi_process): New function.
4700 (linux_target_ops): Install it as target_supports_multi_process
4701 callback.
4702
47c0c975
DE
47032009-05-24 Doug Evans <dje@google.com>
4704
e09875d4
DE
4705 Global renaming of find_thread_pid to find_thread_ptid.
4706 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4707 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4708 All callers updated.
4709
e27d73f6
DE
4710 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4711 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4712 directly.
4713
47c0c975
DE
4714 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4715 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4716 (linux_resume_one_lwp): Ditto.
4717
2acc282a
DE
47182009-05-23 Doug Evans <dje@google.com>
4719
4720 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4721 from struct inferior_list_entry * to struct lwp_info *.
4722 All callers updated.
4723
9f1036c1
DE
47242009-05-13 Doug Evans <dje@google.com>
4725
4726 * linux-x86-low.c: Don't include assert.h.
4727 (x86_siginfo_fixup): Use fatal, not assert.
4728 (x86_arch_setup): Fix comment.
4729
d0722149
DE
47302009-05-12 Doug Evans <dje@google.com>
4731
4732 Biarch support for i386/amd64 gdbserver.
4733 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4734 Add linux-x86-low.c.
4735 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4736 (linux-x86-low.o): Add.
4737 * linux-x86-64-low.c: Delete.
4738 * linux-i386-low.c: Delete.
4739 * linux-x86-low.c: New file.
4740 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4741 linux-x86-low.o.
4742 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4743 linux-x86-low.o.
4744 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4745 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4746 (linux_child_pid_to_exec_file): New function.
4747 (elf_64_header_p, elf_64_file_p): New functions.
4748 (siginfo_fixup): New function.
4749 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4750 give target a chance to convert layout.
4751 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4752 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4753
fdeb2a12
DE
47542009-05-07 Doug Evans <dje@google.com>
4755
4756 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4757 (regsets_store_inferior_registers): Ditto.
4758
a6dbe5df
PA
47592009-05-06 Pedro Alves <pedro@codesourcery.com>
4760
4761 PR server/10048
4762
4763 * linux-low.c (must_set_ptrace_flags): Delete.
4764 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4765 of the global.
4766 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4767 `lwp->must_set_ptrace_flags' instead.
ba42693b 4768 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
4769 (linux_wait_1): ... not here.
4770
5091eb23
DE
47712009-04-30 Doug Evans <dje@google.com>
4772
9f767825
DE
4773 * inferiors.c (started_inferior_callback): New function.
4774 (attached_inferior_callback): New function.
4775 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4776 * server.c (print_started_pid, print_attached_pid): New functions.
4777 (detach_or_kill_for_exit): New function.
4778 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4779 * server.h (have_started_inferiors_p): Declare.
4780 (have_attached_inferiors_p): Declare.
4781
5091eb23
DE
4782 * inferiors.c (remove_process): Fix memory leak, free process.
4783 * linux-low.c (linux_remove_process): New function.
4784 (linux_kill): Call it instead of remove_process.
4785 (linux_detach, linux_wait_1): Ditto.
4786
155c8968
PA
47872009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4788
4789 * configure.srv: Add x86 Windows CE target.
4790
7fe519cb
UW
47912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4792
4793 * inferiors.c (get_thread_process): Make global.
4794 * server.h (get_thread_process): Add prototype.
4795 * thread-db.c (find_one_thread): Use get_thread_process
4796 instead of current_process.
4797 (thread_db_get_tls_address): Do not crash if called when
4798 thread layer is not yet initialized.
4799
5472f405
UW
48002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4801
4802 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4803 * spu-low.c (current_tid): Rename to ...
4804 (current_ptid): ... this.
4805 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4806 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4807 ptid_get_lwp (current_ptid) instead of current_tid.
4808 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4809 instead of current_tid. Use find_process_pid to verify pid
4810 argument is valid. Pass proper argument to remove_process.
4811 (spu_thread_alive): Compare current_ptid instead of current_tid.
4812 (spu_resume): Likewise.
4813
55ac2b99
PA
48142009-04-02 Pedro Alves <pedro@codesourcery.com>
4815
4816 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4817 variable.
4818
95954743
PA
48192009-04-01 Pedro Alves <pedro@codesourcery.com>
4820
4821 Implement the multiprocess extensions, and add linux multiprocess
4822 support.
4823
4824 * server.h (ULONGEST): Declare.
4825 (struct ptid, ptid_t): New.
4826 (minus_one_ptid, null_ptid): Declare.
4827 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4828 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4829 (struct inferior_list_entry): Change `id' type from unsigned from
4830 to ptid_t.
4831 (struct sym_cache, struct breakpoint, struct
4832 process_info_private): Forward declare.
4833 (struct process_info): Declare.
4834 (current_process): Declare.
4835 (all_processes): Declare.
4836 (initialize_inferiors): Declare.
4837 (add_thread): Adjust to use ptid_t.
4838 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4839 (add_process, remove_process, find_thread_pid): Declare.
4840 (find_inferior_id): Adjust to use ptid_t.
4841 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4842 (multi_process): Declare.
4843 (push_event): Adjust to use ptid_t.
4844 (read_ptid, write_ptid): Declare.
4845 (prepare_resume_reply): Adjust to use ptid_t.
4846 (clear_symbol_cache): Declare.
4847 * inferiors.c (all_processes): New.
4848 (null_ptid, minus_one_ptid): New.
4849 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4850 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4851 (add_thread): Change unsigned long to ptid. Remove gdb_id
4852 parameter. Adjust.
4853 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4854 (gdb_id_to_thread): Rename to ...
4855 (find_thread_pid): ... this. Change unsigned long to ptid.
4856 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4857 (loaded_dll, pull_pid_from_list): Adjust.
4858 (add_process, remove_process, find_process_pid)
4859 (get_thread_process, current_process, initialize_inferiors): New.
4860 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4861 (struct target_waitstatus) <related_pid>: Ditto.
4862 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4863 return type to int.
4864 (struct target_ops) <join>: Add `pid' argument.
4865 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4866 (struct target_ops) <wait>: Add `ptid' field. Change return type
4867 to ptid.
4868 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4869 (mywait): Add `ptid' argument. Change return type to ptid_t.
4870 (target_pid_to_str): Declare.
4871 * target.c (set_desired_inferior): Adjust to use ptids.
4872 (mywait): Add new `ptid' argument. Adjust.
4873 (target_pid_to_str): New.
4874 * mem-break.h (free_all_breakpoints): Declare.
4875 * mem-break.c (breakpoints): Delelete.
4876 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4877 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4878 to use per-process breakpoint list.
4879 (free_all_breakpoints): New.
4880 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4881 (symbol_cache, all_symbols_looked_up): Delete.
4882 (hexchars): New.
4883 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4884 read_ptid): New.
4885 (prepare_resume_reply): Change ptid argument's type from unsigned
4886 long to ptid_t. Adjust. Implement W;process and X;process.
4887 (free_sym_cache, clear_symbol_cache): New.
4888 (look_up_one_symbol): Adjust to per-process symbol cache. *
4889 * server.c (cont_thread, general_thread, step_thread): Change type
4890 to ptid_t.
4891 (attached): Delete.
4892 (multi_process): New.
4893 (last_ptid): Change type to ptid_t.
4894 (struct vstop_notif) <ptid>: Change type to ptid_t.
4895 (queue_stop_reply, push_event): Change `ptid' argument's type to
4896 ptid_t.
4897 (discard_queued_stop_replies): Add `pid' argument.
4898 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4899 changes. Don't reference the `attached' global.
4900 (attach_inferior): Adjust to mywait interface changes.
4901 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4902 features. Handle and report "multiprocess+". Handle
4903 "qAttached:PID".
4904 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4905 changes.
4906 (handle_v_kill): New.
4907 (handle_v_stopped): Adjust to use target_pid_to_str.
4908 (handle_v_requests): Allow multiple attaches and runs when
4909 multiprocess extensions are in effect. Handle "vKill".
4910 (myresume): Adjust to use ptids.
4911 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4912 (handle_status): Adjust to discard_queued_stop_replies interface
4913 change.
4914 (first_thread_of, kill_inferior_callback)
4915 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4916 (main): Call initialize_inferiors. Adjust to use ptids, killing
4917 and detaching from all inferiors. Handle multiprocess packet
4918 variants.
4919 * linux-low.h: Include gdb_proc_service.h.
4920 (struct process_info_private): New.
4921 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4922 <lwpid_of>: Use ptid_get_lwp.
4923 (get_lwp_thread): Adjust.
4924 (struct lwp_info): Add `dead' member.
4925 (find_lwp_pid): Declare.
4926 * linux-low.c (thread_db_active): Delete.
4927 (new_inferior): Adjust comment.
4928 (inferior_pid): Delete.
4929 (linux_add_process): New.
4930 (handle_extended_wait): Adjust.
4931 (add_lwp): Change unsigned long to ptid.
4932 (linux_create_inferior): Add process to processes table. Adjust
4933 to use ptids. Don't set new_inferior here.
4934 (linux_attach_lwp): Rename to ...
4935 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4936 it. Adjust to use ptids.
4937 (linux_attach_lwp): New.
4938 (linux_attach): Add process to processes table. Don't set
4939 new_inferior here.
4940 (struct counter): New.
4941 (second_thread_of_pid_p, last_thread_of_process_p): New.
4942 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4943 multiple processes.
4944 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4945 processes. Remove process from process table.
4946 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4947 to multiple processes.
4948 (any_thread_of): New.
4949 (linux_detach): Add `pid' argument, and handle it. Remove process
4950 from processes table.
4951 (linux_join): Add `pid' argument. Handle it.
4952 (linux_thread_alive): Change unsighed long argument to ptid_t.
4953 Consider dead lwps as not being alive.
4954 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4955 threads we're not interested in.
4956 (same_lwp, find_lwp_pid): New.
4957 (linux_wait_for_lwp): Change `pid' argument's type from int to
4958 ptid_t. Adjust.
4959 (linux_wait_for_event): Rename to ...
4960 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4961 from int to ptid_t. Adjust.
4962 (linux_wait_for_event): New.
4963 (linux_wait_1): Add `ptid' argument. Change return type to
4964 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4965 that exit from the process table.
4966 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4967 Adjust.
4968 (mark_lwp_dead): New.
4969 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4970 stopping all threads, mark its main lwp as dead.
4971 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4972 ptids.
4973 (fetch_register, usr_store_inferior_registers)
4974 (regsets_fetch_inferior_registers)
4975 (regsets_store_inferior_registers, linux_read_memory)
4976 (linux_write_memory): Inline `inferior_pid'.
4977 (linux_look_up_symbols): Adjust to use per-process
4978 `thread_db_active'.
4979 (linux_request_interrupt): Adjust to use ptids.
4980 (linux_read_auxv): Inline `inferior_pid'.
4981 (initialize_low): Don't reference thread_db_active.
4982 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4983 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4984 (ps_getpid): Return the pid of the current inferior.
4985 * thread-db.c (proc_handle, thread_agent): Delete.
4986 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4987 per-process data.
4988 (find_one_thread): Change argument type to ptid_t. Adjust to
4989 per-process data.
4990 (maybe_attach_thread): Adjust to per-process data and ptids.
4991 (thread_db_find_new_threads): Ditto.
4992 (thread_db_init): Ditto.
4993 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4994 processes table. Adjust to use ptids.
4995 (spu_kill, spu_detach): Adjust interface. Remove process from
4996 processes table.
4997 (spu_join, spu_thread_alive): Adjust interface.
4998 (spu_wait): Adjust interface. Remove process from processes
4999 table. Adjust to use ptids.
5000 * win32-low.c (current_inferior_tid): Delete.
5001 (current_inferior_ptid): New.
5002 (debug_event_ptid): New.
5003 (thread_rec): Take a ptid. Adjust.
5004 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5005 (child_delete_thread): Ditto.
5006 (do_initial_child_stuff): Add `attached' argument. Add process to
5007 processes table.
5008 (child_fetch_inferior_registers, child_store_inferior_registers):
5009 Adjust.
5010 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5011 (win32_attach): Pass 1 to do_initial_child_stuff.
5012 (win32_kill): Adjust interface. Remove process from processes
5013 table.
5014 (win32_detach): Ditto.
5015 (win32_join): Adjust interface.
5016 (win32_thread_alive): Take a ptid.
5017 (win32_resume): Adjust to use ptids.
5018 (get_child_debug_event): Ditto.
5019 (win32_wait): Adjust interface. Remove exiting process from
5020 processes table.
5021
bd99dc85
PA
50222009-04-01 Pedro Alves <pedro@codesourcery.com>
5023
5024 Non-stop mode support.
5025
5026 * server.h (non_stop): Declare.
5027 (gdb_client_data, handler_func): Declare.
5028 (delete_file_handler, add_file_handler, start_event_loop):
5029 Declare.
5030 (handle_serial_event, handle_target_event, push_event)
5031 (putpkt_notif): Declare.
5032 * target.h (enum resume_kind): New.
5033 (struct thread_resume): Replace `step' field by `kind' field.
5034 (TARGET_WNOHANG): Define.
5035 (struct target_ops) <wait>: Add `options' argument.
5036 <supports_non_stop, async, start_non_stop>: New fields.
5037 (target_supports_non_stop, target_async): New.
5038 (start_non_stop): Declare.
5039 (mywait): Add `options' argument.
5040 * target.c (mywait): Add `options' argument. Print child exit
5041 notifications here.
5042 (start_non_stop): New.
5043 * server.c (non_stop, own_buf, mem_buf): New globals.
5044 (struct vstop_notif): New.
5045 (notif_queue): New global.
5046 (queue_stop_reply, push_event, discard_queued_stop_replies)
5047 (send_next_stop_reply): New.
5048 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5049 interface changes.
5050 (attach_inferior): In non-stop mode, don't wait for the target
5051 here.
5052 (handle_general_set): Handle QNonStop.
5053 (handle_query): When handling qC, return the current general
5054 thread, instead of the first thread of the list.
5055 (handle_query): If the backend supports non-stop mode, include
5056 QNonStop+ in the qSupported query response.
5057 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5058 and non-stop mode.
5059 (handle_v_attach, handle_v_run): Handle non-stop mode.
5060 (handle_v_stopped): New.
5061 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5062 (myresume): Adjust to use resume_kind. Handle non-stop.
5063 (queue_stop_reply_callback): New.
5064 (handle_status): Handle non-stop mode.
5065 (main): Clear non_stop flag on reconnection. Use the event-loop.
5066 Refactor serial protocol handling from here ...
5067 (process_serial_event): ... to this new function. When GDB
5068 selects any thread, select one here. In non-stop mode, wait until
5069 GDB acks all pending events before exiting.
5070 (handle_serial_event, handle_target_event): New.
5071 * remote-utils.c (remote_open): Install remote_desc in the event
5072 loop.
5073 (remote_close): Remove remote_desc from the event loop.
5074 (putpkt_binary): Rename to...
5075 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5076 (putpkt_binary): New as wrapper around putpkt_binary_1.
5077 (putpkt_notif): New.
5078 (prepare_resume_reply): In non-stop mode, don't change the
5079 general_thread.
5080 * event-loop.c: New.
5081 * Makefile.in (OBJ): Add event-loop.o.
5082 (event-loop.o): New rule.
5083
5084 * linux-low.h (pid_of): Moved here.
5085 (lwpid_of): New.
5086 (get_lwp_thread): Use lwpid_of.
5087 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5088 * linux-low.c (pid_of): Delete.
5089 (inferior_pid): Use lwpid_of.
5090 (linux_event_pipe): New.
5091 (target_is_async_p): New.
5092 (delete_lwp): New.
5093 (handle_extended_wait): Use lwpid_of.
5094 (add_lwp): Don't set lwpid field.
5095 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5096 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5097 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5098 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5099 first. Adjust to linux_wait_for_event interface changes. Use
5100 lwpid_of.
5101 (linux_detach): Don't delete the main lwp here.
5102 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5103 (status_pending_p): Don't consider explicitly suspended lwps.
5104 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5105 pointer. Add OPTIONS argument. Change return type to int. Use
5106 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5107 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5108 pointer. Add status pointer argument. Return a pid instead of a
5109 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5110 changes. In non-stop mode, don't switch to a random thread.
5111 (linux_wait): Rename to...
5112 (linux_wait_1): ... this. Add target_options argument, and handle
5113 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5114 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5115 clean exit and signal exit code. Don't stop all threads in
5116 non-stop mode. In all-stop mode, only stop all threads when
5117 reporting a stop to GDB. Handle explicit thread stop requests.
5118 (async_file_flush, async_file_mark): New.
5119 (linux_wait): New.
5120 (send_sigstop): Use lwpid_of.
5121 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5122 interface changes. In non-stop mode, don't switch to a random
5123 thread.
5124 (linux_resume_one_lwp): Use lwpid_of.
5125 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5126 (linux_resume_one_thread): ... this. Handle resume_stop. In
5127 non-stop mode, don't look for pending flag in all threads.
5128 (resume_status_pending_p): Don't consider explicitly suspended
5129 threads.
5130 (my_waitpid): Reimplement. Emulate __WALL.
5131 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5132 Use lwpid_of.
5133 (sigchld_handler, linux_supports_non_stop, linux_async)
5134 (linux_start_non_stop): New.
5135 (linux_target_ops): Register linux_supports_non_stop, linux_async
5136 and linux_start_non_stop.
5137 (initialize_low): Install SIGCHLD handler.
5138 * thread-db.c (thread_db_create_event, find_one_thread)
5139 (thread_db_get_tls_address): Use lwpid_of.
5140 * win32-low.c (win32_detach): Adjust to use resume_kind.
5141 (win32_wait): Add `options' argument.
5142 * spu-low.c (spu_resume): Adjust to use resume_kind.
5143 (spu_wait): Add `options' argument.
5144
5b1c542e
PA
51452009-04-01 Pedro Alves <pedro@codesourcery.com>
5146
5147 Decouple target code from remote protocol.
5148
5149 * target.h (enum target_waitkind): New.
5150 (struct target_waitstatus): New.
5151 (struct target_ops) <wait>: Return an unsigned long. Take a
5152 target_waitstatus pointer instead of a char pointer.
5153 (mywait): Likewise.
5154 * target.c (mywait): Change prototype to return an unsigned long.
5155 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5156 * server.h (thread_from_wait, old_thread_from_wait): Delete
5157 declarations.
5158 (prepare_resume_reply): Change prototype to take a
5159 target_waitstatus.
5160 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5161 (last_status, last_ptid): New.
5162 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5163 pid instead of a signal.
5164 (attach_inferior): Remove "status" and "signal" parameters.
5165 Adjust.
5166 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5167 not as an address.
5168 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5169 (handle_v_requests, myresume): Remove "status" and "signal"
5170 parameters. Adjust.
5171 (handle_status): New.
5172 (main): Delete local `status'. Adjust.
5173 * remote-utils.c: Include target.h.
5174 (prepare_resume_reply): Change prototype to take a
5175 target_waitstatus. Adjust.
5176
5177 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5178 interface.
5179 * spu-low.c (spu_wait): Adjust.
5180 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5181 Delete.
5182 (win32_wait): Adjust.
5183
2bd7c093
PA
51842009-04-01 Pedro Alves <pedro@codesourcery.com>
5185
5186 * target.h (struct thread_resume): Delete leave_stopped member.
5187 (struct target_ops): Add a `n' argument to the `resume' callback.
5188 * server.c (start_inferior): Adjust.
5189 (handle_v_cont, myresume): Adjust.
5190 * linux-low.c (check_removed_breakpoint): Adjust to resume
5191 interface change, and to removed leave_stopped field.
5192 (resume_ptr): Delete.
5193 (struct thread_resume_array): New.
5194 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5195 resume interface change.
5196 (linux_continue_one_thread, linux_queue_one_thread)
5197 (resume_status_pending_p): Check if the resume field is NULL
5198 instead of checking the leave_stopped member.
5199 (linux_resume): Adjust to the target resume interface change.
5200 * spu-low.c (spu_resume): Adjust to the target resume interface
5201 change.
5202 * win32-low.c (win32_detach, win32_resume): Ditto.
5203
c35fafde
PA
52042009-04-01 Pedro Alves <pedro@codesourcery.com>
5205
5206 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5207 flag.
5208 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5209 pending.
5210 (linux_continue_one_thread): Only preserve the stepping flag if
5211 there's a pending breakpoint.
5212
0a59d50b
PA
52132009-03-31 Pedro Alves <pedro@codesourcery.com>
5214
5215 * server.c (main): After the inferior having exited, call
5216 remote_close before exiting gdbserver.
5217
f04c6d38
TJB
52182009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5219
5220 Fix size of FPSCR in Power 7 processors.
5221 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5222 (PPC_FEATURE_HAS_DFP): New #define.
5223 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5224 size of the FPSCR.
5225
78e5cee6
PA
52262009-03-23 Pedro Alves <pedro@codesourcery.com>
5227
5228 * server.c (handle_query) Whitespace and formatting.
5229
1b3f6016
PA
52302009-03-22 Pedro Alves <pedro@codesourcery.com>
5231
5232 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5233 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5234 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5235 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5236 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5237 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5238 Makefile.in, configure.ac: Fix whitespace throughout.
5239 * configure: Regenerate.
5240
a07b2135
PA
52412009-03-22 Pedro Alves <pedro@codesourcery.com>
5242
5243 * inferiors.c (find_inferior): Make it safe for the callback
5244 function to delete the currently iterated inferior.
5245
67cc2626
PA
52462009-03-22 Pedro Alves <pedro@codesourcery.com>
5247
5248 * Makefile.in (linuw_low_h): Move higher.
5249 (thread-db.o): Depend on $(linux_low_h).
5250
54a0b537
PA
52512009-03-17 Pedro Alves <pedro@codesourcery.com>
5252
5253 Rename "process" to "lwp" throughout.
5254
5255 * linux-low.c (all_processes): Rename to...
5256 (all_lwps): ... this.
5257 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5258 (add_process): Rename to ...
5259 (add_lwp): ... this. Adjust.
5260 (linux_create_inferior): Adjust.
5261 (linux_attach_lwp): Adjust.
5262 (linux_attach): Adjust.
5263 (linux_kill_one_process): Rename to ...
5264 (linux_kill_one_lwp): ... this. Adjust.
5265 (linux_kill): Adjust.
5266 (linux_detach_one_process): Rename to ...
5267 (linux_detach_one_lwp): ... this. Adjust.
5268 (linux_detach): Adjust.
5269 (check_removed_breakpoint): Adjust.
5270 (status_pending_p): Adjust.
5271 (linux_wait_for_process): Rename to ...
5272 (linux_wait_for_lwp): ... this. Adjust.
5273 (linux_wait_for_event): Adjust.
5274 (send_sigstop): Adjust.
5275 (wait_for_sigstop): Adjust.
5276 (stop_all_processes): Rename to ...
5277 (stop_all_lwps): ... this.
5278 (linux_resume_one_process): Rename to ...
5279 (linux_resume_one_lwp): ... this. Adjust.
5280 (linux_set_resume_request, linux_continue_one_thread)
5281 (linux_queue_one_thread, resume_status_pending_p)
5282 (usr_store_inferior_registers, regsets_store_inferior_registers)
5283 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5284 Adjust.
5285 * linux-low.h (get_process): Rename to ...
5286 (get_lwp): ... this. Adjust.
5287 (get_thread_process): Rename to ...
5288 (get_thread_lwp): ... this. Adjust.
5289 (get_process_thread): Rename to ...
5290 (get_lwp_thread): ... this. Adjust.
5291 (struct process_info): Rename to ...
5292 (struct lwp_info): ... this.
5293 (all_processes): Rename to ...
5294 (all_lwps): ... this.
5295 * proc-service.c (ps_lgetregs): Adjust.
5296 * thread-db.c (thread_db_create_event, find_one_thread)
5297 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5298
0b16c5cf
PA
52992009-03-14 Pedro Alves <pedro@codesourcery.com>
5300
5301 * server.c (handle_query): Handle "qAttached".
5302
32de4b9d
NS
53032009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5304
5305 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5306 GPLv3, update license URL.
5307
2aecd87f
DE
53082009-03-01 Doug Evans <dje@google.com>
5309
93efd302 5310 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
5311 (server_h): Add gdb_signals.h.
5312 (signals.o): Update.
5313 * server.h (target_signal_from_host,target_signal_to_host_p)
5314 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5315
86b1f9c5
PM
53162009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5317
5318 * remote-utils.c (getpkt): Also generate remote-debug
5319 information if noack_mode is set.
5320
4aa995e1
PA
53212009-02-06 Pedro Alves <pedro@codesourcery.com>
5322
5323 * server.c (handle_query): Report qXfer:siginfo:read and
5324 qXfer:siginfo:write as supported and handle them.
5325 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5326 * linux-low.c (linux_xfer_siginfo): New.
5327 (linux_target_ops): Set it.
5328
62709adf
PA
53292009-01-26 Pedro Alves <pedro@codesourcery.com>
5330
5331 * server.c (gdbserver_usage): Mention --remote-debug.
5332 (main): Accept '--remote-debug' switch.
5333
aef93bd7
DE
53342009-01-18 Doug Evans <dje@google.com>
5335
5336 * regcache.c (new_register_cache): No need to check result of xcalloc.
5337 * server.c (handle_search_memory): Back out calls to xmalloc,
5338 result is checked and error is returned to user upon failure.
5339 (handle_query): Ditto. Add more checks for result of malloc.
5340 (handle_v_cont): Check result of malloc, report error back to
5341 user upon failure.
5342 (handle_v_run): Ditto. Call freeargv.
5343 * server.h (freeargv): Declare.
5344 * utils.c (freeargv): New fn.
5345
54363045
DE
53462009-01-15 Doug Evans <dje@google.com>
5347
f626972c
DE
5348 * gdbreplay.c (perror_with_name): Make arg const char *.
5349 * server.h (target_signal_to_name): Make return type const char *.
0842e787 5350 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 5351 * utils.c (perror_with_name): Make arg const char *.
54363045 5352
18aae699
PA
53532009-01-14 Pedro Alves <pedro@codesourcery.com>
5354
5355 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5356 when handling a EXIT_PROCESS_DEBUG_EVENT.
5357
ff703abe
JB
53582009-01-06 Joel Brobecker <brobecker@adacore.com>
5359
5360 * gdbreplay.c (gdbreplay_version): Update copyright year.
5361 * server.c (gdbserver_version): Likewise.
5362
f21cc1a2 53632009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
5364
5365 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 5366 (handle_extended_wait): Improve comment.
0e21c1ec 5367
bca929d3
DE
53682008-12-13 Doug Evans <dje@google.com>
5369
5370 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5371 * server.h (ATTR_MALLOC): New macro.
5372 (xmalloc,xcalloc,xstrdup): Declare.
5373 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5374 * inferiors.c: Ditto.
5375 * linux-low.c: Ditto.
5376 * mem-break.c: Ditto.
5377 * regcache.c: Ditto.
5378 * remote-utils.c: Ditto.
5379 * server.c: Ditto.
5380 * target.c: Ditto.
5381 * win32-low.c: Ditto.
5382
97438e3f
DE
53832008-12-12 Doug Evans <dje@google.com>
5384
896c7fbb
DE
5385 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5386 in debugging printf.
5387
97438e3f
DE
5388 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5389
e3b886f8
DE
53902008-12-09 Doug Evans <dje@google.com>
5391
5392 * linux-low.h (struct process_info): Delete member tid, unused.
5393 * thread-db.c (find_one_thread): Update.
5394 (maybe_attach_thread): Update.
5395
07e059b5
VP
53962008-12-02 Pedro Alves <pedro@codesourcery.com>
5397
889bf7c5
PA
5398 * target.h (struct target_ops): Add qxfer_osdata member.
5399 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5400 and dirent.h.
5401 (linux_qxfer_osdata): New functions.
5402 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5403 callback.
5404 * server.c (handle_query): Handle "qXfer:osdata:read:".
5405 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5406 (buffer_xml_printf): New functions.
5407 * server.h (struct buffer): New.
5408 (buffer_grow_str, buffer_grow_str0): New macros.
5409 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5410 (buffer_xml_printf): Declare.
07e059b5 5411
4cab47ab
DE
54122008-11-24 Doug Evans <dje@google.com>
5413
5414 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5415
f142445f
DJ
54162008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5417
5418 * server.c (handle_v_run): Always use the supplied argument list.
5419
d0107bb6 54202008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 5421
d0107bb6
BW
5422 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5423 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 5424
2c4ad781
TJB
54252008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5426
5427 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5428 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5429 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5430 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5431 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5432 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5433 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5434 XML target descriptions.
5435 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5436 when inferior is running on an ISA 2.05 or later processor. Add
5437 special case to return offset for full 64-bit slot of FPSCR when
5438 in 32-bits.
5439
dfb64f85
DJ
54402008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5441
5442 * Makefile.in (SFILES, clean): Added sparc64 files.
5443 (reg-sparc64.o, reg-sparc64.c): New.
5444 * configure.srv (sparc*-*-linux*): New configuration.
5445 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5446 syscall arguments for SPARC.
5447 (regsets_store_inferior_registers): Likewise.
5448 * linux-sparc-low.c: New file.
5449
66b6e1dd
DE
54502008-10-21 Doug Evans <dje@google.com>
5451
5452 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5453 (READLINE_DIR,READLINE_DEP): Delete.
5454 (INTERNAL_CFLAGS): Update.
5455 (LINTFLAGS): Update.
5456
9b710a42
PA
54572008-10-10 Pedro Alves <pedro@codesourcery.com>
5458
5459 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5460 whole argv from the last run, not just argv[0].
5461
5822d809
PA
54622008-09-08 Pedro Alves <pedro@codesourcery.com>
5463
5464 * regcache.c (new_register_cache): Return NULL if the register
5465 cache size isn't known yet.
5466 (free_register_cache): Avoid dereferencing a NULL regcache.
5467
74aac56f
DJ
54682008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5469
5470 * configure.srv: Merge MIPS and MIPS64.
5471
400b20f5
MR
54722008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5473
5474 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5475
677c5bb1
LM
54762008-08-18 Luis Machado <luisgpm@br.ibm.com>
5477
5478 * Makefile.in: Add required vsx dependencies.
5479
5480 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5481 Declare init_registers_powerpc_vsx32l.
5482 Declare init_registers_powerpc_vsx64l.
5483 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5484 (ppc_arch_setup): Check for VSX in hwcap.
5485 (ppc_fill_vsxregset): New function.
5486 (ppc_store_vsxregset): New function.
5487 Add new VSX entry in regset_info target_regsets.
5488
5489 * configure.srv: Add new VSX dependencies.
5490
a6f3e723
SL
54912008-08-12 Pedro Alves <pedro@codesourcery.com>
5492
5493 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5494 (remote_open): Set or clear transport_is_reliable.
5495 (putpkt_binary): Don't expect acks in noack mode.
5496 (getpkt): Don't send ack/nac in noack mode.
5497 * server.c (handle_general_set): Handle QStartNoAckMode.
5498 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5499 qSupported.
5500 (main): Reset noack_mode on every connection.
5501 * server.h (noack_mode): Declare.
5502
a417dc56
RW
55032008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5504
5505 * Makefile.in (GDBREPLAY_OBS): New variable.
5506 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5507
3221518c
UW
55082008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5509 Daniel Jacobowitz <dan@codesourcery.com>
5510
5511 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5512 (usr_store_inferior_registers): Likewise.
5513 (regsets_store_inferior_registers): Likewise.
5514
ec56be1b
PA
55152008-07-31 Rolf Jansen <rj@surtec.com>
5516 Pedro Alves <pedro@codesourcery.com>
5517
5518 * configure.ac: Check for memmem declaration.
5519 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5520 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5521 (disable_packet_qfThreadInfo): Unconditionally compile.
5522 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5523 * configure, config.in: Regenerate.
5524
2fe5e3ff
DE
55252008-07-28 Doug Kwan <dougkwan@google.com>
5526
5527 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5528 (linux_write_memory): Remove declaration of errno.
5529
836acd6d
UW
55302008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5531
5532 * linux-low.c (handle_extended_wait): Do not use "status"
5533 variable uninitialized.
5534
aeba519e
PA
55352008-07-07 Pedro Alves <pedro@codesourcery.com>
5536
5537 * server.c (handle_v_attach): Inhibit reporting dll changes.
5538
db42f210
PA
55392008-06-27 Pedro Alves <pedro@codesourcery.com>
5540
5541 * remote-utils.c (prepare_resume_reply): If requested, don't
5542 output "thread:TID" in the T stop reply.
5543
5544 * server.c (disable_packet_vCont, disable_packet_Tthread)
5545 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5546 (handle_query): If requested, disable support for qC, qfThreadInfo
5547 and qsThreadInfo.
5548 (handle_v_requests): If requested, disable support for vCont.
5549 (gdbserver_show_disableable): New.
5550 (main): Handle --disable-packet and --disable-packet=LIST.
5551
5552 * server.h (disable_packet_vCont, disable_packet_Tthread)
5553 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5554
8e4c5421
CD
55552008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5556
5557 * server.c (gdbserver_usage): Mention --version.
5558
6e23a804
DJ
55592008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5560
5561 * Makefile.in (gdbreplay.o): New rule.
5562
90aa6a40
JM
55632008-06-06 Joseph Myers <joseph@codesourcery.com>
5564
5565 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5566 message, not gdbserver.
5567
c16158bc 55682008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
5569 Nathan Sidwell <nathan@codesourcery.com>
5570 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
5571
5572 * acinclude.m4: Include ../../config/acx.m4.
5573 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5574 * configure, config.in: Regenerate.
5575 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5576 * server.c (gdbserver_version): Print PKGVERSION.
5577 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5578 (main): Adjust gdbserver_usage calls.
5579 * gdbreplay.c (version, host_name): Add declarations.
5580 (gdbreplay_version, gdbreplay_usage): New.
5581 (main): Accept --version and --help options.
5582
aeb75bf5
DJ
55832008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5584
5585 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5586 (arm_breakpoint_at): Handle Thumb.
5587 (the_low_target): Add comment.
5588
76b233dd
UW
55892008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5590
5591 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5592
08388c79
DE
55932008-05-09 Doug Evans <dje@google.com>
5594
a3c83fae
DE
5595 * server.h (decode_search_memory_packet): Declare.
5596 * remote-utils.c (decode_search_memory_packet): New fn.
5597 * server.c (handle_search_memory_1): New fn.
08388c79
DE
5598 (handle_search_memory): New fn.
5599 (handle_query): Process qSearch:memory packets.
5600
bb9c3d36
UW
56012008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5602
5603 * regcache.c (registers_length): Remove.
5604 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5605 full register packet.
5606 * regcache.h (registers_length): Remove prototype.
5607 * server.h (PBUFSIZ): Define to 16384.
5608
7284e1be
UW
56092008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5610
5611 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5612 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5613 powerpc-64l.o, and powerpc-altivec64l.o.
5614 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5615 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5616 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5617 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5618 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5619 to srv_xmlfiles.
5620
5621 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5622 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5623 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5624 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5625 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5626 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5627 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5628 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5629 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5630 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5631 (clean): Update.
5632
5633 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5634 (init_registers_powerpc_32l): ... this new prototype.
5635 (init_registers_powerpc_32): Remove, replace by ...
5636 (init_registers_powerpc_altivec32l): ... this new prototype.
5637 (init_registers_powerpc_e500): Remove, replace by ...
5638 (init_registers_powerpc_e500l): ... this new prototype.
5639 (init_registers_ppc64): Remove, replace by ...
5640 (init_registers_powerpc_64l): ... this new prototype.
5641 (init_registers_powerpc_64): Remove, replace by ...
5642 (init_registers_powerpc_altivec64l): ... this new prototype.
5643 (ppc_num_regs): Set to 73.
5644 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5645 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5646 (ppc_cannot_store_register): Handle orig_r3 and trap.
5647 (ppc_arch_setup): Update init_registers_... calls.
5648 (ppc_fill_gregset): Handle orig_r3 and trap.
5649
5650 * inferiors.c (clear_inferiors): Reset current_inferior.
5651
fdc59709
PB
56522008-04-23 Paolo Bonzini <bonzini@gnu.org>
5653
889bf7c5
PA
5654 * acinclude.m4: Add override.m4.
5655 * configure: Regenerate.
fdc59709 5656
c9b2f845
UW
56572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5658
5659 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5660 initial call to init_register_ppc64.
5661
550512b8
UW
56622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5663
43aaf8b6
PA
5664 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5665 single powerpc*-*-linux* case.
550512b8
UW
5666 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5667
b6430ec3
UW
56682008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5669
5670 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 5671 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
5672 from reg_xmlfiles.
5673 * linux-ppc-low.c: Include <elf.h>.
5674 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5675 (ppc_hwcap): New global variable.
5676 (ppc_regmap): Remove __SPE__ #ifdef sections.
5677 (ppc_regmap_e500): New global variable.
5678 (ppc_cannot_store_register): Update __SPE__ special case.
5679 (ppc_get_hwcap): New function.
5680 (ppc_arch_setup): Use it to determine whether inferior supports
5681 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5682 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5683 Do not access registers if target does not support AltiVec.
5684 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5685 Do not access registers if target does not support SPE.
5686 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5687
52fa2412
UW
56882008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5689
5690 * linux-low.c (disabled_regsets, num_regsets): New.
5691 (use_regsets_p): Delete.
5692 (linux_wait_for_process): Clear disabled_regsets.
5693 (regsets_fetch_inferior_registers): Check and set it.
5694 (regsets_store_inferior_registers): Likewise.
5695 (linux_fetch_registers, linux_store_registers): Do not use
5696 use_regsets_p.
5697 (initialize_low): Allocate disabled_regsets.
5698
e28b3332
DJ
56992008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5700
5701 * Makefile.in (LIBOBJS): New.
5702 (OBS): Use LIBOBJS.
5703 (memmem.o): New rule.
5704 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5705 * configure: Regenerated.
5706
4536995d
UW
57072008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5708
5709 * server.c (handle_query): Never return "unsupported" for
5710 qXfer:features:read queries.
5711
221c031f
UW
57122008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5713
5714 * server.c (get_features_xml): Fix inverted condition.
5715 (handle_query): Always support qXfer:feature:read.
5716
ccd213ac
DJ
57172008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5718
5719 * server.c (wrapper_argv): New.
5720 (start_inferior): Handle wrapper_argv. If set, expect an extra
5721 trap.
5722 (gdbserver_usage): Document --wrapper.
5723 (main): Parse --wrapper.
5724
6fe305f7
UW
57252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5726
5727 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5728 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5729 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5730 (ppc_set_pc): Likewise.
5731 (ppc_arch_setup): New function.
5732 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5733 of collect_register.
889bf7c5 5734 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 5735
5b0a002e
UW
57362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5737
5738 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5739 instead of linux-ppc64-low.o.
5740 * linux-ppc64-low.c: Remove file.
5741 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5742 (linux-ppc64-low.o): Remove rule.
5743
5744 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5745 (init_registers_powerpc_64): Likewise.
5746 (ppc_regmap): Conditionally define depending on __powerpc64__.
5747 (ppc_cannot_store_register): Do not special-case "fpscr" when
5748 compiled on __powerpc64__.
5749 (ppc_collect_ptrace_register): New function.
5750 (ppc_supply_ptrace_register): New function.
5751 (ppc_breakpoint): Change type to "unsigned int".
5752 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5753 (the_low_target): Conditionally provide initializers for the
889bf7c5 5754 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
5755 collect_ptrace_register and supply_ptrace_register members.
5756
9b4b61c8
UW
57572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5758
5759 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5760 * server.c (gdbserver_xmltarget): Define.
5761 (get_features_xml): Use it to replace "target.xml" and arch_string.
5762
5763 * configure.srv: Remove srv_xmltarget. Add XML files that were
5764 mentioned there to srv_xmlfiles instead. Remove conditional tests
5765 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5766 srv_xmlfiles and srv_regobj to include all possible choices.
5767 * configure.ac (srv_xmltarget): Remove.
5768 (srv_xmlfiles): Do not add "target.xml".
5769 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5770 checks for supplementary target information.
5771 * configure: Regenerate.
5772 * Makefile.in (XML_TARGET): Remove.
5773 (target.xml): Remove rule.
5774 (clean): Do not clean up target.xml.
5775 (.PRECIOUS): Do not mention target.xml.
5776
5777 * target.h (struct target_ops): Remove arch_string member.
5778 * linux-low.c (linux_arch_string): Remove.
5779 (linux_target_ops): Remove arch_string initializer.
5780 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5781 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5782 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5783 * spu-low.c (spu_arch_string): Remove.
5784 (spu_target_ops): Remove arch_string initializer.
5785 * win32-low.c (win32_arch_string): Remove.
5786 (win32_target_ops): Remove arch_string initializer.
5787 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5788 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5789 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5790
ee1a7ae4
UW
57912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5792
5793 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5794 by collect_ptrace_register and supply_ptrace_register hooks.
5795 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5796 instead of checking for the_low_target.left_pad_xfer.
5797 (usr_store_inferior_registers): Use collect_ptrace_register callback
5798 instead of checking for the_low_target.left_pad_xfer.
5799
5800 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5801 (s390_supply_ptrace_register): Likewise.
5802 (s390_fill_gregset): Call s390_collect_ptrace_register.
5803 (the_low_target): Update.
5804
5805 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5806 (ppc_supply_ptrace_register): Likewise.
5807 (the_low_target): Update.
5808
5809 * linux-i386-low.c (the_low_target): Update.
5810 * linux-x86-64-low.c (the_low_target): Update.
5811
d61ddec4
UW
58122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5813
5814 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5815 reg-s390.o and reg-s390x.o.
5816
5817 * linux-low.c (new_inferior): New global variable.
5818 (linux_create_inferior, linux_attach): Set it.
5819 (linux_wait_for_process): Call the_low_target.arch_setup after the
5820 target has stopped for the first time.
5821 (initialize_low): Do not call the_low_target.arch_setup.
5822
5823 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5824 (s390_set_pc): Likewise.
5825 (s390_arch_setup): New function.
5826 (the_low_target): Use s390_arch_setup as arch_setup routine.
5827
5828 * regcache.c (realloc_register_cache): New function.
5829 (set_register_cache): Call it for each existing regcache.
5830
d05b4ac3
UW
58312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5832
5833 * server.h (init_registers): Remove prototype.
5834
5835 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5836 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5837 instead of init_registers ().
5838 * linux-arm-low.c (init_registers_arm): Add prototype.
5839 (init_registers_arm_with_iwmmxt): Likewise.
5840 (the_low_target): Add initializer for arch_setup field.
5841 * linux-cris-low.c (init_registers_cris): Add prototype.
5842 (the_low_target): Add initializer for arch_setup field.
5843 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5844 (the_low_target): Add initializer for arch_setup field.
5845 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5846 (the_low_target): Add initializer for arch_setup field.
5847 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5848 (the_low_target): Add initializer for arch_setup field.
5849 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5850 (the_low_target): Add initializer for arch_setup field.
5851 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5852 (the_low_target): Add initializer for arch_setup field.
5853 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5854 (init_registers_mips64_linux): Likewise.
5855 (the_low_target): Add initializer for arch_setup field.
5856 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5857 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5858 (the_low_target): Add initializer for arch_setup field.
5859 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5860 (init_registers_powerpc_64): Likewise.
5861 (the_low_target): Add initializer for arch_setup field.
5862 * linux-s390-low.c (init_registers_s390): Add prototype.
5863 (init_registers_s390x): Likewise.
5864 (the_low_target): Add initializer for arch_setup field.
5865 * linux-sh-low.c (init_registers_sh): Add prototype.
5866 (the_low_target): Add initializer for arch_setup field.
5867 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5868 (the_low_target): Add initializer for arch_setup field.
5869 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5870 (the_low_target): Add initializer for arch_setup field.
5871
5872 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5873 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5874 instead of init_registers ().
5875 * win32-arm-low.c (init_registers_arm): Add prototype.
5876 (the_low_target): Add initializer for arch_setup field.
5877 * win32-i386-low.c (init_registers_i386): Add prototype.
5878 (the_low_target): Add initializer for arch_setup field.
5879
5880 * spu-low.c (init_registers_spu): Add prototype.
5881 (initialize_low): Call initialie_registers_spu () instead of
5882 initialize_registers ().
5883
fd96d250
PA
58842008-02-19 Pedro Alves <pedro@codesourcery.com>
5885
5886 * server.c (handle_v_requests): When handling the vRun and vAttach
5887 packets, if already debugging a process, don't kill it. Return an
5888 error instead.
5889
d41b6bb4
DJ
58902008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5891
5892 * server.c (handle_query): Correct length check.
5893
5ac588cf
PA
58942008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5895
5896 * win32-low.c (do_initial_child_stuff): Add process handle
5897 parameter. Set current_process_handle and current_process_id from the
5898 parameters. Clear globals.
5899 (win32_create_inferior): Don't set current_process_handle and
5900 current_process_id here. Instead pass them on the call to
5901 do_initial_child_stuff.
5902 (win32_attach): Likewise.
5903 (win32_clear_inferiors): New.
5904 (win32_kill): Don't close the current process handle or the
5905 current thread handle here. Instead call win32_clear_inferiors.
5906 (win32_detach): Don't open a new handle to the process. Call
5907 win32_clear_inferiors.
5908 (win32_join): Don't rely on current_process_handle; open a new
5909 handle using the process id.
5910 (win32_wait): Call win32_clear_inferiors when the inferior process
5911 has exited.
5912
ecd7ecbc
DJ
59132008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5914
5915 * server.c (monitor_show_help): Add "exit".
5916
1525d545
MG
59172008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5918
ecd7ecbc 5919 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
5920 (clean): Add reg-xtensa.c.
5921 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
5922 * configure.srv (xtensa*-*-linux*) New target.
5923 * linux-xtensa-low.c: New.
5924 * xtensa-xtregs.c: New.
1525d545 5925
59a016f0
PA
59262008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5927
5928 * hostio.c: Don't include errno.h.
5929 (errno_to_fileio_errno): Move to hostio-errno.
5930 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5931 error number outputting to the target->hostio_last_error callback.
5932 (hostio_packet_error): Use FILEIO_EINVAL directly.
5933 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5934 calls to hostio_error.
5935 * hostio-errno.c: New.
5936 * server.h (hostio_last_error_from_errno): Declare.
5937 * target.h (target_ops): Add hostio_last_error member.
5938 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5939 as hostio_last_error handler.
889bf7c5 5940 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
5941 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5942 (wince_hostio_last_error): New functions.
5943 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5944 as hostio_last_error handler.
5945 (win32_target_ops) [!_WIN32_WCE]: Register
5946 hostio_last_error_from_errno as hostio_last_error handler.
5947 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5948 (hostio-errno.o): New rule.
5949 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5950 * configure.srv (srv_hostio_err_objs): New variable. Default to
5951 hostio-errno.o.
5952 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5953 * configure: Regenerate.
5954
2d717e4f
DJ
59552008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5956
5957 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5958 (linux_kill, linux_detach): Clean up the process list.
5959 * remote-utils.c (remote_open): Improve port number parsing.
5960 (putpkt_binary, input_interrupt): Only send interrupts if the target
5961 is running.
5962 * server.c (extended_protocol): Make static.
5963 (attached): Define earlier.
5964 (exit_requested, response_needed, program_argv): New variables.
5965 (target_running): New.
5966 (start_inferior): Clear attached here.
5967 (attach_inferior): Set attached here.
5968 (require_running): Define.
5969 (handle_query): Use require_running and target_running. Implement
5970 "monitor exit".
5971 (handle_v_attach, handle_v_run): New.
5972 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5973 (gdbserver_usage): Update.
5974 (main): Redo argument parsing. Handle --debug and --multi. Handle
5975 --attach along with other options or after the port. Save
5976 program_argv. Support no initial program. Resynchronize
5977 communication with GDB after an error. Handle "monitor exit".
5978 Use require_running and target_running. Always allow the extended
5979 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5980 restart in extended mode.
5981 * README: Refer to the GDB manual. Update --attach usage.
5982
7407e2de
AS
59832007-12-20 Andreas Schwab <schwab@suse.de>
5984
5985 * linux-low.c (STACK_SIZE): Define.
5986 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5987 (linux_test_for_tracefork): Likewise.
5988
b65d95c5
DJ
59892007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5990
5991 * linux-low.c (linux_wait_for_event): Update messages. Do not
5992 reinsert auto-delete breakpoints.
5993 * mem-break.c (struct breakpoint): Change return type of handler to
5994 int.
5995 (set_breakpoint_at): Update handler type.
5996 (reinsert_breakpoint_handler): Return 1 instead of calling
5997 delete_breakpoint.
5998 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5999 setting a new one.
6000 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6001 * mem-break.h (set_breakpoint_at): Update handler type.
6002 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6003 * win32-low.c (auto_delete_breakpoint): New.
6004 (get_child_debug_event): Use it.
6005
4e799345
DJ
60062007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6007
6008 * configure.ac: Check for pread and pwrite.
6009 * hostio.c (handle_pread): Fall back to lseek and read.
6010 (handle_pwrite): Fall back to lseek and write.
6011 * config.in, configure: Regenerated.
6012
27524b67
DJ
60132007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6014
6015 * server.c (myresume): Add own_buf argument.
6016 (main): Update calls.
6017
a20d5e98
DJ
60182007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6019
6020 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6021 * remote-utils.c (remote_open): Do not call disable_async_io.
6022 (block_async_io): Delete.
6023 (unblock_async_io): Make static.
6024 (initialize_async_io): New.
6025 * server.c (handle_v_cont): Handle async I/O here.
6026 (myresume): Likewise. Move other common resume tasks here...
6027 (main): ... from here. Call initialize_async_io. Disable async
6028 I/O before the main loop.
6029 * server.h (initialize_async_io): Declare.
6030 (block_async_io, unblock_async_io): Delete prototypes.
6031 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6032
b79d787e
DJ
60332007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6034
6035 * remote-utils.c (readchar): Allow binary data in received messages.
6036
d97903b2
PA
60372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6038
6039 * win32-low.c (attaching): New global.
6040 (win32_create_inferior): Clear the `attaching' global.
6041 (win32_attach): Set the `attaching' global.
6042 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6043 attaching. Only set a breakpoint at the entry point if not
6044 attaching.
6045
311de423
PA
60462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6047
6048 * server.c (main): Don't report dll events on the initial
6049 connection on attaches.
6050
6c2d16d2
PA
60512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6052
6053 * server.c (main): Relax numerical bases supported for the pid of
6054 the --attach command line argument.
6055
5ca906e6
PA
60562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6057
6058 * win32-low.c (win32_attach): Call OpenProcess before
6059 DebugActiveProcess, not after. Add last error output to error
6060 call.
6061
9c6c8194
PA
60622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6063
6064 * win32-low.c (win32_get_thread_context)
6065 (win32_set_thread_context): New functions.
6066 (thread_rec): Use win32_get_thread_context.
6067 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6068 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6069 field.
6070
4d5d1aaa
PA
60712007-12-03 Leo Zayas
6072 Pedro Alves <pedro_alves@portugalmail.pt>
6073
6074 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6075 global variables.
6076 (child_add_thread): Minor cleanup.
6077 (child_continue): Resume artificially suspended threads before
6078 calling ContinueDebugEvent.
6079 (suspend_one_thread): New.
6080 (fake_breakpoint_event): New.
6081 (get_child_debug_event): Change return type to int. Check here if
6082 gdb sent an interrupt request. If a soft interrupt was requested,
6083 fake a breakpoint event. Return 0 if there is no event to handle,
6084 and 1 otherwise.
6085 (win32_wait): Don't check here if gdb sent an interrupt request.
6086 Ensure there is a valid event to handle.
6087 (win32_request_interrupt): Add soft interruption method as last
6088 resort.
6089
c436e841
PA
60902007-12-03 Leo Zayas
6091 Pedro Alves <pedro_alves@portugalmail.pt>
6092
6093 * win32-low.h (win32_thread_info): Add descriptions to the
6094 structure members. Replace `suspend_count' counter by a
6095 `suspended' flag.
6096 * win32-low.c (thread_rec): Update condition of when to get the
6097 context from the inferior. Rely on ContextFlags being set if it
6098 has already been retrieved. Only suspend the inferior thread if
6099 we haven't already. Warn if that fails.
6100 (continue_one_thread): s/suspend_count/suspended/. Only call
6101 ResumeThread once. Warn if that fails.
6102
e7b5fa67
PA
61032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6104
6105 * win32-low.c (win32_wait): Don't read from the inferior when it
6106 has already exited.
6107
a385171d
PA
61082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6109
6110 * Makefile.in (win32_low_h): New variable.
6111 (win32-low.o): Add dependency on $(win32_low_h).
6112 (win32-arm-low.o, win32-i386-low.o): New rules.
6113
f80c84b3
DJ
61142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6115
6116 * hostio.c: Correct copyright year.
6117
a6b151f1
DJ
61182007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6119
6120 * Makefile.in (OBS): Add hostio.o.
6121 (hostio.o): New rule.
6122 * server.h (handle_vFile): Declare.
6123 * hostio.c: New file.
6124 * server.c (handle_v_requests): Take packet_len and new_packet_len
6125 for binary packets. Call handle_vFile.
6126 (main): Update call to handle_v_requests.
6127
f9387fc3
DJ
61282007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6129
6130 * linux-low.c: Include <sched.h>.
6131
51c2684e
DJ
61322007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6133
6134 * linux-low.c (linux_tracefork_grandchild): New.
6135 (linux_tracefork_child): Use clone.
6136 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6137
75f83163
JB
61382007-10-31 Joel Brobecker <brobecker@adacore.com>
6139
6140 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6141
da5898ce
DJ
61422007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6143
6144 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6145
24a09b5f
DJ
61462007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6147
6148 * inferiors.c (change_inferior_id): Delete.
6149 (add_pid_to_list, pull_pid_from_list): New.
6150 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6151 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6152 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6153 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6154 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6155 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6156 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6157 (using_threads): Always set to 1.
6158 (handle_extended_wait): New.
6159 (add_process): Do not set TID.
6160 (linux_create_inferior): Set must_set_ptrace_flags.
6161 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6162 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6163 (linux_thread_alive): Rename TID argument to LWPID.
6164 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6165 (linux_wait_for_event): Do not use TID or check using_threads. Update
6166 call to dead_thread_notify. Call handle_extended_wait.
6167 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6168 (send_sigstop): Delete sigstop_sent.
6169 (wait_for_sigstop): Avoid TID.
6170 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6171 (linux_test_for_tracefork): New.
6172 (linux_lookup_signals): Use thread_db_active and
6173 linux_supports_tracefork_flag.
6174 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6175 * linux-low.h (get_process_thread): Avoid TID.
6176 (struct process_ifo): Move thread_known and tid to the end. Remove
6177 sigstop_sent.
6178 (linux_attach_lwp, thread_db_init): Update prototypes.
6179 * server.h (change_inferior_id): Delete prototype.
6180 (add_pid_to_list, pull_pid_from_list): New prototypes.
6181 * thread-db.c (thread_db_use_events): New.
6182 (find_first_thread): Rename to...
6183 (find_one_thread): ...this. Update callers and messages. Do not
6184 call fatal. Check thread_db_use_events. Do not call
6185 change_inferior_id or new_thread_notify.
6186 (maybe_attach_thread): Update. Do not call new_thread_notify.
6187 (thread_db_init): Set thread_db_use_events. Check use_events.
6188 * utils.c (fatal, warning): Correct message prefix.
6189
30ed0a8f
DJ
61902007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6191
6192 * Makefile.in (clean): Remove new files.
6193 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6194 (powerpc-64.o, powerpc-64.c): New rules.
6195 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6196 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6197 with SPE.
6198 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6199 SPE targets.
6200 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6201 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6202 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6203 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6204 (target_regsets): Add AltiVec and SPE register sets.
6205 * configure.ac: Check for AltiVec and SPE.
6206 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6207 (ppc_fill_vrregset, ppc_store_vrregset): New.
6208 (target_regsets): Add AltiVec register set.
6209 * configure: Regenerated.
6210
fd462a61
DJ
62112007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6212
6213 * linux-low.c (O_LARGEFILE): Define.
6214 (linux_read_memory): Use /proc/PID/mem.
6215 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6216 * configure, config.in: Regenerated.
6217
69f223ed
DJ
62182007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6219
6220 * linux-low.c (linux_wait_for_event): Do not pass signals while
6221 single-stepping.
6222
aec18585
PA
62232007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6224
6225 * win32-low.c (create_process): New.
6226 (win32_create_inferior): Use create_process instead of
6227 CreateProcess. If create_process failed retry appending an ".exe"
6228 suffix. Store the GetLastError result immediatelly after
6229 create_process calls and use it on the call to error.
6230
34d86ddd
PA
62312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6232
6233 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6234
5a0e3bd0
JB
62352007-08-23 Joel Brobecker <brobecker@adacore.com>
6236
6237 * configure.ac: Switch license to GPLv3.
6238
f88c79e6
MS
62392007-08-01 Michael Snyder <msnyder@access-company.com>
6240
6241 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6242
6b3d9b83
PA
62432007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6244
6245 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6246 typedef.
6247 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6248 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6249 CloseToolhelp32Snapshot.
6250 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6251 CloseToolhelp32Snapshot.
6252
c588c53c
MS
62532007-07-27 Michael Snyder <michael.snyder@access-company.com>
6254
6255 * server.c (main): Check for inferior exit before main loop.
6256
aa0403d9
PA
62572007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6258
6259 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6260 instead of on tmp_desc.
6261
255e7678
DJ
62622007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6263 Daniel Jacobowitz <dan@codesourcery.com>
6264
6265 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6266 (add_thread): Minor cleanups.
6267 (clear_inferiors): Move lower in the file. Clear the DLL
6268 list.
6269 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6270 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6271 (xml_escape_text): New.
6272 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6273 for qSupported.
6274 (handle_v_cont): Report errors.
6275 (gdbserver_version): Update.
6276 (main): Correct size of own_buf. Do not report initial DLL events.
6277 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6278 (unloaded_dll, xml_escape_text): New.
6279 * win32-low.c (enum target_waitkind): Update comments.
6280 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6281 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6282 (win32_EnumProcessModules, win32_GetModuleInformation)
6283 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6284 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6285 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6286 (win32_Module32First, win32_Module32Next, load_toolhelp)
6287 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6288 (get_child_debug_event): Handle DLL events.
6289 (win32_wait): Likewise.
6290
0d37add9
DJ
62912007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6292
6293 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6294 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6295
45e2715e
PA
62962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6297
6298 * win32-low.c (handle_output_debug_string): Ignore event if not
6299 waiting.
6300
c5674cf1
PA
63012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6302
6303 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6304
2bbe3cc1
DJ
63052007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6306
6307 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6308
ae13219e
DJ
63092007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6310
6311 * inferiors.c (change_inferior_id): Add comment.
6312 * linux-low.c (check_removed_breakpoint): Add an early
6313 prototype. Improve debug output.
6314 (linux_attach): Doc update.
6315 (linux_detach_one_process, linux_detach): Clean up before releasing
6316 each process.
6317 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6318 * linux-low.h (struct process_info): Doc improvement.
6319 * mem-break.c (delete_all_breakpoints): New.
6320 * mem-break.h (delete_all_breakpoints): New prototype.
6321 * thread-db.c (find_first_thread): New.
6322 (thread_db_create_event): Call it instead of
6323 thread_db_find_new_threads. Clean up unused variables.
6324 (maybe_attach_thread): Remove first thread handling.
6325 (thread_db_find_new_threads): Use find_first_thread.
6326 (thread_db_get_tls_address): Likewise.
6327
4105de34
DJ
63282007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6329
6330 * thread-db.c (thread_db_find_new_threads): Add prototype.
6331 (thread_db_create_event): Check for the main thread before adding
6332 a new thread.
6333 (maybe_attach_thread): Only enable event reporting if TID == 0.
6334 (thread_db_get_tls_address): Check for new threads.
6335
2b876972
DJ
63362007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6337
6338 * linux-low.c (linux_create_inferior): Try execv before execvp.
6339 * spu-low.c (spu_create_inferior): Likewise.
6340
7a245884
DJ
63412007-06-13 Mike Frysinger <vapier@gentoo.org>
6342
6343 * linux-low.c (linux_create_inferior): Change execv to execvp.
6344 * spu-low.c (spu_create_inferior): Likewies.
6345
117ce543
DJ
63462007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6347
6348 * Makefile.in (clean): Clean new files instead of deleted ones.
6349 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6350 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6351 rules.
6352 * configure.srv: Specify XML files and new regformats for MIPS and
6353 MIPS64 GNU/Linux.
6354 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6355 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6356 an entry for the restart register.
6357 (mips_cannot_fetch_register, mips_cannot_store_register)
6358 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6359 register names to match the XML descriptions.
6360 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6361 restart register instead of $0.
6362
0e7f50da
UW
63632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6364 Markus Deuling <deuling@de.ibm.com>
6365
6366 * remote-utils.c (decode_xfer_write): New function.
6367 * server.h (decode_xfer_write): Add prototype.
6368 * server.c (handle_query): Add PACKET_LEN argument. Support
6369 qXfer:spu:read and qXfer:spu:write packets.
6370 (main): Pass packet_len to handle_query.
6371 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6372 * target.h (target_ops): Add qxfer_spu.
6373
374c1d38
UW
63742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6375
6376 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6377 accessing non-seekable spufs files.
6378
bb63802a
UW
63792007-05-16 Markus Deuling <deuling@de.ibm.com>
6380
889bf7c5 6381 * server.c (handle_query): Add reply for qC packet.
bb63802a 6382
7390519e
PA
63832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6384 Leo Zayas <lerele@champenstudios@com>
6385
6386 * server.h (check_remote_input_interrupt_request): New function.
6387 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6388 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6389 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6390 (check_remote_input_interrupt_request): New function.
6391 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 6392 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
6393 winapi_GenerateConsoleCtrlEvent): New typedefs.
6394 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6395 to 250 ms.
6396 (win32_wait): Check for remote interrupt request
6397 with check_remote_input_interrupt_request.
6398 (win32_request_interrupt): New function.
6399 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6400
34b34921
PA
64012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6402
6403 * win32-low.c (debug_registers_changed,
6404 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6405 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6406 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6407 (thread_rec): Get context using the low target.
6408 (child_add_thread): Call thread_added on the low target,
6409 which does the same thing.
6410 (regptr): Delete.
6411 (do_initial_child_stuff): Remove debug registers references.
6412 Set context using the low target. Resume threads after
6413 setting the contexts.
6414 (child_continue): Remove dead variable. Remove debug
6415 registers references.
6416 (child_fetch_inferior_registers): Go through the low target.
6417 (do_child_store_inferior_registers): Remove.
6418 (child_store_inferior_registers): Go through the low target.
6419 (win32_resume): Remove debug registers references.
6420 Set context using the low target.
6421 (handle_exception): Change return type to void. Don't record
6422 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6423 first chance exception.
889bf7c5 6424 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
6425 goto loop. Always return after waiting for debug event.
6426 (win32_wait): Convert to switch statement. Handle spurious
6427 events.
6428
6429 * win32-i386-low.c (debug_registers_changed,
6430 debug_registers_used): New.
6431 (initial_stuff): Rename to ...
6432 (i386_initial_stuff): ... this. Clear debug registers
6433 state variables.
6434 (store_debug_registers): Delete.
6435 (i386_get_thread_context): New.
6436 (load_debug_registers): Delete.
6437 (i386_set_thread_context): New.
6438 (i386_thread_added): New.
6439 (single_step): Rename to ...
6440 (i386_single_step): ... this.
6441 (do_fetch_inferior_registers): Rename to ...
6442 (i386_fetch_inferior_register): ... this.
6443 (i386_store_inferior_register): New.
6444 (the_low_target): Adapt to new interface.
6445
6446 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6447 (arm_get_thread_context): New.
6448 (arm_set_thread_context): New.
6449 (regptr): New.
6450 (do_fetch_inferior_registers): Rename to ...
6451 (arm_fetch_inferior_register): ... this.
6452 (arm_store_inferior_register): New.
6453 (arm_wince_breakpoint): Reimplement as unsigned long.
6454 (arm_wince_breakpoint_len): Define.
6455 (the_low_target): Adapt to new interface.
6456
6457 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6458 load_debug_registers. Add get_thread_context, set_thread_context,
6459 thread_added and store_inferior_register. Rename
6460 fetch_inferior_registers to fetch_inferior_register.
6461 (regptr): Remove declaration.
6462
dd6953e1
PA
64632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6464
6465 * linux-low.c (linux_detach): Change return type to int. Return 0.
6466 * spu-low.c (spu_detach): Likewise.
6467
444d6139
PA
64682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6469
6470 * target.h (target_ops): Change return type of detach to int.
6471 Add join.
6472 (join_inferior): New.
6473 * server.c (main): Don't skip detach support on mingw32.
6474 If the inferior doesn't support detaching return error.
6475 Call join_inferior instead of using waitpid.
6476 * linux-low.c (linux_join): New.
6477 (linux_target_op): Add linux_join.
6478 * spu-low.c (spu_join): New.
6479 (spu_target_ops): Add spu_join.
6480 * win32-low.c (win32_detach): Adapt to new interface.
6481 Reopen current_process_handle before detaching. Issue a child
6482 resume before detaching.
6483 (win32_join): New.
6484 (win32_target_op): Add win32_join.
6485
1d5315fe
PA
64862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6487
6488 * win32-low.c (win32-attach): Fix return value.
6489 * target.h (target_ops): Describe ATTACH return values.
6490
bf914831
PA
64912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6492
6493 * win32-low.c (GETPROCADDRESS): Define.
6494 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6495 (winapi_DebugSetProcessKillOnExit): Likewise.
6496 (win32_create_inferior): Force usage of ansi CreateProcessA.
6497 (win32_attach): Use GETPROCADDRESS.
6498 (win32_detach): Likewise.
6499
f72f3e60
PA
65002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6501
6502 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6503
ed50f18f
PA
65042007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6505
6506 * win32-low.c: Commit leftover changes from 2007-03-29.
6507
0c2ead7e
DJ
65082007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6509
6510 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6511 fields short instead of int. Add explicit padding.
6512 (i387_cache_to_fsave): Remove unnecessary casts.
6513 (i387_fsave_to_cache): Doc fix.
6514 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6515
73725ff3
DJ
65162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6517
6518 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6519 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6520
d99f33d8
PA
65212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6522
6523 * configure.srv (arm*-*-mingw32ce*): Move near the other
6524 arm targets.
6525
68070c10
PA
65262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6527
2482afc6 6528 * configure.ac: Add errno checking.
68070c10
PA
6529 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6530 sys/file.h and malloc.h.
6531 (AC_CHECK_DECLS): Add perror.
6532 (srv_mingwce): Handle.
2482afc6 6533 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
6534 win32-i386-low.o to srv_tgtobj.
6535 (i[34567]86-*-mingw*): Likewise.
6536 (arm*-*-mingw32ce*): Add case.
6537 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6538 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6539 [__MINGW32CE__] (strerror): New function.
6540 [__MINGW32CE__] (errno): Define to GetLastError.
6541 [__MINGW32CE__] (COUNTOF): New macro.
6542 (remote_open): Remove extra close call.
6543 * mem-break.c (delete_breakpoint_at): New function.
6544 * mem-break.h (delete_breakpoint_at): Declare.
6545 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6546 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6547 [USE_WIN32API] (read, write): Add char* casts.
6548 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6549 * server.h: Include wincecompat.h on Windows CE.
6550 [HAVE_ERRNO_H]: Check.
6551 (perror): Declare if not declared.
6552 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6553 (perror_with_name): Remove errno declaration.
6554 * wincecompat.h: New.
6555 * wincecompat.c: New.
6556 * win32-low.h: New.
6557 * win32-arm-low.c: New.
6558 * win32-i386-low.c: New.
6559 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6560 (OUTMSG2): Make it safe.
6561 (_T): New macro.
6562 (COUNTOF): New macro.
6563 (NUM_REGS): Get it from the low target.
6564 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6565 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6566 (thread_rec): Let low target handle debug registers.
6567 (child_add_thread): Likewise.
6568 (child_init_thread_list): Likewise.
6569 (continue_one_thread): Likewise.
6570 (regptr): New.
6571 (do_child_fetch_inferior_registers): Move to ...
6572 * win32-i386-low.c: ... here, and rename to ...
6573 (do_fetch_inferior_registers): ... this.
889bf7c5 6574 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
6575 Go through the low target.
6576 (do_child_store_inferior_registers): Use regptr.
6577 (strwinerror): New function.
6578 (win32_create_inferior): Handle Windows CE.
6579 Use strwinerror instead of strerror on Windows error
6580 codes. Add program to the error output.
6581 Don't close the main thread handle on Windows CE.
6582 (win32_attach): Use coredll.dll on Windows CE.
6583 (win32_kill): Close current process and current
6584 thread handles.
6585 (win32_detach): Use coredll.dll on Windows CE.
6586 (win32_resume): Let low target handle debug registers, and
6587 step request.
6588 (handle_exception): Add/Remove initial breakpoint. Avoid
6589 non-existant WSTOPSIG on Windows CE.
6590 (win32_read_inferior_memory): Cast to remove warning.
6591 (win32_arch_string): Go through the low target.
6592 (initialize_low): Call set_breakpoint_data with the low
6593 target's breakpoint.
6594 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6595 FOP_REGNUM, mappings): Move to ...
6596 * win32-i386-low.c: ... here.
6597 * win32-low.c (win32_thread_info): Move to ...
6598 * win32-low.h: ... here.
6599 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6600 win32-arm-low.c and wincecompat.c.
6601 (all:): Add $EXEEXT.
6602 (install-only:): Likewise.
6603 (gdbserver:): Likewise.
6604 (gdbreplay:): Likewise.
6605 * config.in: Regenerate.
6606 * configure: Regenerate.
6607
41093d81
PA
66082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6609
6610 * win32-low.c: Rename typedef thread_info to
6611 win32_thread_info throughout.
6612
544afa54
PA
66132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6614
6615 * win32-i386-low.c: Rename to ...
6616 * win32-low.c: ... this.
6617 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6618 * Makefile.in: Likewise.
6619
bce7165d
PA
66202007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6621
6622 * remote-utils.c (monitor_output): Constify msg parameter.
6623 * server.h (monitor_output): Likewise.
6624 * win32-i386-low.c (handle_output_debug_string): New.
6625 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6626 handle_output_debug_string.
6627 (get_child_debug_event): Likewise.
6628
506c7aa0
DJ
66292007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6630
6631 * server.c (main): Correct strtoul check.
6632
42c81e2a
DJ
66332007-03-27 Jon Ringle <jon@ringle.org>
6634
6635 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6636
9453113a
DJ
66372007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6638
6639 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6640
64a69107
DJ
66412007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6642
6643 * terminal.h: Check HAVE_SGTTY_H.
6644
66452007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
6646
6647 * remote-utils.c (remote_open): Print out the assigned port number.
6648
c74d0ad8
DJ
66492007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6650
6651 * remote-utils.c (monitor_output): New function.
6652 * server.c (debug_threads): Define here.
6653 (monitor_show_help): New function.
6654 (handle_query): Handle qRcmd.
6655 (main): Do not handle 'd' packet.
6656 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6657 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6658 of debug_threads.
6659
de7c3b4a
PA
66602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6661
6662 * Makefile.in (EXEEXT): New.
6663 (clean): Use $(EXEEXT).
6664
ef57601b
PA
66652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6666
6667 * target.h (target_ops): Rename send_signal to request_interrupt,
6668 and remove enum target_signal parameter.
6669 * linux-low.c (linux_request_interrupt): Rename from
6670 linux_send_signal, and always send SIGINT.
6671 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6672 and always send SIGINT.
6673 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6674 of send_signal.
6675 (input_interrupt): Likewise.
6676
820f2bda
PA
66772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6678
6679 * server.c (get_features_xml): Check if target implemented
6680 arch_string.
6681 * win32-i386-low.c (win32_arch_string): New.
6682 (win32_target_ops): Add win32_arch_string as arch_string member.
6683
ab39bf24
UW
66842007-02-22 Markus Deuling <deuling@de.ibm.com>
6685
6686 * spu-low.c (spu_arch_string): New.
6687 (spu_target_ops): Add spu_arch_string.
6688
61ff6e04
DJ
66892007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6690
6691 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6692 * configure.ac: Do not check for terminal.h.
6693 * configure, config.in: Regenerated.
6694
fb1e4ffc
DJ
66952007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6696
6697 * Makefile.in (OBS): Add $(XML_BUILTIN).
6698 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6699 (clean): Update.
6700 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6701 (arm-with-iwmmxt.c): New.
6702 * config.in, configure: Regenerate.
6703 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6704 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6705 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6706 (arm*-*-linux*): Add iWMMXt and regset support.
6707 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6708 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6709 (arm_store_wmmxregset, target_regsets): New.
6710 * server.c (get_features_xml): Take annex argument. Check builtin
6711 XML documents.
6712 (handle_query): Handle multiple annexes.
6713
0f48aa01
DJ
67142007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6715
6716 * remote-utils.c [USE_WIN32API] (read, write): Define.
6717 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6718 write.
6719
23181151
DJ
67202007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6721
6722 * linux-i386-low.c (the_low_target): Set arch_string.
6723 * linux-x86-64-low.c (the_low_target): Likewise.
6724 * linux-low.c (linux_arch_string): New.
6725 (linux_target_ops): Add it.
6726 * linux-low.h (struct linux_target_ops): Add arch_string.
6727 * server.c (write_qxfer_response): Use const void * for DATA.
6728 (get_features_xml): New.
6729 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6730 * target.h (struct target_ops): Add arch_string method.
6731
9d606399
DJ
67322007-01-03 Denis Pilat <denis.pilat@st.com>
6733 Daniel Jacobowitz <dan@codesourcery.com>
6734
6735 * linux-low.c (linux_kill): Handle being called with no threads.
6736 * win32-i386-low.c (win32_kill): Likewise.
6737 (get_child_debug_event): Clear current_process_handle.
6738
67392006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
6740 Daniel Jacobowitz <dan@codesourcery.com>
6741
6742 * remote-utils.c (remote_open): Check the type of specified
6743 serial port devices before opening them.
6744 * server.c (main): Kill the inferior if an error occurs during
6745 the first remote_open.
6746
a5e13d24
DJ
67472006-12-05 Markus Deuling <deuling@de.ibm.com>
6748
6749 * README: Update supported targets.
6750
186947f7
DJ
67512006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6752
6753 * Makefile.in (clean): Remove reg-mips64.c.
6754 (reg-mips64.c, reg-mips64.o): New rules.
6755 * configure.srv: Handle mips64. Include regset support for mips.
6756 * linux-mips-low.c (union mips_register): New.
6757 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6758 (mips_breakpoint, mips_breakpoint_at): Use int.
6759 (mips_collect_register, mips_supply_register)
6760 (mips_collect_register_32bit, mips_supply_register_32bit)
6761 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6762 (mips_store_fpregset, target_regsets): New.
6763 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6764
a13e2c95
UW
67652006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6766
6767 * configure.srv: Add target "spu*-*-*".
6768 * Makefile.in (clean): Remove reg-spu.c.
6769 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6770 * spu-low.c: New file.
6771
cb7283db
DJ
67722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6773
6774 * configure.ac: Correct td_thr_tls_get_addr test.
6775 * configure: Regenerated.
6776
89be2091
DJ
67772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6778
6779 * linux-low.c (linux_wait_for_event): Reformat. Use the
6780 pass_signals array.
6781 * remote-utils.c (decode_address_to_semicolon): New.
6782 * server.c (pass_signals, handle_general_set): New.
6783 (handle_query): Mention QPassSignals for qSupported.
6784 (main): Call handle_general_set.
6785 * server.h (pass_signals, decode_address_to_semicolon): New.
6786
000ef4f0
DJ
67872006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6788
6789 * server.c (handle_query): Correct error handling for read_auxv.
6790
b7149293
UW
67912005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6792
6793 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6794 and srv_linux_thread_db to yes.
6795 * linux-s390-low.c (s390_fill_gregset): New function.
6796 (target_regsets): Define data structure.
6797
dae5f5cf
DJ
67982006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6799
6800 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6801 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6802 * config.in, configure: Regenerated.
6803 * inferiors.c (gdb_id_to_thread): New function.
6804 (gdb_id_to_thread_id): Use it.
6805 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6806 * linux-low.h (struct process_info): Add th member.
6807 (thread_db_get_tls_address): New prototype.
6808 * remote-utils.c (decode_address): Make non-static.
6809 * server.c (handle_query): Handle qGetTLSAddr.
6810 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6811 * target.h (struct target_ops): Add get_tls_address.
6812 * thread-db.c (maybe_attach_thread): Save the thread handle.
6813 (thread_db_get_tls_address): New.
6814
32ca6d61
DJ
68152006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6816
6817 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6818 (linux_resume_one_process): Take a siginfo_t *. Update all
6819 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6820 (struct pending_signals): Add a siginfo_t.
6821 (linux_wait_for_process): Always set last_status.
6822 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6823 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6824 * linux-low.h (struct process_info): Add last_status.
6825
5ffff7c1
DJ
68262006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6827
6828 * remote-utils.c (try_rle): New function.
6829 (putpkt_binary): Use it.
6830
8695c747
DJ
68312006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6832
6833 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6834 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6835 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6836 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6837 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6838 point registers.
6839
290fadea
RS
68402006-08-08 Richard Sandiford <richard@codesourcery.com>
6841
6842 * server.c (terminal_fd): New variable.
6843 (old_foreground_pgrp): Likewise.
6844 (restore_old_foreground_pgrp): New function.
6845 (start_inferior): Record the terminal file descriptor in terminal_fd
6846 and its original foreground group in old_foreground_pgrp. Register
6847 restore_old_foreground_pgrp with atexit().
6848
9f2e1e63
DJ
68492006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6850
6851 * server.c (handle_query): Correct qPart to qXfer.
6852
b80864fb
DJ
68532006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6854
6855 * configure.ac: Check for more headers which are missing on
6856 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6857 * configure.srv: Add Cygwin and mingw32.
6858 * remote-utils.c: Don't include headers unconditionally which
6859 are missing on mingw32. Include <winsock.h> for mingw32.
6860 (remote_open): Adjust for mingw32 support. Flush
6861 standard error after writing to it.
6862 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6863 (unblock_async_io, enable_async_io, disable_async_io)
6864 (readchar, getpkt): Update for Winsock support.
6865 (prepare_resume_reply): Expect a protocol signal number.
6866 * server.c: Disable <sys/wait.h> on mingw32.
6867 (start_inferior): Adjust for mingw32 support. Flush
6868 standard error after writing to it.
6869 (attach_inferior): Likewise. Use protocol signal
6870 numbers.
6871 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6872 and names.
6873 * win32-i386-low.c: New file.
6874 * Makefile.in (XM_CLIBS): Set.
6875 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6876 (win32-i386-low.o): New dependency rule.
6877 * linux-low.c (linux_wait): Use target signal numbers.
6878 * target.h (struct target_ops): Doc fix.
6879 * server.h (target_signal_to_name): New prototype.
6880 * gdbreplay.c: Don't include headers unconditionally which
6881 are missing on mingw32. Include <winsock.h> for mingw32.
6882 (remote_close, remote_open): Adjust for Winsock support.
6883 * configure, config.in: Regenerated.
6884
0876f84a
DJ
68852006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6886
6887 * server.c (decode_xfer_read, write_qxfer_response): New.
6888 (handle_query): Take a packet length argument. Handle
6889 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6890 the qSupported response.
6891 (main): Update call to handle_query.
6892
01f9e8fa
DJ
68932006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6894
6895 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6896 (putpkt_binary): Renamed from putpkt and adjusted for binary
6897 data.
6898 (putpkt): New wrapper for putpkt_binary.
6899 (readchar): Don't mask off the high bit.
6900 (decode_X_packet): New function.
6901 * server.c (main): Call putpkt_binary if a handler sets the packet
6902 length. Save the length of the incoming packet. Handle 'X'.
6903 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6904
be2a5f71
DJ
69052006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6906
6907 * server.c (handle_query): Handle qSupported.
6908
ea025f5f
DJ
69092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6910
6911 * remote-utils.c (all_symbols_looked_up): New variable.
6912 (look_up_one_symbol): Check it.
6913 * server.h (look_up_one_symbol): New declaration.
6914 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6915
9308fc88
DJ
69162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6917
6918 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 6919 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
6920 (PTRACE_GET_THREAD_AREA): Define.
6921 (ps_get_thread_area): New function.
6922
52fb6437
NS
69232006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6924
6925 * configure.srv (m68k*-*-uclinux*): New target.
6926 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6927 (linux_resume_one_process): Remove extraneous cast.
6928 (linux_read_offsets): New.
6929 (linux_target_op): Add linux_read_offsets on mmuless systems.
6930 * server.c (handle_query): Add qOffsets logic.
6931 * target.h (struct target_ops): Add read_offsets.
6932
21b0f40c
DJ
69332006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6934
6935 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6936 (PTRACE_GET_THREAD_AREA): Define.
6937 (ps_get_thread_area): New function.
6938 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6939 (linux-x86-64-low.o): Update.
6940
0050a760
DJ
69412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6942
6943 * configure.ac: Remove checks for prfpregset_t.
6944 * gdb_proc_service.h: New file.
6945 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6946 new "gdb_proc_service.h".
6947 * proc-service.c: Likewise.
6948 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6949 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6950 * Makefile.in (gdb_proc_service_h): Updated.
6951 * configure, config.in: Regenerated.
6952
b92a518e
DJ
69532006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6954
6955 * remote-utils.c (prepare_resume_reply): Move declaration
6956 of gdb_id_from_wait to the top of the block.
6957
545587ee
DJ
69582006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6959
6960 * linux-low.c (regsets_store_inferior_registers): Read the regset
6961 from the target before filling it.
6962
9db87ebd
DJ
69632006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6964
6965 * server.c (attach_inferior): Return SIGTRAP for a successful
6966 attach.
6967
dd24457d
DJ
69682006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6969
6970 * Makefile.in (OBS): Add version.o.
6971 (STAGESTUFF): Delete.
6972 (version.o): Add dependencies.
6973 (version.c): Replace rule.
6974 (clean): Remove version.c.
6975 * server.c (gdbserver_version): New.
6976 (gdbserver_usage): Use printf.
6977 (main): Handle --version and --help.
6978 * server.h (version, host_name): Add declarations.
6979
6f0f660e
EZ
69802005-12-23 Eli Zaretskii <eliz@gnu.org>
6981
889bf7c5
PA
6982 * linux-arm-low.c:
6983 * linux-arm-low.c:
6984 * inferiors.c:
6985 * i387-fp.h:
6986 * i387-fp.c:
6987 * gdbreplay.c:
6988 * regcache.c:
6989 * proc-service.c:
6990 * mem-break.h:
6991 * mem-break.c:
6992 * linux-x86-64-low.c:
6993 * linux-sh-low.c:
6994 * linux-s390-low.c:
6995 * linux-ppc64-low.c:
6996 * linux-ppc-low.c:
6997 * linux-mips-low.c:
6998 * linux-m68k-low.c:
6999 * linux-m32r-low.c:
7000 * linux-low.h:
7001 * linux-low.c:
7002 * linux-ia64-low.c:
7003 * linux-i386-low.c:
7004 * linux-crisv32-low.c:
7005 * thread-db.c:
7006 * terminal.h:
7007 * target.h:
7008 * target.c:
7009 * server.h:
7010 * server.c:
7011 * remote-utils.c:
7012 * regcache.h:
7013 * utils.c:
7014 * Makefile.in:
7015 * configure.ac:
6f0f660e
EZ
7016 * gdbserver.1: Add (C) after Copyright. Update the FSF
7017 address.
7018
9d1fb177
DJ
70192005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7020
7021 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7022 (arm_breakpoint_at): Recognize both breakpoints.
7023 (the_low_target): Use the correct breakpoint instruction.
7024
011a70c2
DJ
70252005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7026
7027 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7028 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7029 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7030 (the_low_target): Update.
7031
7fb85e41
AS
70322005-10-25 Andreas Schwab <schwab@suse.de>
7033
7034 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7035
7036 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7037 (ia64_num_regs): Reduce to 462.
7038
3db0444b
DJ
70392005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7040
7041 * acinclude.m4: Correct quoting.
7042 * aclocal.m4: Regenerated.
7043
7044 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7045 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7046 (thread_db_init): Call thread_db_err_str.
7047 * configure.ac: Check for TD_VERSION.
7048 * config.in, configure: Regenerated.
7049
bee0189a
DJ
70502005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7051
7052 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7053
e9d25b98
DJ
70542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7055
7056 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7057 is not available. Define HAVE_PTRACE_GETREGS if it is.
7058 * config.in, configure: Regenerated.
7059 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7060 * linux-i386-low.c, linux-m68k-low.c: Update to use
7061 HAVE_PTRACE_GETREGS.
7062 * linux-low.c (regsets_fetch_inferior_registers)
7063 (regsets_store_inferior_registers): Only return 0 if we processed
7064 GENERAL_REGS.
7065 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7066 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7067
a06660f7
DJ
70682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7069
7070 * inferiors.c (struct thread_info): Add gdb_id.
7071 (add_thread): Add gdb_id argument.
7072 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7073 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7074 calls to add_thread.
7075 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7076 * server.c (handle_query): Use thread_to_gdb_id.
7077 (handle_v_cont, main): Use gdb_id_to_thread_id.
7078 * server.h (add_thread): Update prototype.
7079 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7080 prototypes.
7081
5a1f5858
DJ
70822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7083
7084 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7085 left-padded registers.
7086 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7087 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7088
e122f1f5
SE
70892005-07-01 Steve Ellcey <sje@cup.hp.com>
7090
7091 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7092 * configure: Regenerate.
7093 * config.in: Regenerate.
7094 * server.h (NEED_DECLARATION_STRERROR):
7095 Replace with !HAVE_DECL_STRERROR.
7096
d592fa2f
DJ
70972005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7098
7099 * linux-low.c (linux_wait, linux_send_signal): Don't test
7100 an unsigned long variable for > 0 if it could be MAX_ULONG.
7101 * server.c (myresume): Likewise.
7102 * target.c (set_desired_inferior): Likewise.
7103
ccbd4912
MK
71042005-06-13 Mark Kettenis <kettenis@gnu.org>
7105
7106 * configure.ac: Simplify and improve check for socklen_t.
7107 * configure, config.in: Regenerate.
7108
f450004a
DJ
71092005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7110
7111 * acconfig.h: Remove.
7112 * configure.ac: Add a test for socklen_t. Use three-argument
7113 AC_DEFINE throughout.
7114 * config.in: Regenerated using autoheader 2.59.
7115 * configure: Regenerated.
7116
7117 * gdbreplay.c (socklen_t): Provide a default.
7118 (remote_open): Use socklen_t.
7119 * remote-utils.c (socklen_t): Provide a default.
7120 (remote_open): Use socklen_t.
7121 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7122 unsigned char.
7123
7124 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7125 char for buffers.
7126 * linux-low.c (linux_read_memory, linux_write_memory)
7127 (linux_read_auxv): Likewise.
7128 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7129 (check_mem_write): Likewise.
7130 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7131 Likewise.
7132 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7133 (registers_from_string, register_data): Likewise.
7134 * server.c (handle_query, main): Likewise.
7135 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7136 (decode_M_packet): Likewise.
7137 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7138 * target.h (struct target_ops): Update read_memory, write_memory,
7139 and read_auxv.
7140 (read_inferior_memory, write_inferior_memory): Update.
7141 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7142 to unsigned char *.
7143 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7144 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7145 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7146 linux-s390-low.c, linux-sh-low.c: Update for changes in
7147 read_inferior_memory and the_low_target->breakpoint.
7148
eee84df1
DJ
71492005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7150
7151 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7152 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7153 * configure.srv: Add powerpc64-*-linux*.
7154 * linux-ppc64-low.c: New file.
7155
45b134e5
OF
71562005-05-23 Orjan Friberg <orjanf@axis.com>
7157
7158 * linux-cris-low.c: New file with support for CRIS.
7159 * linux-crisv32-low.c: Ditto for CRISv32.
7160 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7161 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 7162 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
7163 reg-crisv32.o, and reg-crisv32.c to make rules.
7164 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7165 recognized targets.
7166
48d93c75
UW
71672005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7168
7169 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7170 of sizeof (PTRACE_XFER_TYPE).
7171 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7172
e013ee27
OF
71732005-05-12 Orjan Friberg <orjanf@axis.com>
7174
889bf7c5 7175 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
7176 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7177 pointers for hardware watchpoint support.
7178 * linux-low.h (struct linux_target_ops): Ditto.
7179 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7180 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7181 to linux_target_ops.
7182 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7183 reply packet.
7184 * server.c (main): Recognize 'Z' and 'z' packets.
7185
b0ded00b
UW
71862005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7187
7188 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7189 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7190 (the_low_target): Add new members.
7191
8643e2ad
DJ
71922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7193
7194 * proc-service.c (ps_lgetregs): Search all_processes instead of
7195 all_threads.
7196
fc620387
DJ
71972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7198
7199 * server.c (start_inferior): Change return type to int.
7200 (attach_inferior): Change sigptr to int *.
7201 (handle_v_cont, handle_v_requests): Change signal to int *.
7202 (main): Change signal to int.
7203
72042005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
7205
7206 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7207 * configure.srv: Add m32r*-*-linux*.
7208 * linux-m32r-low.c: New file.
7209
e0e76420
DJ
72102005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7211
7212 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7213
a1928bad
DJ
72142005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7215
7216 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7217 Take unsigned long arguments for PIDs.
7218 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7219 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7220 (wait_for_sigstop, linux_resume_one_process)
7221 (regsets_fetch_inferior_registers, linux_send_signal)
7222 (linux_read_auxv): Likewise. Update the types of variables holding
7223 PIDs. Update format string specifiers.
7224 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7225 * remote-utils.c (prepare_resume_reply): Likewise.
7226 * server.c (cont_thread, general_thread, step_thread)
7227 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7228 unsigned long.
7229 (handle_query): Update format specifiers.
7230 (handle_v_cont, main): Use strtoul for thread IDs.
7231 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7232 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7233 (general_thread, step_thread, thread_from_wait)
7234 (old_thread_from_wait): Update.
7235 * target.h (struct thread_resume): Use unsigned long for THREAD.
7236 (struct target_ops): Use unsigned long for arguments to attach and
7237 thread_alive.
7238
dcdb98d2
DJ
72392005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7240
7241 * acinclude.m4: Include bfd/bfd.m4 directly.
7242 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7243 <agriffis@toolchain.org>.
7244 * aclocal.m4, configure: Regenerated.
7245
bec39cab
AC
72462005-01-07 Andrew Cagney <cagney@gnu.org>
7247
7248 * configure.ac: Rename configure.in, require autoconf 2.59.
7249 * configure: Re-generate.
7250
434c4c77
DJ
72512004-12-08 Daniel Jacobowitz <dan@debian.org>
7252
7253 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7254 LIBS when finished.
7255 * aclocal.m4: Regenerated.
7256 * configure: Regenerated.
7257
db1d3e1b
AS
72582004-11-21 Andreas Schwab <schwab@suse.de>
7259
7260 * linux-m68k-low.c (m68k_num_gregs): Define.
7261 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7262 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7263 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7264 (m68k_breakpoint_at): New. Add to the_low_target.
7265
7266 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7267 srv_linux_thread_db to yes.
7268
43360365
JB
72692004-10-20 Joel Brobecker <brobecker@gnat.com>
7270
7271 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7272 (ARCH_SET_FS): Likewise.
7273 (ARCH_GET_FS): Likewise.
7274 (ARCH_GET_GS): Likewise.
7275
fd500816
DJ
72762004-10-16 Daniel Jacobowitz <dan@debian.org>
7277
7278 * linux-i386-low.c (ps_get_thread_area): New.
7279 * linux-x86-64-low.c (ps_get_thread_area): New.
7280 * linux-low.c: Include <sys/syscall.h>.
7281 (linux_kill_one_process): Don't kill the first thread here.
7282 (linux_kill): Kill the first thread here.
7283 (kill_lwp): New function.
7284 (send_sigstop, linux_send_signal): Use it.
7285 * proc-service.c: Clean up #ifdefs.
7286 (fpregset_info): Delete.
7287 (ps_lgetregs): Update and enable implementation.
7288 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7289 implementations.
7290 * remote-utils.c (struct sym_cache, symbol_cache): New.
7291 (input_interrupt): Print a clearer message.
7292 (async_io_enabled): New variable.
7293 (enable_async_io, disable_async_io): Use it. Update comments.
7294 (look_up_one_symbol): Use the symbol cache.
7295 * thread-db.c (thread_db_look_up_symbols): New function.
7296 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7297
f6de3c42
DJ
72982004-10-16 Daniel Jacobowitz <dan@debian.org>
7299
7300 * configure.in: Test for -rdynamic.
7301 * configure: Regenerated.
7302 * Makefile (INTERNAL_LDFLAGS): New.
7303 (gdbserver, gdbreplay): Use it.
7304
2c0fc042
AC
73052004-09-02 Andrew Cagney <cagney@gnu.org>
7306
7307 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7308
075b3282
DJ
73092004-03-23 Daniel Jacobowitz <drow@mvista.com>
7310
7311 * linux-low.c (linux_wait): Clear all_processes list also.
7312
fa6a77dc
DJ
73132004-03-12 Daniel Jacobowitz <drow@mvista.com>
7314
7315 * linux-low.c: Include <errno.h>. Remove extern declaration of
7316 errno.
7317
6d782a97
DJ
73182004-03-12 Daniel Jacobowitz <drow@mvista.com>
7319
7320 * gdbreplay.c, server.h, utils.c: Update copyright years.
7321
3a7fb99b
DJ
73222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7323
7324 * server.c (main): Print child status or termination signal from
7325 variable 'signal', not 'sig'.
7326
c3e735a6
DJ
73272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7328
7329 * linux-low.c (linux_read_memory): Change return type to
7330 int. Check for and return error from ptrace().
7331 * target.c (read_inferior_memory): Change return type to int. Pass
7332 back return status from the_target->read_memory().
7333 * target.h (struct target_ops): Adapt *read_memory() prototype.
7334 Update comment.
7335 (read_inferior_memory): Adapt prototype.
7336 * server.c (main): Return an error packet if
7337 read_inferior_memory() returns an error.
7338
a59d1c82
DJ
73392004-03-04 Daniel Jacobowitz <drow@mvista.com>
7340
7341 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7342 Unify with other clean targets.
7343
dc3f8883
DJ
73442004-02-29 Daniel Jacobowitz <drow@mvista.com>
7345
7346 * server.c (handle_v_cont): Call set_desired_inferior.
7347
89a208da
DJ
73482004-02-29 Daniel Jacobowitz <drow@mvista.com>
7349
7350 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7351
62ea82f5
DJ
73522004-02-29 Daniel Jacobowitz <drow@mvista.com>
7353
7354 * linux-low.c (linux_wait): Unblock async I/O.
7355 (linux_resume): Block and enable async I/O.
7356 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7357 * server.h (block_async_io, unblock_async_io): Add prototypes.
7358
6910d122
DJ
73592004-02-29 Daniel Jacobowitz <drow@mvista.com>
7360
7361 * remote-utils.c (remote_open): Print a status notice after
7362 opening a TCP port.
7363 * server.c (attach_inferior): Print a status notice after
7364 attaching.
7365
73662004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
7367
7368 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7369
c89dc5d4
DJ
73702004-02-26 Daniel Jacobowitz <drow@mvista.com>
7371
7372 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7373 error packet.
7374 * server.c, target.h: Update copyright years.
7375
4b8dad4a
RM
73762004-02-25 Roland McGrath <roland@redhat.com>
7377
7378 * target.h (struct target_ops): New member `read_auxv'.
7379 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7380 * linux-low.c (linux_read_auxv): New function.
7381 (linux_target_ops): Initialize `read_auxv' member to that.
7382
d7446758
JB
73832004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7384
7385 Committed by Jim Blandy <jimb@redhat.com>.
7386
7387 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 7388 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
7389 instead of GPR_SIZE to distiguish s390 and s390x targets.
7390
5544ad89
DJ
73912004-01-31 Daniel Jacobowitz <drow@mvista.com>
7392
7393 * linux-low.c: Update copyright year.
7394 (check_removed_breakpoint): Clear pending_is_breakpoint.
7395 (linux_set_resume_request, linux_queue_one_thread)
7396 (resume_status_pending_p): New functions.
7397 (linux_continue_one_thread): Use process->resume.
7398 (linux_resume): Only resume threads if there are no pending events.
7399 * linux-low.h (struct process_info): Add resume request
7400 pointer.
7401
2a68b70e
DJ
74022004-01-30 Daniel Jacobowitz <drow@mvista.com>
7403
7404 * regcache.c (new_register_cache): Clear the allocated register
7405 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7406
64386c31
DJ
74072003-10-13 Daniel Jacobowitz <drow@mvista.com>
7408
7409 * linux-low.c (linux_resume): Take a struct thread_resume *
7410 argument.
7411 (linux_wait): Update call.
7412 (resume_ptr): New static variable.
7413 (linux_continue_one_thread): Renamed from
7414 linux_continue_one_process. Use resume_ptr.
7415 (linux_resume): Use linux_continue_one_thread.
7416 * server.c (handle_v_cont, handle_v_requests): New functions.
7417 (myresume): New function.
7418 (main): Handle 'v' case.
7419 * target.h (struct thread_resume): New type.
7420 (struct target_ops): Change argument of "resume" to struct
7421 thread_resume *.
7422 (myresume): Delete macro.
7423
c938e9b0
L
74242003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7425
7426 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7427 (uninstall): Support DESTDIR.
7428
7f313d07
BC
7429Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7430
7431 * configure.srv: Add xscale*linux copy of arm*linux entry.
7432
3b2fc2ea
DJ
74332003-07-24 Daniel Jacobowitz <drow@mvista.com>
7434
7435 * linux-arm-low.c (arm_reinsert_addr): New function.
7436 (the_low_target): Add arm_reinsert_addr.
7437
1c0a559e
MK
74382003-07-08 Mark Kettenis <kettenis@gnu.org>
7439
7440 * mem-break.c: Remove whitespace at end of file.
7441
43d5792c
DJ
74422003-06-28 Daniel Jacobowitz <drow@mvista.com>
7443
7444 * configure.in: Check whether we need to prototype strerror.
7445 * server.h: Optionally prototype strerror.
7446 * gdbreplay.c (perror_with_name): Use strerror.
7447 * linux-low.c (linux_attach_lwp): Use strerror.
7448 * utils.c (perror_with_name): Use strerror.
7449 * config.in, configure: Regenerated.
7450
c8a86edf
DJ
74512003-06-28 Daniel Jacobowitz <drow@mvista.com>
7452
7453 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7454 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7455
73d37363
DJ
74562003-06-20 Daniel Jacobowitz <drow@mvista.com>
7457
7458 * Makefile.in (SFILES): Update.
7459 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7460 low-sun3.c: Remove files.
7461
6ad8ae5c
DJ
74622003-06-17 Daniel Jacobowitz <drow@mvista.com>
7463
7464 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7465 (linux_detach_one_process, linux_detach): New functions.
7466 (linux_target_ops): Add linux_detach.
7467 * server.c (main): Handle 'D' packet.
7468 * target.h (struct target_ops): Add "detach" member.
7469 (detach_inferior): Define.
7470
1581182a
MK
74712003-06-13 Mark Kettenis <kettenis@gnu.org>
7472
7473 From Kelley Cook <kelleycook@wideopenwest.com>:
7474 * configure.srv: Accept i[34567]86 variants.
7475
e5379b03
DJ
74762003-06-05 Daniel Jacobowitz <drow@mvista.com>
7477
7478 * linux-low.c (linux_wait_for_event): Correct comment typos.
7479 (linux_resume_one_process): Call check_removed_breakpoint.
7480 (linux_send_signal): New function.
7481 (linux_target_ops): Add linux_send_signal.
7482 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7483 of kill.
7484 * target.h (struct target_ops): Add send_signal.
7485
2ff29de4
JB
74862003-05-29 Jim Blandy <jimb@redhat.com>
7487
7488 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7489 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7490 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7491 away part of the register's value.
7492
254787d4
DJ
74932003-03-26 Daniel Jacobowitz <drow@mvista.com>
7494
7495 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7496 (linux_wait_for_event, linux_init_signals): Likewise.
7497
94e10508
DJ
74982003-03-17 Daniel Jacobowitz <drow@mvista.com>
7499
7500 * configure.in: Check for stdlib.h.
7501 * configure: Regenerated.
7502 * config.in: Regenerated.
7503
4c0711e0
DJ
75042003-01-04 Andreas Schwab <schwab@suse.de>
7505
7506 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7507
ef66e766
AC
75082003-01-02 Andrew Cagney <ac131313@redhat.com>
7509
7510 * Makefile.in: Remove obsolete code.
7511
a1358604
DJ
75122002-11-20 Daniel Jacobowitz <drow@mvista.com>
7513
7514 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7515 defined(PT_FPR0_HI).
7516
23ce3b1c
DJ
75172002-11-17 Stuart Hughes <seh@zee2.com>
7518
7519 * linux-arm-low.c (arm_num_regs): Increase.
7520 (arm_regmap): Include status register.
7521
75222002-11-17 Daniel Jacobowitz <drow@mvista.com>
7523
7524 * linux-low.c (register_addr): Remove incorrect -1 check.
7525
a9fa9f7d
DJ
75262002-08-29 Daniel Jacobowitz <drow@mvista.com>
7527
7528 * linux-low.c (linux_create_inferior): Call setpgid. Return
7529 the new PID.
7530 (unstopped_p, linux_signal_pid): Remove.
7531 (linux_target_ops): Remove linux_signal_pid.
7532 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7533 global instead of target method.
7534 * target.h (struct target_ops): Remove signal_pid. Update comment
7535 for create_inferior.
7536 * server.c (signal_pid): New variable.
7537 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 7538 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
7539 (attach_inferior): Set signal_pid.
7540
17574093
DJ
75412002-08-23 Daniel Jacobowitz <drow@mvista.com>
7542
7543 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7544
75452002-08-20 Jim Blandy <jimb@redhat.com>
7546
7547 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7548 default for this.
7549
75502002-08-01 Andrew Cagney <cagney@redhat.com>
7551
7552 * Makefile.in: Make chill references obsolete.
7553
75542002-07-24 Kevin Buettner <kevinb@redhat.com>
7555
7556 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7557 * configure: Regenerate.
7558 * config.in: Regenerate.
7559
75602002-07-09 David O'Brien <obrien@FreeBSD.org>
7561
7562 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7563 (perror_with_name, remote_close, remote_open, expect, play): Static.
7564
75652002-07-04 Michal Ludvig <mludvig@suse.cz>
7566
4b8dad4a 7567 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
7568 byte offsets instead of an array of indexes.
7569 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7570
75712002-06-13 Daniel Jacobowitz <drow@mvista.com>
7572
7573 * regcache.c: Add comment.
7574
75752002-06-11 Daniel Jacobowitz <drow@mvista.com>
7576
7577 * thread-db.c: New file.
7578 * proc-service.c: New file.
7579 * acinclude.m4: New file.
7580 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7581 proc-service.o, and thread-db.o.
7582 (linux-low.o): Add USE_THREAD_DB.
7583 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7584 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7585 * aclocal.m4: Regenerated.
7586 * config.in: Regenerated.
7587 * configure: Regenerated.
7588 * configure.in: Check for proc_service.h, sys/procfs.h,
7589 thread_db.h, and linux/elf.h headrs.
7590 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7591 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7592 Check for -lthread_db and thread support.
7593 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7594 PowerPC, and SuperH.
7595 * i387-fp.c: Constify arguments.
7596 * i387-fp.h: Likewise.
7597 * inferiors.c: (struct thread_info): Renamed from
7598 `struct inferior_info'. Remove PID member. Use generic inferior
7599 list header. All uses updated.
7600 (inferiors, signal_pid): Removed.
7601 (all_threads): New variable.
7602 (get_thread): Define.
7603 (add_inferior_to_list): New function.
7604 (for_each_inferior): New function.
7605 (change_inferior_id): New function.
7606 (add_inferior): Removed.
7607 (remove_inferior): New function.
7608 (add_thread): New function.
7609 (free_one_thread): New function.
7610 (remove_thread): New function.
7611 (clear_inferiors): Use for_each_inferior and free_one_thread.
7612 (find_inferior): New function.
7613 (find_inferior_id): New function.
7614 (inferior_target_data): Update argument type.
7615 (set_inferior_target_data): Likewise.
7616 (inferior_regcache_data): Likewise.
7617 (set_inferior_regcache_data): Likewise.
7618 * linux-low.c (linux_bp_reinsert): Remove.
7619 (all_processes, stopping_threads, using_thrads)
7620 (struct pending_signals, debug_threads, pid_of): New.
7621 (inferior_pid): Replace with macro.
7622 (struct inferior_linux_data): Remove.
7623 (get_stop_pc, add_process): New functions.
7624 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7625 Use add_process and add_thread.
7626 (linux_attach_lwp): New function, based on old linux_attach. Use
7627 add_process and add_thread. Set stop_expected for new threads.
7628 (linux_attach): New function.
7629 (linux_kill_one_process): New function.
7630 (linux_kill): Kill all LWPs.
7631 (linux_thread_alive): Use find_inferior_id.
7632 (check_removed_breakpoints, status_pending_p): New functions.
7633 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7634 Update. Use WNOHANG. Wait for cloned processes also. Update process
7635 struct for the found process.
7636 (linux_wait_for_event): New function.
7637 (linux_wait): Use it. Support LWPs.
7638 (send_sigstop, wait_for_sigstop, stop_all_processes)
7639 (linux_resume_one_process, linux_continue_one_process): New functions.
7640 (linux_resume): Support LWPs.
7641 (REGISTER_RAW_SIZE): Remove.
7642 (fetch_register): Use register_size instead. Call supply_register.
7643 (usr_store_inferior_registers): Likewise. Call collect_register.
7644 Fix recursive case.
7645 (regsets_fetch_inferior_registers): Improve error message.
7646 (regsets_store_inferior_registers): Add debugging.
7647 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7648 (unstopped_p, linux_signal_pid): New functions.
7649 (linux_target_ops): Add linux_signal_pid.
7650 (linux_init_signals): New function.
7651 (initialize_low): Call it. Initialize using_threads.
7652 * regcache.c (inferior_regcache_data): Add valid
7653 flag.
7654 (get_regcache): Fetch registers lazily. Add fetch argument
7655 and update all callers.
7656 (regcache_invalidate_one, regcache_invalidate): New
7657 functions.
7658 (new_register_cache): Renamed from create_register_cache.
7659 Return the new regcache.
7660 (free_register_cache): Change argument to a void *.
7661 (registers_to_string, registers_from_string): Call get_regcache
7662 with fetch flag set.
7663 (register_data): Make static. Pass fetch flag to get_regcache.
7664 (supply_register): Call get_regcache with fetch flag clear.
7665 (collect_register): Call get_regcache with fetch flag set.
7666 (collect_register_as_string): New function.
7667 * regcache.h: Update.
7668 * remote-utils.c (putpkt): Flush after debug output and use
7669 stderr.
7670 Handle input interrupts while waiting for an ACK.
7671 (input_interrupt): Use signal_pid method.
7672 (getpkt): Flush after debug output and use stderr.
7673 (outreg): Use collect_register_as_string.
7674 (new_thread_notify, dead_thread_notify): New functions.
7675 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7676 and general_thread.
7677 (look_up_one_symbol): Flush after debug output.
7678 * server.c (step_thread, server_waiting): New variables.
7679 (start_inferior): Don't use signal_pid. Update call to mywait.
7680 (attach_inferior): Update call to mywait.
7681 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7682 (main): Don't fetch/store registers explicitly. Use
7683 set_desired_inferior. Support proposed ``Hs'' packet. Update
7684 calls to mywait.
7685 * server.h: Update.
7686 (struct inferior_list, struct_inferior_list_entry): New.
7687 * target.c (set_desired_inferior): New.
7688 (write_inferior_memory): Constify.
7689 (mywait): New function.
7690 * target.h: Update.
7691 (struct target_ops): New signal_pid method.
7692 (mywait): Removed macro, added prototype.
7693
7694 * linux-low.h (regset_func): Removed.
7695 (regset_fill_func, regset_store_func): New.
7696 (enum regset_type): New.
7697 (struct regset_info): Add type field. Use new operation types.
7698 (struct linux_target_ops): stop_pc renamed to get_pc.
7699 Add decr_pc_after_break and breakpoint_at.
7700 (get_process, get_thread_proess, get_process_thread)
7701 (strut process_info, all_processes, linux_attach_lwp)
7702 (thread_db_init): New.
7703
7704 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7705 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7706 (the_low_target): Add new members.
7707 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7708 (i386_store_fpxregset): Constify.
7709 (target_regsets): Add new kind identifier.
7710 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7711 (i386_set_pc): Add debugging.
7712 (i386_breakpoint_at): New function.
7713 (the_low_target): Add new members.
7714 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7715 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7716 (mips_breakpoint_at): New.
7717 (the_low_target): Add new members.
7718 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7719 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7720 (the_low_target): Add new members.
7721 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7722 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7723 (the_low_target): Add new members.
7724 * linux-x86-64-low.c (target_regsets): Add new kind
7725 identifier.
7726
77272002-05-15 Daniel Jacobowitz <drow@mvista.com>
7728
7729 From Martin Pool <mbp@samba.org>:
7730 * server.c (gdbserver_usage): New function.
7731 (main): Call it.
7732
77332002-05-14 Daniel Jacobowitz <drow@mvista.com>
7734
7735 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7736 stop_at -> stop_pc.
7737
77382002-05-04 Andrew Cagney <ac131313@redhat.com>
7739
7740 * Makefile.in: Remove obsolete code.
7741
77422002-04-24 Michal Ludvig <mludvig@suse.cz>
7743
7744 * linux-low.c (regsets_fetch_inferior_registers),
7745 (regsets_store_inferior_registers): Removed cast to int from
7746 ptrace() calls.
7747 * regcache.h: Added declaration of struct inferior_info.
7748
77492002-04-20 Daniel Jacobowitz <drow@mvista.com>
7750
7751 * inferiors.c (struct inferior_info): Add regcache_data.
7752 (add_inferior): Call create_register_cache.
7753 (clear_inferiors): Call free_register_cache.
7754 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7755 * regcache.c (struct inferior_regcache_data): New.
7756 (registers): Remove.
7757 (get_regcache): New function.
7758 (create_register_cache, free_register_cache): New functions.
7759 (set_register_cache): Don't initialize the register cache here.
7760 (registers_to_string, registers_from_string, register_data): Call
7761 get_regcache.
7762 * regcache.h: Add prototypes.
7763 * server.h: Likewise.
7764
77652002-04-20 Daniel Jacobowitz <drow@mvista.com>
7766
7767 * mem-break.c: New file.
7768 * mem-break.h: New file.
7769 * Makefile.in: Add mem-break.o rule; update server.h
7770 dependencies.
7771 * inferiors.c (struct inferior_info): Add target_data
7772 member.
7773 (clear_inferiors): Free target_data member if set.
7774 (inferior_target_data, set_inferior_target_data): New functions.
7775 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7776 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7777 * linux-low.c (linux_bp_reinsert): New variable.
7778 (struct inferior_linux_data): New.
7779 (linux_create_inferior): Use set_inferior_target_data.
7780 (linux_attach): Likewise. Call add_inferior.
7781 (linux_wait_for_one_inferior): New function.
7782 (linux_wait): Call it.
7783 (linux_write_memory): Add const.
7784 (initialize_low): Call set_breakpoint_data.
7785 * linux-low.h (struct linux_target_ops): Add breakpoint
7786 handling members.
7787 * server.c (attach_inferior): Remove extra add_inferior
7788 call.
7789 * server.h: Include mem-break.h. Update inferior.c
7790 prototypes.
7791 * target.c (read_inferior_memory)
7792 (write_inferior_memory): New functions.
7793 * target.h (read_inferior_memory)
7794 (write_inferior_memory): Change macros to prototypes.
7795 (struct target_ops): Update comments. Add const to write_memory
7796 definition.
7797
77982002-04-11 Daniel Jacobowitz <drow@mvista.com>
7799
7800 * linux-low.c (usr_store_inferior_registers): Support
7801 registers which are allowed to fail to store.
7802 * linux-low.h (linux_target_ops): Likewise.
7803 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7804 (ppc_cannot_store_register): FPSCR may not be storable.
7805
78062002-04-09 Daniel Jacobowitz <drow@mvista.com>
7807
7808 * server.h: Include <string.h> if HAVE_STRING_H.
7809 * ChangeLog: Correct paths in last ChangeLog entry.
7810
78112002-04-09 Daniel Jacobowitz <drow@mvista.com>
7812
7813 * linux-low.h: Remove obsolete prototypes.
7814 (struct linux_target_ops): New.
7815 (extern the_low_target): New.
7816 * linux-low.c (num_regs, regmap): Remove declarations.
7817 (register_addr): Use the_low_target explicitly.
7818 (fetch_register): Likewise.
7819 (usr_fetch_inferior_registers): Likewise.
7820 (usr_store_inferior_registers): Likewise.
7821 * linux-arm-low.c (num_regs): Remove.
7822 (arm_num_regs): Define.
7823 (arm_regmap): Renamed from regmap, made static.
7824 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7825 made static.
7826 (arm_cannot_store_register): Renamed from cannot_store_register,
7827 made static.
7828 (the_low_target): New.
7829 * linux-i386-low.c (num_regs): Remove.
7830 (i386_num_regs): Define.
7831 (i386_regmap): Renamed from regmap, made static.
7832 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7833 made static.
7834 (i386_cannot_store_register): Renamed from cannot_store_register,
7835 made static.
7836 (the_low_target): New.
7837 * linux-ia64-low.c (num_regs): Remove.
7838 (ia64_num_regs): Define.
7839 (ia64_regmap): Renamed from regmap, made static.
7840 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7841 made static.
7842 (ia64_cannot_store_register): Renamed from cannot_store_register,
7843 made static.
7844 (the_low_target): New.
7845 * linux-m68k-low.c (num_regs): Remove.
7846 (m68k_num_regs): Define.
7847 (m68k_regmap): Renamed from regmap, made static.
7848 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7849 made static.
7850 (m68k_cannot_store_register): Renamed from cannot_store_register,
7851 made static.
7852 (the_low_target): New.
7853 * linux-mips-low.c (num_regs): Remove.
7854 (mips_num_regs): Define.
7855 (mips_regmap): Renamed from regmap, made static.
7856 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7857 made static.
7858 (mips_cannot_store_register): Renamed from cannot_store_register,
7859 made static.
7860 (the_low_target): New.
7861 * linux-ppc-low.c (num_regs): Remove.
7862 (ppc_num_regs): Define.
7863 (ppc_regmap): Renamed from regmap, made static.
7864 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7865 made static.
7866 (ppc_cannot_store_register): Renamed from cannot_store_register,
7867 made static.
7868 (the_low_target): New.
7869 * linux-s390-low.c (num_regs): Remove.
7870 (s390_num_regs): Define.
7871 (s390_regmap): Renamed from regmap, made static.
7872 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7873 made static.
7874 (s390_cannot_store_register): Renamed from cannot_store_register,
7875 made static.
7876 (the_low_target): New.
7877 * linux-sh-low.c (num_regs): Remove.
7878 (sh_num_regs): Define.
7879 (sh_regmap): Renamed from regmap, made static.
7880 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7881 made static.
7882 (sh_cannot_store_register): Renamed from cannot_store_register,
7883 made static.
7884 (the_low_target): New.
7885 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7886 (the_low_target): New.
7887
78882002-04-09 Daniel Jacobowitz <drow@mvista.com>
7889
7890 * Makefile.in: Add stamp-h target.
7891 * configure.in: Create stamp-h.
7892 * configure: Regenerated.
7893
78942002-04-09 Daniel Jacobowitz <drow@mvista.com>
7895
7896 * inferiors.c: New file.
7897 * target.c: New file.
7898 * target.h: New file.
7899 * Makefile.in: Add target.o and inferiors.o. Update
7900 dependencies.
7901 * linux-low.c (inferior_pid): New static variable,
7902 moved from server.c.
7903 (linux_create_inferior): Renamed from create_inferior.
7904 Call add_inferior. Return 0 on success instead of a PID.
7905 (linux_attach): Renamed from myattach.
7906 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7907 (linux_thread_alive): Renamed from mythread_alive.
7908 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7909 child dies.
7910 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7911 (regsets_store_inferior_registers): Correct error message.
7912 Add missing ``return 0''.
7913 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7914 (linux_store_registers): Renamed from store_inferior_registers.
7915 (linux_read_memory): Renamed from read_inferior_memory.
7916 (linux_write_memory): Renamed from write_inferior_memory.
7917 (linux_target_ops): New structure.
7918 (initialize_low): Call set_target_ops ().
7919 * remote-utils.c (unhexify): New function.
7920 (hexify): New function.
7921 (input_interrupt): Send signals to ``signal_pid''.
7922 * server.c (inferior_pid): Remove.
7923 (start_inferior): Update create_inferior call.
7924 (attach_inferior): Call add_inferior.
7925 (handle_query): New function.
7926 (main): Call handle_query for `q' packets.
7927 * server.h: Include "target.h". Remove obsolete prototypes.
7928 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7929
79302002-04-09 Daniel Jacobowitz <drow@mvista.com>
7931
7932 * Makefile.in: Add WARN_CFLAGS. Update configury
7933 dependencies.
7934 * configure.in: Check for <string.h>
7935 * configure: Regenerate.
7936 * config.in: Regenerate.
7937 * gdbreplay.c: Include needed system headers.
7938 (remote_open): Remove strchr prototype.
7939 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7940 * regcache.c (supply_register): Change buf argument to const void *.
7941 (supply_register_by_name): Likewise.
7942 (collect_register): Change buf argument to void *.
7943 (collect_register_by_name): Likewise.
7944 * regcache.h: Add missing prototypes.
7945 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7946 * server.c (handle_query): New function.
7947 (attached): New static variable, moved out of main.
7948 (main): Quiet longjmp clobber warnings.
7949 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7950 * utils.c (error): Remove NORETURN.
7951 (fatal): Likewise.