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