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