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