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