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