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