libthread_db: Skip attaching to terminated and joined threads
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a33e3959
PA
12015-01-09 Pedro Alves <palves@redhat.com>
2
3 * thread-db.c (find_new_threads_callback): Ignore thread if the
4 kernel thread ID is -1.
5
8784d563
PA
62015-01-09 Pedro Alves <palves@redhat.com>
7
8 * linux-low.c (linux_attach_fail_reason_string): Move to
9 nat/linux-ptrace.c, and rename.
10 (linux_attach_lwp): Update comment.
11 (attach_proc_task_lwp_callback): New function.
12 (linux_attach): Adjust to rename and use
13 linux_proc_attach_tgid_threads.
14 (linux_attach_fail_reason_string): Delete declaration.
15
76f2b779
JB
162015-01-01 Joel Brobecker <brobecker@adacore.com>
17
18 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
19 * server.c (gdbserver_version): Likewise.
20
fafcc06a
SDJ
212014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
22
23 * remote-utils.c: Include ctype.h.
24 (input_interrupt): Explicitly handle the case when the char
25 received is the NUL byte. Improve the printing of non-ASCII
26 characters.
27
beed38b8
JB
282014-12-16 Joel Brobecker <brobecker@adacore.com>
29
30 * linux-low.c (linux_low_filter_event): Update call to
31 linux_enable_event_reporting following the addition of
32 a new parameter to that function.
33
bf330350
CU
342014-12-16 Catalin Udma <catalin.udma@freescale.com>
35
36 PR server/17457
37 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
38 (AARCH64_FPCR_REGNO): Likewise.
39 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
40 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
41 (aarch64_store_fpregset): Likewise.
42
5227d625
JB
432014-12-15 Joel Brobecker <brobecker@adacore.com>
44
45 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
46 Remove FIXME comment about assumption about N.
47
f93b65a0
JB
482014-12-13 Joel Brobecker <brobecker@adacore.com>
49
50 * configure.ac: If large-file support is disabled in GDBserver,
51 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
52 * configure: Regenerate.
53
e5a9158d
AA
542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
55
56 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
57 warning upon ENODATA from ptrace.
58 * linux-s390-low.c (s390_store_tdb): New.
59 (s390_regsets): Add regset for NT_S390_TDB.
60
feea5f36
AA
612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
62
63 * linux-low.c (regsets_store_inferior_registers): Skip regsets
64 without a fill_function.
65 * linux-s390-low.c (s390_fill_last_break): Remove.
66 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
67 (s390_arch_setup): Use regset's size instead of fill_function for
68 loop end condition.
69
098dbe61
AA
702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
71
72 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
73 the regset's store function when ptrace returned an error.
74 * regcache.c (get_thread_regcache): Invalidate register cache
75 before fetching inferior's registers.
76
28eef672
AA
772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
78
79 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
80 while-loop as for-loop.
81 (regsets_store_inferior_registers): Likewise.
82
bdca27a2
YQ
832014-11-28 Yao Qi <yao@codesourcery.com>
84
85 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
86 * config.in, configure: Re-generate.
87 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
88 is defined.
89
9c232dda
YQ
902014-11-21 Yao Qi <yao@codesourcery.com>
91
92 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
93 (AC_CHECK_HEADERS): Remove malloc.h.
94 * configure: Re-generated.
95 * config.in: Re-generated.
96 * server.h: Don't include alloca.h and malloc.h.
97 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
98 Don't include malloc.h.
99
43968415
JB
1002014-11-17 Joel Brobecker <brobecker@adacore.com>
101
102 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
103 corresponding ERRNO check in same block.
104
40e91bc7
PA
1052014-11-12 Pedro Alves <palves@redhat.com>
106
107 * server.c (cont_thread): Update comment.
108 (start_inferior, attach_inferior): No longer clear cont_thread.
109 (handle_v_cont): No longer set cont_thread.
110 (captured_main): Clear cont_thread each time a GDB connects.
111
c2c118cf
PA
1122014-11-12 Pedro Alves <palves@redhat.com>
113
114 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
115 thread, and don't resume all threads if the Hc thread has exited.
116
78708b7c
PA
1172014-11-12 Pedro Alves <palves@redhat.com>
118
119 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
120 the process group instead of to a specific LWP.
121
a2abc7de
PA
1222014-10-15 Pedro Alves <palves@redhat.com>
123
124 PR server/17487
125 * win32-arm-low.c (arm_set_thread_context): Remove current_event
126 parameter.
127 (arm_set_thread_context): Delete.
128 (the_low_target): Adjust.
129 * win32-i386-low.c (debug_registers_changed)
130 (debug_registers_used): Delete.
131 (update_debug_registers_callback): New function.
132 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
133 needing to update their debug registers.
134 (win32_get_current_dr): New function.
135 (x86_dr_low_get_addr, x86_dr_low_get_control)
136 (x86_dr_low_get_status): Fetch the debug register from the thread
137 record's context.
138 (i386_initial_stuff): Adjust.
139 (i386_get_thread_context): Remove current_event parameter. Don't
140 clear debug_registers_changed nor copy DR values to
141 debug_reg_state.
142 (i386_set_thread_context): Delete.
143 (i386_prepare_to_resume): New function.
144 (i386_thread_added): Mark the thread as needing to update irs
145 debug registers.
146 (the_low_target): Remove i386_set_thread_context and install
147 i386_prepare_to_resume.
148 * win32-low.c (win32_get_thread_context): Adjust.
149 (win32_set_thread_context): Use SetThreadContext
150 directly.
151 (win32_prepare_to_resume): New function.
152 (win32_require_context): New function, factored out from ...
153 (thread_rec): ... this.
154 (continue_one_thread): Call win32_prepare_to_resume on each thread
155 we're about to continue.
156 (win32_resume): Call win32_prepare_to_resume on the event thread.
157 * win32-low.h (struct win32_thread_info)
158 <debug_registers_changed>: New field.
159 (struct win32_target_ops): Change prototype of set_thread_context,
160 delete set_thread_context and add prepare_to_resume.
161 (win32_require_context): New declaration.
162
a442d071
GB
1632014-10-08 Gary Benson <gbenson@redhat.com>
164
165 * server.h: Do not include common-exceptions.h.
166
6f1947e8
GB
1672014-10-08 Gary Benson <gbenson@redhat.com>
168
169 * server.h: Do not include cleanups.h.
170
63b434a4
JH
1712014-09-30 James Hogan <james.hogan@imgtec.com>
172
173 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
174 mips64-dsp-linux.c.
175
c4d9ceb6
YQ
1762014-09-23 Yao Qi <yao@codesourcery.com>
177
178 * linux-low.c (lp_status_maybe_breakpoint): New function.
179 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
180 (count_events_callback): Likewise.
181 (select_event_lwp_callback): Likewise.
182 (cancel_breakpoints_callback): Likewise.
183
89a5711c
DB
1842014-09-19 Don Breazeal <donb@codesourcery.com>
185
186 * linux-low.c (handle_extended_wait): Call
187 linux_ptrace_get_extended_event.
188 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
189 linux_is_extended_waitstatus.
190
bffc0964
JB
1912014-09-16 Joel Brobecker <brobecker@adacore.com>
192
193 * Makefile.in (CPPFLAGS): Define.
194 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
195 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
196
0bfdf32f
GB
1972014-09-16 Gary Benson <gbenson@redhat.com>
198
199 * inferiors.h (current_inferior): Renamed as...
200 (current_thread): New variable. All uses updated.
201 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
202 (maybe_move_out_of_jump_pad): Likewise.
203 (cancel_breakpoint): Likewise.
204 (linux_low_filter_event): Likewise.
205 (wait_for_sigstop): Likewise.
206 (linux_resume_one_lwp): Likewise.
207 (need_step_over_p): Likewise.
208 (start_step_over): Likewise.
209 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
210 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
211 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
212 and save_inferior as saved_thread.
213 * regcache.c (get_thread_regcache): Renamed saved_inferior as
214 saved_thread.
215 (regcache_invalidate_thread): Likewise.
216 * remote-utils.c (prepare_resume_reply): Likewise.
217 * thread-db.c (thread_db_get_tls_address): Likewise.
218 (disable_thread_event_reporting): Likewise.
219 (remove_thread_event_breakpoints): Likewise.
220 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
221 as saved_thread.
222 * target.h (set_desired_inferior): Renamed as...
223 (set_desired_thread): New declaration. All uses updated.
224 * server.c (myresume): Updated comment to reference thread instead
225 of inferior.
226 (handle_serial_event): Likewise.
227 (handle_target_event): Likewise.
228
361c8ade
GB
2292014-09-12 Tom Tromey <tromey@redhat.com>
230 Gary Benson <gbenson@redhat.com>
231
232 * regcache.h: Include common-regcache.h.
233 (regcache_read_pc): Don't declare.
234 * regcache.c (get_thread_regcache_for_ptid): New function.
235
bd9269f7
GB
2362014-09-11 Tom Tromey <tromey@redhat.com>
237 Gary Benson <gbenson@redhat.com>
238
239 * symbol.c: New file.
240 * Makefile.in (SFILES): Add symbol.c.
241 (OBS): Add symbol.o.
242
f8c1d06b
GB
2432014-09-11 Gary Benson <gbenson@redhat.com>
244
245 * target.c (target_stop_ptid, target_continue_ptid): New
246 functions.
247
721ec300
GB
2482014-09-11 Tom Tromey <tromey@redhat.com>
249 Gary Benson <gbenson@redhat.com>
250
251 * target.h: Include target/target.h.
252 * target.c (target_read_memory, target_read_uint32)
253 (target_write_memory): New functions.
254
c5e92cca
GB
2552014-09-11 Gary Benson <gbenson@redhat.com>
256
257 * server.h (debug_hw_points): Don't declare.
258 * server.c (debug_hw_points): Don't define. Replace all uses
259 with show_debug_regs.
260 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
261 all uses with show_debug_regs.
262
2e4bb98a
EBM
2632014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
264
265 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
266 endianness into account.
267 (ppc_supply_ptrace_register): Likewise.
268
ac740bc7
JH
2692014-09-03 James Hogan <james.hogan@imgtec.com>
270
271 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
272 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
273
97ea6506
GB
2742014-09-03 Gary Benson <gbenson@redhat.com>
275
276 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
277 ALL_DEBUG_ADDRESS_REGISTERS.
278
df7e5265
GB
2792014-09-02 Gary Benson <gbenson@redhat.com>
280
281 * i386-low.h: Renamed as...
282 * x86-low.h: New file. All type, function and variable name
283 prefixes changed from "i386_" to "x86_". All references updated.
284 * i386-low.c: Renamed as...
285 * x86-low.c: New file. All type, function and variable name
286 prefixes changed from "i386_" to "x86_". All references updated.
287
ed859da7
GB
2882014-09-02 Gary Benson <gbenson@redhat.com>
289
290 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
291 (x86_linux_new_thread): Likewise.
292
860789c7
GB
2932014-08-29 Gary Benson <gbenson@redhat.com>
294
295 * server.h (setjmp.h): Do not include.
296 (toplevel): Do not declare.
297 (common-exceptions.h): Include.
298 (cleanups.h): Likewise.
299 * server.c (toplevel): Do not define.
300 (exit_code): New static global.
301 (detach_or_kill_for_exit_cleanup): New function.
302 (main): New function. Original main renamed to...
303 (captured_main): New function.
304 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
305
ff55e1b5
GB
3062014-08-29 Gary Benson <gbenson@redhat.com>
307
308 * Makefile.in (SFILES): Add common/common-exceptions.c.
309 (OBS): Add common-exceptions.o.
310 (common-exceptions.o): New rule.
311 * utils.c (prepare_to_throw_exception): New function.
312
e9bcb658
GB
3132014-08-29 Gary Benson <gbenson@redhat.com>
314
315 * config.in: Regenerate.
316 * configure: Likewise.
317
e3180625
GB
3182014-08-29 Gary Benson <gbenson@redhat.com>
319
320 * Makefile.in (SFILES): Add common/cleanups.c.
321 (OBS): cleanups.o.
322 (cleanups.o): New rule.
323
e3d6ba5d
GB
3242014-08-29 Gary Benson <gbenson@redhat.com>
325
326 * utils.c (internal_vwarning): New function.
327
7096e886
GB
3282014-08-28 Gary Benson <gbenson@redhat.com>
329
330 * utils.h (fatal): Remove declaration.
331 * utils.c (fatal): Remove function.
332
14ce3192
GB
3332014-08-28 Gary Benson <gbenson@redhat.com>
334
335 * tracepoint.c (gdb_agent_init): Replace fatal with
336 perror_with_name.
337 (initialize_tracepoint): Likewise.
338
50278d59
GB
3392014-08-28 Gary Benson <gbenson@redhat.com>
340
341 * remote-utils.c (remote_prepare): Replace fatal with error.
342
aa96c426
GB
3432014-08-28 Gary Benson <gbenson@redhat.com>
344
345 * linux-low.c (linux_async): Replace fatal with warning.
346 Tidy up and return.
347 (linux_start_non_stop): Return -1 if linux_async failed.
348
f7160e97
GB
3492014-08-28 Gary Benson <gbenson@redhat.com>
350
351 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
352 gdb_assert.
353 (i386_dr_low_get_addr): Remove vague comment.
354 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
355 gdb_assert.
356
38e08fca
GB
3572014-08-28 Gary Benson <gbenson@redhat.com>
358
359 * inferiors.c (get_thread_process): Replace check with gdb_assert.
360 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
361 internal_error.
362 (linux_resume_one_lwp): Likewise.
363 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
364 gdb_assert.
365 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
366 with internal_error.
367 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
368 (init_register_cache): Replace fatal with gdb_assert_not_reached.
369 (find_register_by_name): Replace fatal with internal_error.
370 (find_regno): Likewise.
371 * tdesc.c (init_target_desc): Replace check with gdb_assert.
372 * thread-db.c (thread_db_create_event): Likewise.
373 (thread_db_load_search): Likewise.
374 (try_thread_db_load_1): Likewise.
375 * tracepoint.c (get_jump_space_head): Replace fatal with
376 internal_error.
377 (claim_trampoline_space): Likewise.
378 (have_fast_tracepoint_trampoline_buffer): Likewise.
379 (cmd_qtstart): Likewise.
380 (stop_tracing): Likewise.
381 (fast_tracepoint_collecting): Likewise.
382 (target_malloc): Likewise.
383 (download_tracepoint): Likewise.
384 (download_trace_state_variables): Replace check with gdb_assert.
385 (upload_fast_traceframes): Replace fatal with internal_error.
386
34abf635
GB
3872014-08-19 Tom Tromey <tromey@redhat.com>
388 Gary Benson <gbenson@redhat.com>
389
390 * Makefile.in (SFILES): Add common/common-debug.c.
391 (OBS): Add common-debug.o.
392 (common-debug.o): New rule.
393 * debug.h (debug_printf): Don't declare.
394 * debug.c (debug_printf): Renamed and rewritten as...
395 (debug_vprintf): New function.
396
f6e94d78
GB
3972014-08-19 Gary Benson <gbenson@redhat.com>
398
399 * utils.h: Do not include print-utils.h.
400
9239eeab
GB
4012014-08-19 Tom Tromey <tromey@redhat.com>
402 Gary Benson <gbenson@redhat.com>
403
404 * server.h: Add static assertion.
405 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
406
ef87c8bb
GB
4072014-08-19 Tom Tromey <tromey@redhat.com>
408 Gary Benson <gbenson@redhat.com>
409
410 * Makefile.in (SFILES): Add common/errors.c.
411 (OBS): Add errors.o.
412 (IPA_OBS): Add errors-ipa.o.
413 (errors.o): New rule.
414 (errors-ipa.o): Likewise.
415 * utils.h (perror_with_name, error, warning): Don't declare.
416 * utils.c (warning): Renamed and rewritten as...
417 (vwarning): New function.
418 (error): Renamed and rewritten as...
419 (verror): New function.
420 (internal_error): Renamed and rewritten as...
421 (internal_verror): New function.
422
bb974a24
GB
4232014-08-07 Gary Benson <gbenson@redhat.com>
424
425 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
426 * configure: Regenerate.
427 * config.in: Likewise.
428 * server.h: Do not include errno.h.
429 * event-loop.c: Likewise.
430 * hostio-errno.c: Likewise.
431 * linux-low.c: Likewise.
432 * remote-utils.c: Likewise.
433 * spu-low.c: Likewise.
434 * utils.c: Likewise.
435 * gdbreplay.c: Unconditionally include errno.h.
436
6d3d12eb
GB
4372014-08-07 Gary Benson <gbenson@redhat.com>
438
439 * server.h: Do not include string.h.
440 * event-loop.c: Likewise.
441 * linux-low.c: Likewise.
442 * regcache.c: Likewise.
443 * remote-utils.c: Likewise.
444 * spu-low.c: Likewise.
445 * utils.c: Likewise.
446
dccbb609
GB
4472014-08-07 Gary Benson <gbenson@redhat.com>
448
449 * server.h: Do not include gdb_assert.h.
450
e76df0d0
GB
4512014-08-07 Gary Benson <gbenson@redhat.com>
452
453 * server.h: Do not include common-utils.h.
454
4cb9c816
GB
4552014-08-07 Gary Benson <gbenson@redhat.com>
456
457 * server.h: Do not include ptid.h.
458 * notif.h: Likewise.
459
3995eeee
GB
4602014-08-07 Gary Benson <gbenson@redhat.com>
461
462 * server.h: Do not include gdb_locale.h.
463
cb9f1a9b
GB
4642014-08-07 Gary Benson <gbenson@redhat.com>
465
466 * server.h: Do not include gdb/signals.h.
467 * win32-low.c: Likewise.
468
a5fceff8
GB
4692014-08-07 Gary Benson <gbenson@redhat.com>
470
471 * server.h: Do not include pathmax.h.
472
b9391142
GB
4732014-08-07 Gary Benson <gbenson@redhat.com>
474
475 * server.h: Do not include libiberty.h.
476 * linux-bfin-low.c: Likewise.
477
0e443c87
GB
4782014-08-07 Gary Benson <gbenson@redhat.com>
479
480 * server.h: Do not include ansidecl.h.
481
8ebb3f56
GB
4822014-08-07 Gary Benson <gbenson@redhat.com>
483
484 * linux-x86-low.c: Do not include stddef.h.
485 * lynx-ppc-low.c: Likewise.
486 * tracepoint.c: Likewise.
487
8980bdf6
GB
4882014-08-07 Gary Benson <gbenson@redhat.com>
489
490 * server.h: Do not include stdarg.h.
491 * nto-low.c: Likewise.
492
d7096f71
GB
4932014-08-07 Gary Benson <gbenson@redhat.com>
494
495 * server.h: Do not include stdlib.h.
496 * inferiors.c: Likewise.
497 * linux-low.c: Likewise.
498 * regcache.c: Likewise.
499 * spu-low.c: Likewise.
500 * tracepoint.c: Likewise.
501 * utils.c: Likewise.
502
d02f550d
GB
5032014-08-07 Gary Benson <gbenson@redhat.com>
504
505 * server.h: Do not include stdio.h.
506 * linux-low.c: Likewise.
507 * remote-utils.c: Likewise.
508 * spu-low.c: Likewise.
509 * utils.c: Likewise.
510 * wincecompat.c: Likewise.
511
87f6c4e3
GB
5122014-08-06 Gary Benson <gbenson@redhat.com>
513
514 * regcache.c (init_register_cache): Move conditionals inside if.
515
7089dca4
GB
5162014-08-06 Gary Benson <gbenson@redhat.com>
517
518 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
519
462f517e
GB
5202014-07-31 Gary Benson <gbenson@redhat.com>
521
522 * ax.h: Do not include server.h.
523 * gdbthread.h: Likewise.
524 * lynx-low.h: Likewise.
525 * notif.h: Likewise.
526
976411d6
GB
5272014-07-30 Gary Benson <gbenson@redhat.com>
528
529 * server.h: Include common-defs.h.
530 Do not include config.h or build-gnulib-gdbserver/config.h.
531
d41f6d8e
GB
5322014-07-30 Gary Benson <gbenson@redhat.com>
533
534 * hostio-errno.c: Move server.h to top of includes list.
535 * inferiors.c: Likewise.
536 * linux-x86-low.c: Likewise.
537 * notif.c: Include server.h.
538
314c6a35
TT
5392014-07-24 Tom Tromey <tromey@redhat.com>
540 Gary Benson <gbenson@redhat.com>
541
542 * server.h (CORE_ADDR): Now unsigned.
543
69ff6be5
PA
5442014-07-16 Pedro Alves <palves@redhat.com>
545
546 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
547
ce9e3fe7
PA
5482014-07-15 Pedro Alves <palves@redhat.com>
549
550 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
551 copy.
552
e76126e8
PA
5532014-07-11 Pedro Alves <palves@redhat.com>
554
555 * linux-low.c (kill_wait_lwp): New function, based on
556 kill_one_lwp_callback, but use my_waitpid directly.
557 (kill_one_lwp_callback, linux_kill): Use it.
558
8e9db26e
PA
5592014-06-23 Pedro Alves <palves@redhat.com>
560
561 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
562 before setting DR0..DR3.
563
698b3e08
GB
5642014-06-20 Gary Benson <gbenson@redhat.com>
565
566 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
567 * configure: Regenerated.
568 * config.in: Likewise.
569
125f8a3d
GB
5702014-06-20 Gary Benson <gbenson@redhat.com>
571
572 * Makefile.in (SFILES): Update locations for files moved
573 from common to nat.
574 (object file files): Reordered.
575
42995dbd
GB
5762014-06-20 Gary Benson <gbenson@redhat.com>
577
578 * i386-low.h (i386_dr_low_can_set_addr): Removed.
579 (i386_dr_low_set_addr): Likewise.
580 (i386_dr_low_get_addr): Likewise.
581 (i386_dr_low_can_set_control): Likewise.
582 (i386_dr_low_set_control): Likewise.
583 (i386_dr_low_get_control): Likewise.
584 (i386_dr_low_get_status): Likewise.
585 (i386_get_debug_register_length): Likewise.
586 * linux-x86-low.c (i386_dr_low_set_addr):
587 Changed signature. Made static.
588 (i386_dr_low_get_addr): Likewise.
589 (i386_dr_low_set_control): Likewise.
590 (i386_dr_low_get_control): Likewise.
591 (i386_dr_low_get_status): Likewise.
592 (i386_dr_low): New global variable.
593 * win32-i386-low.c (i386_dr_low_set_addr):
594 Changed signature. Made static.
595 (i386_dr_low_get_addr): Likewise.
596 (i386_dr_low_set_control): Likewise.
597 (i386_dr_low_get_control): Likewise.
598 (i386_dr_low_get_status): Likewise.
599 (i386_dr_low): New global variable.
600
e1d2394b
MS
6012014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
602
603 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
604 * Makefile.in (AR, AR_FLAGS): Define.
605 * configure: Regenerate.
606
3a8ee006
GB
6072014-06-19 Gary Benson <gbenson@redhat.com>
608
609 * Makefile.in (i386-dregs.o): New rule.
610 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
611 * i386-low.c (target.h): Remove include.
612 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
613 (DR_CONTROL_SHIFT): Likewise.
614 (DR_CONTROL_SIZE): Likewise.
615 (DR_RW_EXECUTE): Likewise.
616 (DR_RW_WRITE): Likewise.
617 (DR_RW_READ): Likewise.
618 (DR_RW_IORW): Likewise.
619 (DR_LEN_1): Likewise.
620 (DR_LEN_2): Likewise.
621 (DR_LEN_4): Likewise.
622 (DR_LEN_8): Likewise.
623 (DR_LOCAL_ENABLE_SHIFT): Likewise.
624 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
625 (DR_ENABLE_SIZE): Likewise.
626 (DR_LOCAL_SLOWDOWN): Likewise.
627 (DR_GLOBAL_SLOWDOWN): Likewise.
628 (DR_CONTROL_RESERVED): Likewise.
629 (I386_DR_CONTROL_MASK): Likewise.
630 (I386_DR_VACANT): Likewise.
631 (I386_DR_LOCAL_ENABLE): Likewise.
632 (I386_DR_GLOBAL_ENABLE): Likewise.
633 (I386_DR_DISABLE): Likewise.
634 (I386_DR_SET_RW_LEN): Likewise.
635 (I386_DR_GET_RW_LEN): Likewise.
636 (I386_DR_WATCH_HIT): Likewise.
637 (i386_wp_op_t): Likewise.
638 (i386_show_dr): Likewise.
639 (i386_length_and_rw_bits): Likewise.
640 (i386_insert_aligned_watchpoint): Likewise.
641 (i386_remove_aligned_watchpoint): Likewise.
642 (i386_handle_nonaligned_watchpoint): Likewise.
643 i386_update_inferior_debug_regs(): Likewise.
644 (i386_dr_insert_watchpoint): Likewise.
645 (i386_dr_remove_watchpoint): Likewise.
646 (i386_dr_region_ok_for_watchpoint): Likewise.
647 (i386_dr_stopped_data_address): Likewise.
648 (i386_dr_stopped_by_watchpoint): Likewise.
649
8f26655c
GB
6502014-06-19 Gary Benson <gbenson@redhat.com>
651
652 * i386-low.c (i386_dr_show): Renamed to
653 i386_show_dr and made static. All uses updated.
654 (i386_dr_length_and_rw_bits): Renamed to
655 i386_length_and_rw_bits and made static.
656 All uses updated.
657 (i386_dr_insert_aligned_watchpoint): Renamed to
658 i386_insert_aligned_watchpoint and made static.
659 All uses updated.
660 (i386_dr_remove_aligned_watchpoint): Renamed to
661 i386_remove_aligned_watchpoint and made static.
662 All uses updated.
663 (i386_dr_update_inferior_debug_regs): Renamed to
664 i386_update_inferior_debug_regs and made static.
665 All uses updated.
666
b9228891
GB
6672014-06-18 Gary Benson <gbenson@redhat.com>
668
5171def3
GB
669 * i386-low.h (i386_dr_low_can_set_addr): New macro.
670 (i386_dr_low_can_set_control): Likewise.
671 (i386_get_debug_register_length): Likewise.
672 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
673 (i386_dr_low_can_set_control): Likewise.
674 (i386_get_debug_register_length): Likewise.
675
6762014-06-17 Gary Benson <gbenson@redhat.com>
677
b9228891
GB
678 * i386-low.h (i386-dregs.h): New include.
679 (DR_FIRSTADDR): Now in i386-dregs.h.
680 (DR_LASTADDR): Likewise.
681 (DR_NADDR): Likewise.
682 (DR_STATUS): Likewise.
683 (DR_CONTROL): Likewise.
684 (i386_debug_reg_state): Likewise.
685 (i386_dr_insert_watchpoint): Likewise.
686 (i386_dr_remove_watchpoint): Likewise.
687 (i386_dr_region_ok_for_watchpoint): Likewise.
688 (i386_dr_stopped_data_address): Likewise.
689 (i386_dr_stopped_by_watchpoint): Likewise.
690 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
691
4be83cc2
GB
6922014-06-18 Gary Benson <gbenson@redhat.com>
693
694 * i386-low.h (i386_low_insert_watchpoint): Renamed to
695 i386_dr_insert_watchpoint.
696 (i386_low_remove_watchpoint): Renamed to
697 i386_dr_remove_watchpoint.
698 (i386_low_region_ok_for_watchpoint): Renamed to
699 i386_dr_region_ok_for_watchpoint.
700 (i386_low_stopped_data_address): Renamed to
701 i386_dr_stopped_data_address.
702 (i386_low_stopped_by_watchpoint): Renamed to
703 i386_dr_stopped_by_watchpoint.
704 * i386-low.c (i386_show_dr): Renamed to
705 i386_dr_show and made nonstatic. All uses updated.
706 (i386_length_and_rw_bits): Renamed to
707 i386_dr_length_and_rw_bits and made nonstatic.
708 All uses updated.
709 (i386_insert_aligned_watchpoint): Renamed to
710 i386_dr_insert_aligned_watchpoint and made nonstatic.
711 All uses updated.
712 (i386_remove_aligned_watchpoint): Renamed to
713 i386_dr_remove_aligned_watchpoint and made nonstatic.
714 All uses updated.
715 (i386_update_inferior_debug_regs): Renamed to
716 i386_dr_update_inferior_debug_regs and made nonstatic.
717 All uses updated.
718 (i386_low_insert_watchpoint): Renamed to
719 i386_dr_insert_watchpoint. All uses updated.
720 (i386_low_remove_watchpoint): Renamed to
721 i386_dr_remove_watchpoint. All uses updated.
722 (i386_low_region_ok_for_watchpoint): Renamed to
723 i386_dr_region_ok_for_watchpoint. All uses updated.
724 (i386_low_stopped_data_address): Renamed to
725 i386_dr_stopped_data_address. All uses updated.
726 (i386_low_stopped_by_watchpoint): Renamed to
727 i386_dr_stopped_by_watchpoint. All uses updated.
728
131aa0d4
GB
7292014-06-18 Gary Benson <gbenson@redhat.com>
730
731 * i386-low.c (i386_dr_low_can_set_addr): New macro.
732 (i386_dr_low_can_set_control): Likewise.
733 (i386_insert_aligned_watchpoint): New check.
734
d9305f7f
GB
7352014-06-18 Gary Benson <gbenson@redhat.com>
736
737 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
738 Renamed to state.
739
e927c9fc
GB
7402014-06-18 Gary Benson <gbenson@redhat.com>
741
742 * i386-low.c (i386_length_and_rw_bits): Use internal_error
743 instead of fatal and error.
744 (i386_handle_nonaligned_watchpoint): Likewise.
745
1b6d4134
GB
7462014-06-18 Gary Benson <gbenson@redhat.com>
747
748 * i386-low.c (i386_get_debug_register_length): New macro.
749 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
750 (i386_show_dr): Use debug_printf instead of fprintf. Use
751 phex to format values.
752
6e62758f
GB
7532014-06-18 Gary Benson <gbenson@redhat.com>
754
755 * i386-low.h: Comment changes.
756 * i386-low.c: Likewise.
757
fc6e2f03
GB
7582014-06-18 Gary Benson <gbenson@redhat.com>
759
760 * i386-low.c: Whitespace changes.
761
f9d1eeed
TT
7622014-06-12 Tom Tromey <tromey@redhat.com>
763
764 * utils.c (freeargv): Remove.
765
0b04e523
TT
7662014-06-12 Tom Tromey <tromey@redhat.com>
767
768 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
769 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
770 (parse_debug_format_options): Likewise.
771 (gdbserver_usage): Likewise.
772 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
773 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
774 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
775 against libiberty.
776 ($(LIBGNU)): Depend on libiberty.
777 (all-lib): Recurse into all subdirs.
778 (install-only): Invoke "install" target in subdirs.
779 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
780 targets.
781 * configure: Rebuild.
782 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
783 for vasprintf, vsnprintf, or gettimeofday.
784 * configure.srv: Don't add safe-ctype.o or lbasename.o to
785 srv_tgtobj.
786
270c9937
JB
7872014-06-05 Joel Brobecker <brobecker@adacore.com>
788
789 * development.sh: Delete.
790 * Makefile.in (config.status): Adjust dependency on development.sh.
791 * configure.ac: Adjust development.sh source call.
792 * configure: Regenerate.
793
0a261ed8
PA
7942014-06-02 Pedro Alves <palves@redhat.com>
795
796 * ax.c (gdb_free_agent_expr): New function.
797 * ax.h (gdb_free_agent_expr): New declaration.
798 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
799 list.
800 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
801 static.
802 (clear_breakpoint_conditions_and_commands): New function.
803 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
804 (clear_breakpoint_conditions_and_commands): New declaration.
805
e9dae05e
RR
8062014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
807
808 * linux-aarch64-low.c (asm/ptrace.h): Include.
809
5876f503
JK
8102014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
811
812 Fix TLS access for -static -pthread.
813 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
814 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
815 (thread_db_load_search, try_thread_db_load_1): Initialize it.
816
802e8e6d
PA
8172014-05-20 Pedro Alves <palves@redhat.com>
818
819 * linux-aarch64-low.c (aarch64_insert_point)
820 (aarch64_remove_point): No longer check whether the type is
821 supported here. Adjust to new interface.
822 (the_low_target): Install aarch64_supports_z_point_type as
823 supports_z_point_type method.
824 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
825 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
826 instead of a Z packet char. Adjust.
827 (arm_supports_z_point_type): New function.
828 (arm_insert_point, arm_remove_point): Adjust to new interface.
829 (the_low_target): Install arm_supports_z_point_type.
830 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
831 (cris_insert_point, cris_remove_point): Adjust to new interface.
832 Don't check whether the type is supported here.
833 (the_low_target): Install cris_supports_z_point_type.
834 * linux-low.c (linux_supports_z_point_type): New function.
835 (linux_insert_point, linux_remove_point): Adjust to new interface.
836 * linux-low.h (struct linux_target_ops) <insert_point,
837 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
838 raw_breakpoint pointer parameter.
839 <supports_z_point_type>: New method.
840 * linux-mips-low.c (mips_supports_z_point_type): New function.
841 (mips_insert_point, mips_remove_point): Adjust to new interface.
842 Use mips_supports_z_point_type.
843 (the_low_target): Install mips_supports_z_point_type.
844 * linux-ppc-low.c (the_low_target): Install NULL as
845 supports_z_point_type method.
846 * linux-s390-low.c (the_low_target): Install NULL as
847 supports_z_point_type method.
848 * linux-sparc-low.c (the_low_target): Install NULL as
849 supports_z_point_type method.
850 * linux-x86-low.c (x86_supports_z_point_type): New function.
851 (x86_insert_point): Adjust to new insert_point interface. Use
852 insert_memory_breakpoint. Adjust to new
853 i386_low_insert_watchpoint interface.
854 (x86_remove_point): Adjust to remove_point interface. Use
855 remove_memory_breakpoint. Adjust to new
856 i386_low_remove_watchpoint interface.
857 (the_low_target): Install x86_supports_z_point_type.
858 * lynx-low.c (lynx_target_ops): Install NULL as
859 supports_z_point_type callback.
860 * nto-low.c (nto_supports_z_point_type): New.
861 (nto_insert_point, nto_remove_point): Adjust to new interface.
862 (nto_target_ops): Install nto_supports_z_point_type.
863 * mem-break.c: Adjust intro comment.
864 (struct raw_breakpoint) <raw_type, size>: New fields.
865 <inserted>: Update comment.
866 <shlib_disabled>: Delete field.
867 (enum bkpt_type) <gdb_breakpoint>: Delete value.
868 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
869 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
870 (raw_bkpt_type_to_target_hw_bp_type): New function.
871 (find_enabled_raw_code_breakpoint_at): New function.
872 (find_raw_breakpoint_at): New type and size parameters. Use them.
873 (insert_memory_breakpoint): New function, based off
874 set_raw_breakpoint_at.
875 (remove_memory_breakpoint): New function.
876 (set_raw_breakpoint_at): Reimplement.
877 (set_breakpoint): New, based on set_breakpoint_at.
878 (set_breakpoint_at): Reimplement.
879 (delete_raw_breakpoint): Go through the_target->remove_point
880 instead of assuming memory breakpoints.
881 (find_gdb_breakpoint_at): Delete.
882 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
883 (find_gdb_breakpoint): New function.
884 (set_gdb_breakpoint_at): Delete.
885 (z_type_supported): New function.
886 (set_gdb_breakpoint_1): New function, loosely based off
887 set_gdb_breakpoint_at.
888 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
889 (delete_gdb_breakpoint_at): Delete.
890 (delete_gdb_breakpoint_1): New function, loosely based off
891 delete_gdb_breakpoint_at.
892 (delete_gdb_breakpoint): New function.
893 (clear_gdb_breakpoint_conditions): Rename to ...
894 (clear_breakpoint_conditions): ... this. Don't handle a NULL
895 breakpoint.
896 (add_condition_to_breakpoint): Make static.
897 (add_breakpoint_condition): Take a struct breakpoint pointer
898 instead of an address. Adjust.
899 (gdb_condition_true_at_breakpoint): Rename to ...
900 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
901 z_type parameter.
902 (gdb_condition_true_at_breakpoint): Reimplement.
903 (add_breakpoint_commands): Take a struct breakpoint pointer
904 instead of an address. Adjust.
905 (gdb_no_commands_at_breakpoint): Rename to ...
906 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
907 parameter. Return true if no breakpoint was found. Change debug
908 output.
909 (gdb_no_commands_at_breakpoint): Reimplement.
910 (run_breakpoint_commands): Rename to ...
911 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
912 and change return type to boolean.
913 (run_breakpoint_commands): New function.
914 (gdb_breakpoint_here): Also check for Z1 breakpoints.
915 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
916 breakpoint. Go through the_target->remove_point instead of
917 assuming memory breakpoint.
918 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
919 software and hardware breakpoints.
920 (reinsert_raw_breakpoint): Go through the_target->insert_point
921 instead of assuming memory breakpoint.
922 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
923 software and hardware breakpoints.
924 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
925 Check both software and hardware breakpoints.
926 (validate_inserted_breakpoint): Assert the breakpoint is a
927 software breakpoint. Set the inserted flag to -1 instead of
928 setting shlib_disabled.
929 (delete_disabled_breakpoints): Adjust.
930 (validate_breakpoints): Only validate software breakpoints.
931 Adjust to inserted flag change.
932 (check_mem_read, check_mem_write): Skip breakpoint types other
933 than software breakpoints. Adjust to inserted flag change.
934 * mem-break.h (enum raw_bkpt_type): New enum.
935 (raw_breakpoint, struct process_info): Forward declare.
936 (Z_packet_to_target_hw_bp_type): Delete declaration.
937 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
938 (set_gdb_breakpoint, delete_gdb_breakpoint)
939 (clear_breakpoint_conditions): New declarations.
940 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
941 (breakpoint_inserted_here): Update comment.
942 (add_breakpoint_condition, add_breakpoint_commands): Replace
943 address parameter with a breakpoint pointer parameter.
944 (gdb_breakpoint_here): Update comment.
945 (delete_gdb_breakpoint_at): Delete.
946 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
947 * server.c (process_point_options): Take a struct breakpoint
948 pointer instead of an address. Adjust.
949 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
950 delete_gdb_breakpoint.
951 * spu-low.c (spu_target_ops): Install NULL as
952 supports_z_point_type method.
953 * target.h: Include mem-break.h.
954 (struct target_ops) <prepare_to_access_memory>: Update comment.
955 <supports_z_point_type>: New field.
956 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
957 instead of a char. Also take a raw breakpoint pointer.
958 * win32-arm-low.c (the_low_target): Install NULL as
959 supports_z_point_type.
960 * win32-i386-low.c (i386_supports_z_point_type): New function.
961 (i386_insert_point, i386_remove_point): Adjust to new interface.
962 (the_low_target): Install i386_supports_z_point_type.
963 * win32-low.c (win32_supports_z_point_type): New function.
964 (win32_insert_point, win32_remove_point): Adjust to new interface.
965 (win32_target_ops): Install win32_supports_z_point_type.
966 * win32-low.h (struct win32_target_ops):
967 <supports_z_point_type>: New method.
968 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
969 instead of a char. Also take a raw breakpoint pointer.
970
932539e3
PA
9712014-05-20 Pedro Alves <palves@redhat.com>
972
973 * mem-break.h: Include break-common.h.
974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
976 (Z_packet_to_target_hw_bp_type): New declaration.
977 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
978 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
979 (Z_PACKET_ACCESS_WP): Delete macros.
980 (Z_packet_to_hw_type): Delete function.
981 * i386-low.h: Don't include break-common.h here.
982 (Z_packet_to_hw_type): Delete declaration.
983 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
984 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
985 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
986 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
987 * linux-aarch64-low.c: Don't include break-common.h here.
988 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
989 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
990 (Z_packet_to_target_hw_bp_type): Delete function.
991 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
992 function.
993 (mips_insert_point, mips_remove_point): Use
994 Z_packet_to_target_hw_bp_type.
995
4ff0d3d8
PA
9962014-05-20 Pedro Alves <palves@redhat.com>
997
998 * linux-aarch64-low.c: Include break-common.h.
999 (enum target_point_type): Delete.
1000 (Z_packet_to_point_type): Rename to ...
1001 (Z_packet_to_target_hw_bp_type): ... this, and return a
1002 target_hw_bp_type instead.
1003 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1004 instead of an enum target_point_type.
1005 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1006 breakpoint type.
1007 (aarch64_dr_state_insert_one_point)
1008 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1009 (aarch64_handle_aligned_watchpoint)
1010 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1011 Take an enum target_hw_bp_type instead of an enum
1012 target_point_type.
1013 (aarch64_supports_z_point_type): New function.
1014 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1015 use Z_packet_to_target_hw_bp_type.
1016
786dc519
JB
10172014-05-20 Joel Brobecker <brobecker@adacore.com>
1018
1019 * configure.ac: Only use -Werror by default when DEVELOPMENT
1020 is true.
1021 * configure: Regenerate.
1022
9e0aa64f
JK
10232014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1024
1025 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1026 * linux-x86-low.c (X86_64_USER_REGS): New.
1027 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1028
2b577b92
YQ
10292014-04-28 Yao Qi <yao@codesourcery.com>
1030
1031 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1032 name.
1033
94611da2
PA
10342014-04-25 Pedro Alves <palves@redhat.com>
1035
1036 PR server/16255
1037 * linux-low.c (linux_attach_fail_reason_string): New function.
1038 (linux_attach_lwp): Delete.
1039 (linux_attach_lwp_1): Rename to ...
1040 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1041 argument. Remove "initial" parameter. Return int instead of
1042 void. Don't error or warn here.
1043 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1044 failure to attach to the tgid. Call warning when failing to
1045 attach to an lwp.
1046 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1047 argument. Remove "initial" parameter. Return int instead of
1048 void. Don't error or warn here.
1049 (linux_attach_fail_reason_string): New declaration.
1050 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1051 interface change. Use linux_attach_fail_reason_string.
1052
01f9f808
MS
10532014-04-24 Michael Sturm <michael.sturm@mintel.com>
1054 Walfred Tedeschi <walfred.tedeschi@intel.com>
1055
1056 * Makefile.in: Added rules to handle new files
1057 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1058 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1059 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1060 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1061 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1062 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1063 x32-avx512-linux.o.
1064 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1065 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1066 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1067 i386/x32-avx512.xml.
1068 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1069 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1070 i386/x32-avx512-linux.xml.
1071 * i387-fp.c (num_avx512_k_registers): New constant for number
1072 of K registers.
1073 (num_avx512_zmmh_low_registers): New constant for number of
1074 lower ZMM registers (0-15).
1075 (num_avx512_zmmh_high_registers): New constant for number of
1076 higher ZMM registers (16-31).
1077 (num_avx512_ymmh_registers): New contant for number of higher
1078 YMM registers (ymm16-31 added by avx521 on x86_64).
1079 (num_avx512_xmm_registers): New constant for number of higher
1080 XMM registers (xmm16-31 added by AVX512 on x86_64).
1081 (struct i387_xsave): Add space for AVX512 registers.
1082 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1083 Add code to handle AVX512 registers.
1084 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1085 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1086 prototypei from generated file.
1087 (tdesc_amd64_avx512_linux): Likewise.
1088 (init_registers_x32_avx512_linux): Likewise.
1089 (tdesc_x32_avx512_linux): Likewise.
1090 (init_registers_i386_avx512_linux): Likewise.
1091 (tdesc_i386_avx512_linux): Likewise.
1092 (x86_64_regmap): Add AVX512 registers.
1093 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1094 mask.
1095 (initialize_low_arch): Add code to initialize AVX512 registers.
1096
51aa91f9
PA
10972014-04-23 Pedro Alves <palves@redhat.com>
1098
1099 * mem-break.c (find_gdb_breakpoint_at): Make static.
1100 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1101
a4165e94
PA
11022014-04-23 Pedro Alves <palves@redhat.com>
1103
1104 * i386-low.c: Don't include break-common.h here.
1105 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1106 prototype to take target_hw_bp_type as argument instead of a Z
1107 packet char.
1108 * i386-low.h: Include break-common.h here.
1109 (Z_packet_to_hw_type): Declare.
1110 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1111 prototypes.
1112 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1113 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1114 (x86_remove_point): Convert the packet number to a
1115 target_hw_bp_type before calling i386_low_remove_watchpoint.
1116 * win32-i386-low.c (i386_insert_point): Convert the packet number
1117 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1118 (i386_remove_point): Convert the packet number to a
1119 target_hw_bp_type before calling i386_low_remove_watchpoint.
1120
b8acf843
PA
11212014-04-23 Pedro Alves <palves@redhat.com>
1122
1123 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1124
d708bcd1
PA
11252014-04-10 Pedro Alves <palves@redhat.com>
1126
1127 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1128 Check if the condition or command is NULL before checking if the
1129 breakpoint is known. On success, return true.
1130 * mem-break.h (add_breakpoint_condition): Document return.
1131 (add_breakpoint_commands): Add describing comment.
1132 * server.c (skip_to_semicolon): New function.
1133 (process_point_options): Use it.
1134
2eec7d5b
PA
11352014-04-09 Pedro Alves <palves@redhat.com>
1136
1137 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1138 to lwpid_of.
1139
fa96cb38
PA
11402014-02-27 Pedro Alves <palves@redhat.com>
1141
1142 PR 12702
1143 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1144 macros.
1145 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1146 output.
1147 (last_thread_of_process_p): Take a PID argument instead of a
1148 thread pointer.
1149 (linux_wait_for_lwp): Delete.
1150 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1151 functions.
1152 (linux_low_filter_event): New function, party factored out from
1153 linux_wait_for_event.
1154 (linux_wait_for_event): Rename to ...
1155 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1156 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1157 sigsuspend. Check for zombie leaders.
1158 (linux_wait_for_event): Reimplement as wrapper around
1159 linux_wait_for_event_filtered.
1160 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1161 a normal or signal exit is seen, it's the whole process exiting.
1162 (wait_for_sigstop): No longer a for_each_inferior callback.
1163 Rewrite on top of linux_wait_for_event_filtered.
1164 (stop_all_lwps): Call wait_for_sigstop directly.
1165 * server.c (resume, handle_target_event): Handle
1166 TARGET_WAITKIND_NO_RESUMED.
1167
d763de10
JB
11682014-02-26 Joel Brobecker <brobecker@adacore.com>
1169
1170 * win32-low.c (psapi_get_dll_name,
1171 * win32_CreateToolhelp32Snapshot): Delete.
1172 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1173 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1174 Delete.
1175 (handle_load_dll): Add function description.
1176 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1177
850a0f76
JB
11782014-02-26 Joel Brobecker <brobecker@adacore.com>
1179
1180 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1181 Add comment.
1182 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1183 base address when calling win32_add_one_solib.
1184 (handle_load_dll): Delete local variable load_addr.
1185 Remove 0x1000 offset applied to DLL base address when calling
1186 win32_add_one_solib.
1187 (handle_unload_dll): Add comment.
1188
f25b3fc3
JB
11892014-02-26 Joel Brobecker <brobecker@adacore.com>
1190
1191 * win32-low.c (win32_add_all_dlls): Renames
1192 win32_ensure_ntdll_loaded. Rewrite function documentation.
1193 Adjust implementation to always load all DLLs.
1194 Add 0x1000 offset to DLL base address when calling
1195 win32_add_one_solib.
1196 (child_initialization_done): New static global.
1197 (do_initial_child_stuff): Set child_initialization_done to
1198 zero during child initialization, and 1 after. Replace call
1199 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1200 Add comment.
1201 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1202 (handle_unload_dll): Add function documentation.
1203 (get_child_debug_event): Ignore load and unload DLL events
1204 during child initialization.
1205
d86d4aaf
DE
12062014-02-20 Doug Evans <dje@google.com>
1207
3bc32da3 1208 Remove global all_lwps.
d86d4aaf
DE
1209 * inferiors.h (ptid_of): Move here from linux-low.h.
1210 (pid_of, lwpid_of): Ditto.
1211 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1212 parameter is a struct thread_info * now.
1213 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1214 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1215 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1216 directly.
1217 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1218 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1219 * linux-arm-low.c (update_registers_callback): Update, "entry"
1220 parameter is a struct thread_info * now.
1221 Fetch lwpid from current_inferior directly.
1222 (arm_insert_point): Pass &all_threads to find_inferior instead of
1223 &all_lwps.
1224 (arm_remove_point): Ditto.
1225 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1226 (arm_prepare_to_resume): Fetch pid from thread.
1227 (arm_read_description): Fetch lwpid from current_inferior directly.
1228 * linux-low.c (all_lwps): Delete.
1229 (delete_lwp): Delete call to remove_inferior.
1230 (handle_extended_wait): Fetch lwpid from thread.
1231 (add_lwp): Don't set lwp->entry.id. Remove call to
1232 add_inferior_to_list.
1233 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1234 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1235 (kill_one_lwp_callback): Ditto.
1236 (linux_kill): Don't dereference NULL pointer.
1237 Fetch ptid,lwpid from thread.
1238 (get_detach_signal): Fetch ptid from thread.
1239 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1240 Simplify call to regcache_invalidate_thread.
1241 (delete_lwp_callback): Update, "entry" parameter is a
1242 struct thread_info * now. Fetch pid from thread.
1243 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1244 (status_pending_p_callback): Update, "entry" parameter is a
1245 struct thread_info * now. Fetch ptid from thread.
1246 (find_lwp_pid): Update, "entry" parameter is a
1247 struct thread_info * now.
1248 (linux_wait_for_lwp): Fetch pid from thread.
1249 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1250 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1251 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1252 (dequeue_one_deferred_signal): Ditto.
1253 (cancel_breakpoint): Fetch ptid from current_inferior.
1254 (linux_wait_for_event): Pass &all_threads to find_inferior,
1255 not &all_lwps. Fetch ptid, lwpid from thread.
1256 (count_events_callback): Update, "entry" parameter is a
1257 struct thread_info * now.
1258 (select_singlestep_lwp_callback): Ditto.
1259 (select_event_lwp_callback): Ditto.
1260 (cancel_breakpoints_callback): Ditto.
1261 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1262 not &all_lwps.
1263 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1264 (unsuspend_one_lwp): Update, "entry" parameter is a
1265 struct thread_info * now.
1266 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1267 not &all_lwps.
1268 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1269 Fetch lwpid from thread, not lwp.
1270 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1271 Pass &all_threads to find_inferior, not &all_lwps.
1272 (send_sigstop): Fetch lwpid from thread, not lwp.
1273 (send_sigstop_callback): Update, "entry" parameter is a
1274 struct thread_info * now.
1275 (suspend_and_send_sigstop_callback): Ditto.
1276 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1277 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1278 struct thread_info * now.
1279 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1280 from thread, lwp.
1281 (lwp_running): Update, "entry" parameter is a
1282 struct thread_info * now.
1283 (stop_all_lwps): Fetch ptid from thread.
1284 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1285 (linux_resume_one_lwp): Fetch lwpid from thread.
1286 (linux_set_resume_request): Update, "entry" parameter is a
1287 struct thread_info * now. Fetch pid, lwpid from thread.
1288 (resume_status_pending_p): Update, "entry" parameter is a
1289 struct thread_info * now.
1290 (need_step_over_p): Ditto. Fetch lwpid from thread.
1291 (start_step_over): Fetch lwpid from thread.
1292 (linux_resume_one_thread): Update, "entry" parameter is a
1293 struct thread_info * now. Fetch lwpid from thread.
1294 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1295 (proceed_one_lwp): Update, "entry" parameter is a
1296 struct thread_info * now. Fetch lwpid from thread.
1297 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1298 struct thread_info * now.
1299 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1300 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1301 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1302 directly.
1303 (regsets_store_inferior_registers): Ditto.
1304 (fetch_register, store_register): Ditto.
1305 (linux_read_memory, linux_write_memory): Ditto.
1306 (linux_request_interrupt): Ditto.
1307 (linux_read_auxv): Ditto.
1308 (linux_xfer_siginfo): Ditto.
1309 (linux_qxfer_spu): Ditto.
1310 (linux_qxfer_libraries_svr4): Ditto.
1311 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1312 moved to inferiors.h.
1313 (get_lwp): Delete.
1314 (get_thread_lwp): Update.
1315 (struct lwp_info): Delete member "entry". Simplify comment for
1316 member "thread".
1317 (all_lwps): Delete.
1318 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1319 current_inferior directly.
1320 (update_watch_registers_callback): Update, "entry" parameter is a
1321 struct thread_info * now. Fetch pid from thread.
1322 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1323 (mips_insert_point): Fetch lwpid from current_inferior.
1324 Pass &all_threads to find_inferior, not &all_lwps.
1325 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1326 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1327 directly.
1328 (mips_stopped_data_address): Ditto.
1329 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1330 directly.
1331 * linux-tile-low.c (tile_arch_setup): Ditto.
1332 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1333 (update_debug_registers_callback): Update, "entry" parameter is a
1334 struct thread_info * now. Fetch pid from thread.
1335 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1336 Pass &all_threads to find_inferior, not &all_lwps.
1337 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1338 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1339 Pass &all_threads to find_inferior, not &all_lwps.
1340 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1341 (i386_dr_low_get_status): Ditto.
1342 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1343 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1344 (x86_linux_read_description): Ditto.
1345 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1346
3b8361aa
DE
13472014-02-20 Doug Evans <dje@google.com>
1348
1349 * inferiors.c (get_first_inferior): Fix buglet.
1350
f7667f0d
DE
13512014-02-19 Doug Evans <dje@google.com>
1352
1353 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1354 * inferiors.c (add_thread): Change result type to struct thread_info *.
1355 All callers updated.
1356 (add_lwp): Call add_thread here instead of in callers.
1357 All callers updated.
1358 * linux-low.h (get_lwp_thread): Rewrite.
1359 (struct lwp_info): New member "thread".
1360
b3312d80
DE
13612014-02-19 Doug Evans <dje@google.com>
1362
1363 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1364 All callers updated.
1365
ecc6f45c
DE
13662014-02-19 Doug Evans <dje@google.com>
1367
1368 * inferiors.c (add_thread): Fix whitespace.
1369
649ebbca
DE
13702014-02-19 Doug Evans <dje@google.com>
1371
1372 * dll.c (clear_dlls): Replace accessing list implemention details
1373 with API function.
1374 * gdbthread.h (get_first_thread): Declare.
1375 * inferiors.c (for_each_inferior_with_data): New function.
1376 (get_first_thread): New function.
1377 (find_thread_ptid): Simplify.
1378 (get_first_inferior): New function.
1379 (clear_list): Delete.
1380 (one_inferior_p): New function.
1381 (clear_inferior_list): New function.
1382 (clear_inferiors): Update.
1383 * inferiors.h (for_each_inferior_with_data): Declare.
1384 (clear_inferior_list): Declare.
1385 (one_inferior_p): Declare.
1386 (get_first_inferior): Declare.
1387 * linux-low.c (linux_wait_for_event): Replace accessing list
1388 implemention details with API function.
1389 * server.c (target_running): Ditto.
1390 (accumulate_file_name_length): New function.
1391 (emit_dll_description): New function.
1392 (handle_qxfer_libraries): Replace accessing list implemention
1393 details with API function.
1394 (handle_qxfer_threads_worker): New function.
1395 (handle_qxfer_threads_proper): Replace accessing list implemention
1396 details with API function.
1397 (handle_query): Ditto.
1398 (visit_actioned_threads_callback_ftype): New typedef.
1399 (visit_actioned_threads_data): New struct.
1400 (visit_actioned_threads): Rewrite to be find_inferior callback.
1401 (resume): Call find_inferior.
1402 (handle_status): Replace accessing list implemention
1403 details with API function.
1404 (process_serial_event): Replace accessing list implemention details
1405 with API function.
1406 * target.c (set_desired_inferior): Replace accessing list implemention
1407 details with API function.
1408 * tracepoint.c (same_process_p): New function.
1409 (gdb_agent_about_to_close): Replace accessing list implemention
1410 details with API function.
1411 * win32-low.c (child_delete_thread): Replace accessing list
1412 implemention details with API function.
1413 (match_dll_by_basename): New function.
1414 (dll_is_loaded_by_basename): New function.
1415 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1416 details call to dll_is_loaded_by_basename.
1417
80894984
DE
14182014-02-19 Doug Evans <dje@google.com>
1419
1420 * dll.h (struct dll_info): Add comment.
1421 * gdbthread.h (struct thread_info): Add comment.
1422 (current_ptid): Simplify.
1423 * inferiors.c (add_process): Update.
1424 (remove_process): Update.
1425 * inferiors.h (struct process_info): Rename member "head" to "entry".
1426 * linux-low.c (delete_lwp): Update.
1427 (add_lwp): Update.
1428 (last_thread_of_process_p): Update.
1429 (kill_one_lwp_callback, linux_kill): Update.
1430 (status_pending_p_callback): Update.
1431 (wait_for_sigstop): Update. Simplify read of ptid.
1432 (start_step_over): Update.
1433 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1434 (get_lwp_thread): Update.
1435 (struct lwp_info): Rename member "head" to "entry".
1436 * regcache.h (inferior_list_entry): Delete.
1437 * server.c (kill_inferior_callback): Update.
1438 (detach_or_kill_inferior_callback): Update.
1439 (print_started_pid): Update.
1440 (print_attached_pid): Update.
1441 (process_serial_event): Simplify read of ptid.
1442 * thread-db.c (thread_db_create_event): Update.
1443 (thread_db_get_tls_address): Update.
1444 * win32-low.c (current_inferior_ptid): Simplify.
1445
46917d26
TT
14462014-02-19 Tom Tromey <tromey@redhat.com>
1447
1448 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1449 argument.
1450 (target_supports_btrace): Update.
1451
0759a81e
YQ
14522014-02-14 Yao Qi <yao@codesourcery.com>
1453
1454 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1455 (rsp-low-ipa.o): New target.
1456
a7191e8b
TT
14572014-02-12 Tom Tromey <tromey@redhat.com>
1458
1459 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1460 convert_ascii_to_int.
1461 * regcache.c (registers_to_string): Likewise.
1462 * remote-utils.c (decode_M_packet): Likewise.
1463 * server.c (process_serial_event): Likewise.
1464
ff0e980e
TT
14652014-02-12 Tom Tromey <tromey@redhat.com>
1466
1467 * server.c (handle_query, handle_v_run): Use hex2bin, not
1468 unhexify.
1469 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1470
e9371aff
TT
14712014-02-12 Tom Tromey <tromey@redhat.com>
1472
1473 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1474 convert_int_to_ascii.
1475 * regcache.c (registers_to_string, collect_register_as_string):
1476 Likewise.
1477 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1478 Likewise.
1479 * server.c (process_serial_event): Likewise.
1480 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1481 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1482
971dc0b8
TT
14832014-02-12 Tom Tromey <tromey@redhat.com>
1484
1485 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1486 bin2hex, not hexify.
1487 * tracepoint.c (cmd_qtstatus): Likewise.
1488
0a822afb
TT
14892014-02-12 Tom Tromey <tromey@redhat.com>
1490
1491 * remote-utils.c (monitor_output): Pass explicit length to
1492 hexify.
1493
9c3d6531
TT
14942014-02-12 Tom Tromey <tromey@redhat.com>
1495
1496 * tracepoint.c: Include rsp-low.h.
1497 * server.c: Include rsp-low.h.
1498 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1499 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1500 declare.
1501 * remote-utils.c: Include rsp-low.h.
1502 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1503 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1504 (convert_int_to_ascii, convert_ascii_to_int): Move to
1505 common/rsp-low.c.
1506 * regcache.c: Include rsp-low.h.
1507 * ax.c: Include rsp-low.h.
1508 * Makefile.in (SFILES): Add common/rsp-low.c.
1509 (OBS): Add rsp-low.o.
1510 (rsp-low.o): New target.
1511
01fd3ea5
TT
15122014-02-12 Tom Tromey <tromey@redhat.com>
1513
1514 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1515 Include print-utils.h.
1516 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1517 (plongest, thirty_two, phex_nz): Remove.
1518 * Makefile.in (SFILES): Add common/print-utils.c.
1519 (OBS): Add print-utils.o.
1520 (print-utils-ipa.o): New target.
1521 (print-utils.o): New target.
1522 (IPA_OBJS): Add print-utils-ipa.o.
1523
e99dc820
TT
15242014-02-06 Tom Tromey <tromey@redhat.com>
1525
1526 * Makefile.in (SFILES): Fix indentation.
1527
ee1e2d4f
DE
15282014-02-05 Doug Evans <dje@google.com>
1529
1530 * linux-low.c (linux_wait_for_event): Improve comment.
1531 (linux_wait_1): Keep current_inferior in sync with event_child.
1532
f5a02773
DE
15332014-01-22 Doug Evans <dje@google.com>
1534
1535 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1536
87ce2a04
DE
15372014-01-22 Doug Evans <dje@google.com>
1538
1539 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1540 * configure: Regenerate.
1541 * config.in: Regenerate.
1542 * Makefile.in (SFILES): Add debug.c.
1543 (OBS): Add debug.o.
1544 * debug.c: New file.
1545 * debug.h: New file.
1546 * linux-aarch64-low.c (*): Update all debugging printfs to use
1547 debug_printf instead of fprintf.
1548 * linux-arm-low.c (*): Ditto.
1549 * linux-cris-low.c (*): Ditto.
1550 * linux-crisv32-low.c (*): Ditto.
1551 * linux-m32r-low.c (*): Ditto.
1552 * linux-sparc-low.c (*): Ditto.
1553 * linux-x86.c (*): Ditto.
1554 * linux-low.c (*): Ditto.
1555 (linux_wait_1): Add calls to debug_enter, debug_exit.
1556 (linux_wait): Remove redundant debugging printf.
1557 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1558 (linux_resume, unstop_all_lwps): Ditto.
1559 * mem-break.c (*): Update all debugging printfs to use
1560 debug_printf instead of fprintf.
1561 * remote-utils.c (*): Ditto.
1562 * thread-db.c (*): Ditto.
1563 * server.c #include <ctype.h>, "gdb_vecs.h".
1564 (debug_threads): Moved to debug.c.
1565 (*): Update all debugging printfs to use debug_printf instead of
1566 fprintf.
1567 (start_inferior): Replace call to fflush with call to debug_flush.
1568 (monitor_show_help): Mention set debug-format.
1569 (parse_debug_format_options): New function.
1570 (handle_monitor_command): Handle "monitor set debug-format".
1571 (gdbserver_usage): Mention --debug-format.
1572 (main): Parse --debug-format.
1573 * server.h (debug_threads): Declaration moved to debug.h.
1574 #include "debug.h".
1575 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1576 trace_debug_1 that uses debug_printf.
1577 (tracepoint_look_up_symbols): Update all debugging printfs to use
1578 debug_printf instead of fprintf.
1579
e671835b
BS
15802014-01-20 Baruch Siach <baruch@tkos.co.il>
1581
1582 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1583 sys/ptrace.h.
1584
b5737fa9
PA
15852014-01-17 Pedro Alves <palves@redhat.com>
1586
ea38d2a9 1587 PR build/16445
c7faa97a
PA
1588 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1589 defined after including gdb_proc_service.h.
b5737fa9 1590
40ed484e
DE
15912014-01-16 Doug Evans <dje@google.com>
1592
1593 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1594 (match_dll): Use it.
1595
969c39fb
MM
15962014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1597
1598 * target.h (target_ops) <read_btrace>: Change parameters and
1599 return type to allow error reporting.
1600 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1601 trace reading errors on.
1602 * linux-low.c (linux_low_read_btrace): Pass trace reading
1603 errors on.
1604 (linux_low_disable_btrace): New.
1605
ab7f45ba
DE
16062014-01-15 Doug Evans <dje@google.com>
1607
1608 * inferiors.c (thread_id_to_gdb_id): Delete.
1609 * inferiors.h (thread_id_to_gdb_id): Delete.
1610
66af0f44
EZ
16112014-01-13 Eli Zaretskii <eliz@gnu.org>
1612
1613 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1614 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1615 versions.
1616
9939e131
PA
16172014-01-08 Pedro Alves <palves@redhat.com>
1618
1619 * server.c (handle_status): Don't discard previous queued stop
1620 replies or thread's pending status here.
1621 (main) <disconnection>: Do it here instead.
1622
b7ea362b
PA
16232014-01-08 Pedro Alves <palves@redhat.com>
1624
1625 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1626 * server.c (visit_actioned_threads, handle_pending_status): New
1627 function.
1628 (handle_v_cont): Factor out parts to ...
1629 (resume): ... this new function. If in all-stop, and a thread
1630 being resumed has a pending status, report it without actually
1631 resuming.
1632 (myresume): Adjust to use the new 'resume' function.
1633 (clear_pending_status_callback, set_pending_status_callback)
1634 (find_status_pending_thread_callback): New functions.
1635 (handle_status): Handle the case of multiple threads having
1636 interesting statuses to report. Report threads' real last signal
1637 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1638 with an interesting thread to report the status for, instead of
1639 always reporting the status of the first thread.
1640
28498c42
JB
16412014-01-01 Joel Brobecker <brobecker@adacore.com>
1642
1643 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1644 * gdbreplay.c (gdbreplay_version): Likewise.
1645
f45c82da
YZ
16462013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1647
1648 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1649 iov.iov_len with the real length in use.
1650
379a5e2d
JB
16512013-12-13 Joel Brobecker <brobecker@adacore.com>
1652
1653 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1654 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1655 for all targets that use win32-low.c.
1656 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1657 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1658
4210d83e
PA
16592013-12-13 Pedro Alves <palves@redhat.com>
1660
1661 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1662 if equal to TARGET_WAITKIND_LOADED.
1663 * win32-low.c (cached_status): New static global.
1664 (win32_wait): Add declaration.
1665 (do_initial_child_stuff): Flush all initial pending debug events
1666 up to the initial breakpoint.
1667 (win32_wait): If CACHED_STATUS was set, return that instead
1668 of doing a real wait. Remove the code resuming the execution
1669 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1670 during the initial phase. Also remove the code changing
1671 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1672 TARGET_WAITKIND_STOPPED.
1673
e7f0d979
YQ
16742013-12-11 Yao Qi <yao@codesourcery.com>
1675
1676 * notif.c (handle_notif_ack): Return 0 if no notification
1677 matches.
1678
ebcf782c
DE
16792013-11-20 Doug Evans <dje@google.com>
1680
1681 * linux-low.c (linux_set_resume_request): Fix comment.
1682
20ad9378
DE
16832013-11-20 Doug Evans <dje@google.com>
1684
1685 * linux-low.c (resume_status_pending_p): Tweak comment.
1686
a196ebeb
WT
16872013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1688
1689 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1690 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1691 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1692 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1693 (srv_amd64_regobj): Add amd64-mpx.o.
1694 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1695 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1696 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1697 * i387-fp.c (num_pl_bnd_register) Added constant.
1698 (num_pl_bnd_cfg_registers) Added constant.
1699 (struct i387_xsave) Added reserved area and MPX fields.
1700 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1701 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1702 function.
1703 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1704 (init_registers_amd64_mpx_linux): Declare new function.
1705 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1706 (x86_64_regmap): Add MPX registers.
1707 (x86_linux_read_description): Add MPX case.
1708 (initialize_low_arch): Initialize MPX targets.
1709
0080a2f6
TT
17102013-11-18 Tom Tromey <tromey@redhat.com>
1711
1712 * configure: Rebuild.
1713 * configure.ac: Don't check for stdlib.h.
1714 * gdbreplay.c: Unconditionally include stdlib.h.
1715
2978b111
TT
17162013-11-18 Tom Tromey <tromey@redhat.com>
1717
1718 * config.in: Rebuild.
1719 * configure: Rebuild.
1720 * configure.ac: Don't use AC_HEADER_DIRENT.
1721
a3d08894
TT
17222013-11-18 Tom Tromey <tromey@redhat.com>
1723
1724 * server.h: Don't check HAVE_STRING_H.
1725 * gdbreplay.c: Don't check HAVE_STRING_H.
1726 * configure: Rebuild.
1727
0a5dd17d
TT
17282013-11-18 Tom Tromey <tromey@redhat.com>
1729
1730 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1731 LIBGNU.
1732
1bd2f0ba
TT
17332013-11-08 Tom Tromey <tromey@redhat.com>
1734
1735 * configure, config.in: Rebuild.
1736 * configure.ac: Remove unused configury.
1737
3266f10b
TT
17382013-11-08 Tom Tromey <tromey@redhat.com>
1739
1740 * acinclude.m4: Include common.m4, codeset.m4.
1741 * configure, config.in: Rebuild.
1742 * configure.ac: Use GDB_AC_COMMON.
1743
6682d959
AA
17442013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1745
1746 * linux-s390-low.c (HWCAP_S390_TE): New define.
1747 (s390_arch_setup): Consider the TE field in the HWCAP for
1748 determining 'have_regset_tdb'.
1749
fd0a4d76
SDJ
17502013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1751
1752 PR gdb/16014
1753 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1754 call to sizeof.
1755
1a3d890b
PA
17562013-10-02 Pedro Alves <palves@redhat.com>
1757
1758 * server.c (process_serial_event): Don't output "GDBserver
1759 exiting" if GDB is connected through stdio.
1760 * target.c (mywait): Likewise, be silent if GDB is connected
1761 through stdio.
1762
97ad4581
JB
17632013-10-01 Joel Brobecker <brobecker@adacore.com>
1764
1765 * lynx-low.c (lynx_add_threads_after_attach): New function.
1766 (lynx_attach): Remove call to add_thread. Add call to
1767 lynx_add_threads_after_attach instead.
1768
5b4e221c
MF
17692013-09-28 Mike Frysinger <vapier@gentoo.org>
1770
1771 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1772 * config.in, configure: Regenerated.
1773
ee47b2f8
YQ
17742013-09-18 Yao Qi <yao@codesourcery.com>
1775
1776 PR server/15959
1777 * server.c (start_inferior): Clear 'resume_info'.
1778
d6707650 17792013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1780
d6707650
JW
1781 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1782 for each register.
1783
9243dd0e 17842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1785
9243dd0e
JW
1786 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1787 linux-tile-low.o to srv_tgtobj.
1788
c623a6ef
WN
17892013-09-16 Will Newton <will.newton@linaro.org>
1790
1791 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1792 out regs.
1793
fb71d39e
PA
17942013-09-06 Pedro Alves <palves@redhat.com>
1795
1796 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1797 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1798 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1799 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1800 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1801 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1802
8e7e9910
PA
18032013-09-06 Pedro Alves <palves@redhat.com>
1804
1805 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1806 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1807
7c3a12ca
PA
18082013-09-06 Pedro Alves <palves@redhat.com>
1809
1810 * linux-amd64-ipa.c: Include tracepoint.h.
1811 * linux-i386-ipa.c: Include tracepoint.h.
1812
8eb3d7b6
RW
18132013-09-06 Ricard Wanderlof <ricardw@axis.com>
1814
1815 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1816 (ps_get_thread_area): New function.
1817
eddddb9d
RW
18182013-09-06 Ricard Wanderlof <ricardw@axis.com>
1819
1820 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1821 (initialize_low_arch): Call init_registers_crisv32 rather than
1822 init_register_crisv32.
1823
533b0600
PA
18242013-09-05 Pedro Alves <palves@redhat.com>
1825
1826 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1827 to ...
1828 * hostio.h: ... this new file.
1829 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1830 win32-low.c: Include hostio.h.
1831
0ce3d3b5
PA
18322013-09-05 Pedro Alves <palves@redhat.com>
1833
1834 * server.h (gdb_client_data, handler_func, callback_handler_func)
1835 (delete_file_handler, add_file_handler, append_callback_event)
1836 (delete_callback_event, start_event_loop, initialize_event_loop):
1837 Move to event-loop.h and include it.
1838 * event-loop.h: New file.
1839
799cdc37
PA
18402013-09-05 Pedro Alves <palves@redhat.com>
1841
1842 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1843 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1844 (loaded_dll, unloaded_dll): Move to ...
1845 * dll.h: ... this new file.
1846 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1847
6a6bbd9d
PA
18482013-09-05 Pedro Alves <palves@redhat.com>
1849
1850 * server.h (current_process, get_thread_process, all_processes)
1851 (add_inferior_to_list, for_each_inferior, current_inferior)
1852 (remove_inferior, add_process, remove_process, find_process_pid)
1853 (have_started_inferiors_p, have_attached_inferiors_p)
1854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1855 (clear_inferiors, find_inferior, find_inferior_id)
1856 (inferior_target_data, set_inferior_target_data)
1857 (inferior_regcache_data, set_inferior_regcache_data): Move to
1858 inferiors.h, and include it.
1859 * inferiors.h: New file.
1860
f699aaba
PA
18612013-09-05 Pedro Alves <palves@redhat.com>
1862
1863 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1864 Move ...
1865 * ax.h: ... here.
1866
c144c7a0
PA
18672013-09-05 Pedro Alves <palves@redhat.com>
1868
1869 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1870 tracepoint.h.
1871 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1872 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1873 (handle_tracepoint_general_set, handle_tracepoint_query)
1874 (tracepoint_finished_step, tracepoint_was_hit)
1875 (release_while_stepping_state_list, current_traceframe)
1876 (in_readonly_region, traceframe_read_mem)
1877 (fetch_traceframe_registers, traceframe_read_sdata)
1878 (traceframe_read_info, struct fast_tpoint_collect_status)
1879 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1880 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1881 (supply_fast_tracepoint_registers)
1882 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1883 (ipa_tdesc, claim_trampoline_space)
1884 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1885 (agent_mem_read, agent_get_trace_state_variable_value)
1886 (agent_set_trace_state_variable_value, agent_tsv_read)
1887 (agent_mem_read_string, get_raw_reg_func_addr)
1888 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1889 * tracepoint.h: ... this new file.
1890
ff42e6ab
PA
18912013-09-05 Pedro Alves <palves@redhat.com>
1892
1893 * server.h (perror_with_name, error, fatal, warning, paddress)
1894 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1895 include it.
1896 * utils.h: New file.
1897
541af0f4
PA
18982013-09-05 Pedro Alves <palves@redhat.com>
1899
1900 * server.h (remote_debug, noack_mode, transport_is_reliable)
1901 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1902 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1903 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1904 (write_enn, initialize_async_io, enable_async_io)
1905 (disable_async_io, check_remote_input_interrupt_request)
1906 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1907 (dead_thread_notify, prepare_resume_reply)
1908 (decode_address_to_semicolon, decode_address, decode_m_packet)
1909 (decode_M_packet, decode_X_packet, decode_xfer_write)
1910 (decode_search_memory_packet, unhexify, hexify)
1911 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1912 (look_up_one_symbol, relocate_instruction)
1913 (monitor_output): Move to remote-utils.h, and include it.
1914 * remote-utils.h: New file.
1915
eebdf26b
PA
19162013-09-05 Pedro Alves <palves@redhat.com>
1917
1918 * server.h (_): Delete.
1919
3aafd2ff
PA
19202013-09-02 Pedro Alves <palves@redhat.com>
1921
1922 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1923 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1924 allocated.
1925 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1926
cee83bcb
PM
19272013-09-02 Pierre Muller <muller@sourceware.org>
1928
1929 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1930 or WriteProcessMemory complete successfully and handle
1931 ERROR_PARTIAL_COPY error.
1932
9a13b2fa
PA
19332013-09-02 Pedro Alves <palves@redhat.com>
1934
1935 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1936 error instead of EIO.
1937
602e3198
JK
19382013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1939
1940 PR server/15604
1941 * linux-low.c: Include filestuff.h.
1942 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1943 * lynx-low.c: Include filestuff.h.
1944 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1945 * server.c: Include filestuff.h.
1946 (main): Call notice_open_fds.
1947 * spu-low.c: Include filestuff.h.
1948 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1949
96d7229d
LM
19502013-08-22 Luis Machado <lgustavo@codesourcery.com>
1951
1952 * Makefile.in: Explain why ../target and ../nat are not
1953 listed as include file search paths.
1954 (linux-waitpid.o): New object file rule.
1955 * configure.srv (srv_native_linux_obj): New variable.
1956 Replace all occurrences of linux native object files with
1957 $srv_native_linux_obj.
1958 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1959 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1960 (linux_enable_event_reporting): Remove declaration.
1961 (my_waitpid): Moved to common/linux-waitpid.c.
1962 (linux_wait_for_event): Pass ptid when calling
1963 linux_enable_event_reporting.
1964 (linux_supports_tracefork_flag): Remove.
1965 (linux_enable_event_reporting): Likewise.
1966 (linux_tracefork_grandchild): Remove.
1967 (STACK_SIZE): Moved to common/linux-ptrace.c.
1968 (linux_tracefork_child): Remove.
1969 (linux_test_for_tracefork): Remove.
1970 (linux_look_up_symbols): Call linux_supports_traceclone.
1971 (initialize_low): Remove call to linux_test_for_tracefork.
1972 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1973 common/linux-ptrace.h.
1974 (PTRACE_TYPE_ARG4): Likewise.
1975 Include linux-ptrace.h.
1976
32940073
PA
19772013-08-21 Pedro Alves <palves@redhat.com>
1978
1979 * config.in: Renegerate.
1980
33b60d58 19812013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1982
33b60d58
LM
1983 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1984 (SFILES): Remove $(srcdir)/common/target-common.c and
1985 add $(srcdir)/target/waitstatus.c.
1986 (OBS): Remove target-common.o and add waitstatus.o.
1987 (server_h): Remove $(srcdir)/../common/target-common.h and
1988 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1989 and $(srcdir)/../target/waitstatus.h.
1990 (target-common.o): Remove.
1991 (waitstatus.o): New target object file.
1992 * target.h: Do not include target-common.h and
1993 include target/resume.h, target/wait.h and
1994 target/waitstatus.h.
1995
b8e1b30e
LM
19962013-08-13 Luis Machado <lgustavo@codesourcery.com>
1997
1998 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1999 to PTRACE_TYPE_ARG3.
2000 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2001 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2002 PTRACE_TYPE_ARG4.
2003 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2004 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2005
7a60ad40
YQ
20062013-07-27 Jie Zhang <jie@codesourcery.com>
2007 Daniel Jacobowitz <dan@codesourcery.com>
2008 Yao Qi <yao@codesourcery.com>
2009
2010 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2011 (mips-linux-watch.o): New rule.
2012 (mips_linux_watch_h): New variable.
2013 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2014 srv_tgtobj.
2015 * linux-mips-low.c: Include mips-linux-watch.h.
2016 (struct arch_process_info, struct arch_lwp_info): New.
2017 (update_watch_registers_callback): New function.
2018 (mips_linux_new_process, mips_linux_new_thread) New functions.
2019 (mips_linux_prepare_to_resume, mips_insert_point): New
2020 functions.
2021 (mips_remove_point, mips_stopped_by_watchpoint): New
2022 functions.
2023 (rsp_bp_type_to_target_hw_bp_type): New function.
2024 (mips_stopped_data_address): New function.
2025 (the_low_target): Add watchpoint support functions.
2026
de6f69ad
YQ
20272013-07-27 Yao Qi <yao@codesourcery.com>
2028
2029 * i386-low.c: Include break-common.h.
2030 (enum target_hw_bp_type): Remove.
2031
3360c0bf
LM
20322013-07-24 Luis Machado <lgustavo@codesourcery.com>
2033
2034 * Makefile.in (SFILES): /common/target-common.c.
2035 (OBS): Add target-common.o.
2036 (server_h): Add $(srcdir)/../common/target-common.h.
2037 (target-common.o): New target.
2038 * server.c (queue_stop_reply_callback): Free
2039 status string after use.
2040 * target.c (target_waitstatus_to_string): Remove.
2041 * target.h: Include target-common.h.
2042 (resume_kind): Likewise.
2043 (target_waitkind): Likewise.
2044 (target_waitstatus): Likewise.
2045 (TARGET_WNOHANG): Likewise.
2046
bd885420
YQ
20472013-07-04 Yao Qi <yao@codesourcery.com>
2048
2049 * Makefile.in (host_alias): Use @host_noncanonical@.
2050 (target_alias): Use @target_noncanonical@.
2051 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2052 ACX_NONCANONICAL_HOST.
2053 * configure: Regenerated.
2054
2055 Revert:
2056 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2057
2058 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2059 * configure: Rebuild.
2060 * Makefile.in (version_host, version_target): Get from configure.
2061 (version.c): Use $(version_host) and $(version_target).
2062
17ef446e
PA
20632013-07-03 Pedro Alves <palves@redhat.com>
2064
2065 * Makefile.in (config.status): Depend on development.sh.
2066 * acinclude.m4: Include libmcheck.m4.
2067 * configure: Regenerate.
2068
7a9a7487
MG
20692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2070
2071 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2072 attribute inside the parentheses.
2073 (winapi_DebugSetProcessKillOnExit): Ditto.
2074 (winapi_DebugBreakProcess): Ditto.
2075 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2076
49b64de6
MG
20772013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2078
2079 * notif.h (notif_event): Add a dummy member to avoid compiler
2080 errors.
2081
d5749ee7
PA
20822013-07-01 Pedro Alves <palves@redhat.com>
2083
2084 * hostio.c (HOSTIO_PATH_MAX): Define.
2085 (require_filename, handle_open, handle_unlink, handle_readlink):
2086 Use it.
2087
d8d2a3ee
PA
20882013-07-01 Pedro Alves <palves@redhat.com>
2089
2090 * server.h: Include "pathmax.h".
2091 * linux-low.c: Don't include sys/param.h.
2092 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2093 MAXPATHLEN.
2094 * win32-low.c: Don't include sys/param.h.
2095 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2096
bc7dea8d
PA
20972013-07-01 Pedro Alves <palves@redhat.com>
2098
2099 * event-loop.c: Don't check HAVE_UNISTD_H before including
2100 <unistd.h>.
2101 * gdbreplay.c: Likewise.
2102 * remote-utils.c: Likewise.
2103 * server.c: Likewise.
2104 * configure.ac: Don't check for unistd.h.
2105 * configure: Regenerate.
2106
d6c2da54
TT
21072013-06-28 Tom Tromey <tromey@redhat.com>
2108
2109 * Makefile.in (version.c): Use version.in, not
2110 common/version.in.
2111
257b6bec
MG
21122013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2113
2114 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2115 * configure: Rebuild.
2116 * Makefile.in (version_host, version_target): Get from configure.
2117 (version.c): Use $(version_host) and $(version_target).
2118
86ebe149
DK
21192013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2120
2121 Fix trace-status to output user name without trailing colon.
2122 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2123
f30aa5af
DK
21242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2125
2126 Fix trace-status to output proper start-time and stop-time.
2127 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2128 output start time and stop time in hex as gdb expects.
2129
28a93511
YQ
21302013-06-26 Pedro Alves <pedro@codesourcery.com>
2131
2132 * tracepoint.c (build_traceframe_info_xml): Output trace state
2133 variables present in the trace buffer.
2134
01208463
TT
21352013-06-24 Tom Tromey <tromey@redhat.com>
2136
2137 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2138 create-version.sh.
2139 (version.o): Remove.
2140 * gdbreplay.c: Include version.h.
2141 (version, host_name): Don't declare.
2142 * server.h: Include version.h.
2143 (version, host_name): Don't declare.
2144
760256f9
PA
21452013-06-12 Pedro Alves <palves@redhat.com>
2146
2147 * linux-x86-low.c (linux_is_elf64): Delete global.
2148 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2149 with local linux_pid_exe_is_elf_64_file use.
2150
030031ee
PA
21512013-06-11 Pedro Alves <palves@redhat.com>
2152
2153 * linux-low.c (regset_disabled, disable_regset): New functions.
2154 (regsets_fetch_inferior_registers)
2155 (regsets_store_inferior_registers): Use them.
2156 (initialize_regsets_info); Don't allocate the disabled_regsets
2157 array here.
2158 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2159 comment.
2160
5da6eb0a
PA
21612013-06-11 Pedro Alves <palves@redhat.com>
2162
2163 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2164 xmalloc.
2165
7e5aaa09
PA
21662013-06-11 Pedro Alves <palves@redhat.com>
2167
2168 * linux-x86-low.c (initialize_low_arch): Call
2169 init_registers_x32_avx_linux.
2170
d878444c
JK
21712013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2172
2173 Fix compatibility with Android Bionic.
2174 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2175 it is not empty.
2176
3aee8918
PA
21772013-06-07 Pedro Alves <palves@redhat.com>
2178
5f2b57b5 2179 PR server/14823
3aee8918
PA
2180 * Makefile.in (OBS): Add tdesc.o.
2181 (IPA_OBJS): Add tdesc-ipa.o.
2182 (tdesc-ipa.o): New rule.
2183 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2184 interface.
2185 * linux-low.c (new_inferior): Delete.
2186 (disabled_regsets, num_regsets): Delete.
2187 (linux_add_process): Adjust to set the new per-process
2188 new_inferior flag.
2189 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2190 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2191 was a stop. When calling arch_setup, switch the current inferior
2192 to the thread that got an event.
2193 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2194 (regsets_fetch_inferior_registers)
2195 (regsets_store_inferior_registers): New regsets_info parameter.
2196 Adjust to use it.
2197 (linux_register_in_regsets): New regs_info parameter. Adjust to
2198 use it.
2199 (register_addr, fetch_register, store_register): New usrregs_info
2200 parameter. Adjust to use it.
2201 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2202 parameter regs_info. Adjust to use it.
2203 (linux_fetch_registers): Get the current inferior's regs_info, and
2204 adjust to use it.
2205 (linux_store_registers): Ditto.
2206 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2207 (initialize_low): Don't initialize the target_regsets here. Call
2208 initialize_low_arch.
2209 * linux-low.h (target_regsets): Delete declaration.
2210 (struct regsets_info): New.
2211 (struct usrregs_info): New.
2212 (struct regs_info): New.
2213 (struct process_info_private) <new_inferior>: New field.
2214 (struct linux_target_ops): Delete the num_regs, regmap, and
2215 regset_bitmap fields. New field regs_info.
2216 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2217 * i387-fp.c (num_xmm_registers): Delete.
2218 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2219 calls to new interface.
2220 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2221 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2222 Infer the number of xmm registers from the regcache's target
2223 description.
2224 * i387-fp.h (num_xmm_registers): Delete.
2225 * inferiors.c (add_thread): Don't install the thread's regcache
2226 here.
2227 * proc-service.c (gregset_info): Fetch the current inferior's
2228 regs_info. Adjust to use it.
2229 * regcache.c: Include tdesc.h.
2230 (register_bytes, reg_defs, num_registers)
2231 (gdbserver_expedite_regs): Delete.
2232 (get_thread_regcache): If the thread doesn't have a regcache yet,
2233 create one, instead of aborting gdbserver.
2234 (regcache_invalidate_one): Rename to ...
2235 (regcache_invalidate_thread): ... this.
2236 (regcache_invalidate_one): New.
2237 (regcache_invalidate): Only invalidate registers of the current
2238 process.
2239 (init_register_cache): Add target_desc parameter, and use it.
2240 (new_register_cache): Ditto. Assert the target description has a
2241 non zero registers_size.
2242 (regcache_cpy): Add assertions. Adjust.
2243 (realloc_register_cache, set_register_cache): Delete.
2244 (registers_to_string, registers_from_string): Adjust.
2245 (find_register_by_name, find_regno, find_register_by_number)
2246 (register_cache_size): Add target_desc parameter, and use it.
2247 (free_register_cache_thread, free_register_cache_thread_one)
2248 (regcache_release, register_cache_size): New.
2249 (register_size): Add target_desc parameter, and use it.
2250 (register_data, supply_register, supply_register_zeroed)
2251 (supply_regblock, supply_register_by_name, collect_register)
2252 (collect_register_as_string, collect_register_by_name): Adjust.
2253 * regcache.h (struct target_desc): Forward declare.
2254 (struct regcache) <tdesc>: New field.
2255 (init_register_cache, new_register_cache): Add target_desc
2256 parameter.
2257 (regcache_invalidate_thread): Declare.
2258 (regcache_invalidate_one): Delete declaration.
2259 (regcache_release): Declare.
2260 (find_register_by_number, register_cache_size, register_size)
2261 (find_regno): Add target_desc parameter.
2262 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2263 declarations.
2264 * remote-utils.c: Include tdesc.h.
2265 (outreg, prepare_resume_reply): Adjust.
2266 * server.c: Include tdesc.h.
2267 (gdbserver_xmltarget): Delete declaration.
2268 (get_features_xml, process_serial_event): Adjust.
2269 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2270 declare.
2271 (struct process_info) <tdesc>: New field.
2272 (ipa_tdesc): Declare.
2273 * tdesc.c: New file.
2274 * tdesc.h: New file.
2275 * tracepoint.c: Include tdesc.h.
2276 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2277 (get_context_regcache): Adjust to pass ipa_tdesc down.
2278 (do_action_at_tracepoint): Adjust to get the register cache size
2279 from the context regcache's description.
2280 (traceframe_walk_blocks): Adjust to get the register cache size
2281 from the current trace frame's description.
2282 (traceframe_get_pc): Adjust to get current trace frame's
2283 description and pass it down.
2284 (gdb_collect): Adjust to get the register cache size from the
2285 IPA's description.
2286 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2287 (gdbserver_xmltarget): Delete.
2288 (initialize_low_tracepoint): Set the ipa's target description.
2289 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2290 (initialize_low_tracepoint): Set the ipa's target description.
2291 * linux-x86-low.c: Include tdesc.h.
2292 [__x86_64__] (is_64bit_tdesc): New.
2293 (ps_get_thread_area, x86_get_thread_area): Use it.
2294 (i386_cannot_store_register): Rename to ...
2295 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2296 (i386_cannot_fetch_register): Rename to ...
2297 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2298 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2299 to new interface.
2300 (target_regsets): Rename to ...
2301 (x86_regsets): ... this.
2302 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2303 interface.
2304 (x86_siginfo_fixup): Use is_64bit_tdesc.
2305 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2306 (tdesc_x32_avx_linux, tdesc_x32_linux)
2307 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2308 Declare.
2309 (x86_linux_update_xmltarget): Delete.
2310 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2311 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2312 (AMD64_LINUX_USER64_CS): New.
2313 (x86_linux_read_description): New, based on
2314 x86_linux_update_xmltarget.
2315 (same_process_callback): New.
2316 (x86_arch_setup_process_callback): New.
2317 (x86_linux_update_xmltarget): New.
2318 (x86_regsets_info): New.
2319 (amd64_linux_regs_info): New.
2320 (i386_linux_usrregs_info): New.
2321 (i386_linux_regs_info): New.
2322 (x86_linux_regs_info): New.
2323 (x86_arch_setup): Reimplement.
2324 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2325 (x86_emit_ops): Ditto.
2326 (the_low_target): Adjust. Install x86_linux_regs_info,
2327 x86_cannot_fetch_register, and x86_cannot_store_register.
2328 (initialize_low_arch): New.
2329 * linux-ia64-low.c (tdesc_ia64): Declare.
2330 (ia64_fetch_register): Adjust.
2331 (ia64_usrregs_info, regs_info): New globals.
2332 (ia64_regs_info): New function.
2333 (the_low_target): Adjust.
2334 (initialize_low_arch): New function.
2335 * linux-sparc-low.c (tdesc_sparc64): Declare.
2336 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2337 Adjust.
2338 (sparc_arch_setup): New function.
2339 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2340 (the_low_target): Adjust.
2341 (initialize_low_arch): New function.
2342 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2343 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2344 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2345 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2346 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2347 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2348 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2349 (tdesc_powerpc_isa205_vsx64l): Declare.
2350 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2351 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2352 (ppc_set_pc, ppc_get_hwcap): Adjust.
2353 (ppc_usrregs_info): Forward declare.
2354 (!__powerpc64__) ppc_regmap_adjusted: New global.
2355 (ppc_arch_setup): Adjust to the current process'es target
2356 description.
2357 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2358 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2359 (ppc_store_evrregset): Adjust.
2360 (target_regsets): Rename to ...
2361 (ppc_regsets): ... this, and make static.
2362 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2363 (ppc_regs_info): New function.
2364 (the_low_target): Adjust.
2365 (initialize_low_arch): New function.
2366 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2367 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2368 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2369 (tdesc_s390x_linux64v2): Declare.
2370 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2371 (s390_fill_gregset, s390_store_last_break): Adjust.
2372 (target_regsets): Rename to ...
2373 (s390_regsets): ... this, and make static.
2374 (s390_get_pc, s390_set_pc): Adjust.
2375 (s390_get_hwcap): New target_desc parameter, and use it.
2376 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2377 (s390_arch_setup): Adjust to set the current process'es target
2378 description. Don't adjust the regmap.
2379 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2380 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2381 (regs_info_3264): New globals.
2382 (s390_regs_info): New function.
2383 (the_low_target): Adjust.
2384 (initialize_low_arch): New function.
2385 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2386 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2387 [__mips64] (init_registers_mips_linux)
2388 (init_registers_mips_dsp_linux): Delete defines.
2389 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2390 (have_dsp): New global.
2391 (mips_read_description): New, based on mips_arch_setup.
2392 (mips_arch_setup): Reimplement.
2393 (get_usrregs_info): New function.
2394 (mips_cannot_fetch_register, mips_cannot_store_register)
2395 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2396 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2397 (target_regsets): Rename to ...
2398 (mips_regsets): ... this, and make static.
2399 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2400 (dsp_regs_info, regs_info): New globals.
2401 (mips_regs_info): New function.
2402 (the_low_target): Adjust.
2403 (initialize_low_arch): New function.
2404 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2405 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2406 Declare.
2407 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2408 (arm_read_description): New, with bits factored from
2409 arm_arch_setup.
2410 (arm_arch_setup): Reimplement.
2411 (target_regsets): Rename to ...
2412 (arm_regsets): ... this, and make static.
2413 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2414 (arm_regs_info): New function.
2415 (the_low_target): Adjust.
2416 (initialize_low_arch): New function.
2417 * linux-m68k-low.c (tdesc_m68k): Declare.
2418 (target_regsets): Rename to ...
2419 (m68k_regsets): ... this, and make static.
2420 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2421 (m68k_regs_info): New function.
2422 (m68k_arch_setup): New function.
2423 (the_low_target): Adjust.
2424 (initialize_low_arch): New function.
2425 * linux-sh-low.c (tdesc_sharch): Declare.
2426 (target_regsets): Rename to ...
2427 (sh_regsets): ... this, and make static.
2428 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2429 (sh_regs_info, sh_arch_setup): New functions.
2430 (the_low_target): Adjust.
2431 (initialize_low_arch): New function.
2432 * linux-bfin-low.c (tdesc_bfin): Declare.
2433 (bfin_arch_setup): New function.
2434 (bfin_usrregs_info, regs_info): New globals.
2435 (bfin_regs_info): New function.
2436 (the_low_target): Adjust.
2437 (initialize_low_arch): New function.
2438 * linux-cris-low.c (tdesc_cris): Declare.
2439 (cris_arch_setup): New function.
2440 (cris_usrregs_info, regs_info): New globals.
2441 (cris_regs_info): New function.
2442 (the_low_target): Adjust.
2443 (initialize_low_arch): New function.
2444 * linux-cris-low.c (tdesc_crisv32): Declare.
2445 (cris_arch_setup): New function.
2446 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2447 (cris_regs_info): New function.
2448 (the_low_target): Adjust.
2449 (initialize_low_arch): New function.
2450 * linux-m32r-low.c (tdesc_m32r): Declare.
2451 (m32r_arch_setup): New function.
2452 (m32r_usrregs_info, regs_info): New globals.
2453 (m32r_regs_info): Adjust.
2454 (initialize_low_arch): New function.
2455 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2456 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2457 (tic6x_usrregs_info): Forward declare.
2458 (tic6x_read_description): New function, based on ...
2459 (tic6x_arch_setup): ... this. Reimplement.
2460 (target_regsets): Rename to ...
2461 (tic6x_regsets): ... this, and make static.
2462 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2463 (tic6x_regs_info): New function.
2464 (the_low_target): Adjust.
2465 (initialize_low_arch): New function.
2466 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2467 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2468 (target_regsets): Rename to ...
2469 (xtensa_regsets): ... this, and make static.
2470 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2471 globals.
2472 (xtensa_arch_setup, xtensa_regs_info): New functions.
2473 (the_low_target): Adjust.
2474 (initialize_low_arch): New function.
2475 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2476 (nios2_arch_setup): Set the current process'es tdesc.
2477 (target_regsets): Rename to ...
2478 (nios2_regsets): ... this.
2479 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2480 (nios2_regs_info): New function.
2481 (the_low_target): Adjust.
2482 (initialize_low_arch): New function.
a261b8f5
PA
2483 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2484 (aarch64_arch_setup): Set the current process'es tdesc.
2485 (target_regsets): Rename to ...
2486 (aarch64_regsets): ... this.
2487 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2488 (aarch64_regs_info): New function.
2489 (the_low_target): Adjust.
2490 (initialize_low_arch): New function.
3aee8918
PA
2491 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2492 globals.
2493 (target_regsets): Rename to ...
2494 (tile_regsets): ... this.
2495 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2496 (tile_regs_info): New function.
2497 (tile_arch_setup): Set the current process'es tdesc.
2498 (the_low_target): Adjust.
2499 (initialize_low_arch): New function.
2500 * spu-low.c (tdesc_spu): Declare.
2501 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2502 * win32-arm-low.c (tdesc_arm): Declare.
2503 (arm_arch_setup): New function.
2504 (the_low_target): Install arm_arch_setup instead of
2505 init_registers_arm.
2506 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2507 (init_windows_x86): Rename to ...
2508 (i386_arch_setup): ... this. Set `win32_tdesc'.
2509 (the_low_target): Adjust.
2510 * win32-low.c (win32_tdesc): New global.
2511 (child_add_thread): Don't create the thread cache here.
2512 (do_initial_child_stuff): Set the new process'es tdesc.
2513 * win32-low.h (struct target_desc): Forward declare.
2514 (win32_tdesc): Declare.
2515 * lynx-i386-low.c (tdesc_i386): Declare global.
2516 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2517 * lynx-low.c (lynx_tdesc): New global.
2518 (lynx_add_process): Set the new process'es tdesc.
2519 * lynx-low.h (struct target_desc): Forward declare.
2520 (lynx_tdesc): Declare global.
2521 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2522 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2523 * nto-low.c (nto_tdesc): New global.
2524 (do_attach): Set the new process'es tdesc.
2525 * nto-low.h (struct target_desc): Forward declare.
2526 (nto_tdesc): Declare.
2527 * nto-x86-low.c (tdesc_i386): Declare.
2528 (nto_x86_arch_setup): Set `nto_tdesc'.
2529
b1fbec62
GB
25302013-06-04 Gary Benson <gbenson@redhat.com>
2531
2532 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2533 to qSupported response when appropriate.
2534 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2535 with nonzero-length annex.
2536 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2537 arguments supplied in annex.
2538
d1ec4ce7
DE
25392013-05-31 Doug Evans <dje@google.com>
2540
ac44adcb 2541 PR server/15594
d1ec4ce7
DE
2542 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2543 64 bits in 64-cross-32 environment.
2544
9b25f2d3
PA
25452013-05-28 Pedro Alves <palves@redhat.com>
2546
2547 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2548 (aarch64-without-fpu.c): Delete rule.
2549 * configure.srv (aarch64*-*-linux*): Remove references to
2550 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2551 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2552 declaration.
2553
6740dc9c
PA
25542013-05-24 Pedro Alves <palves@redhat.com>
2555
2556 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2557 instead of strchr/decode_address. Error if the range isn't split
2558 with a ','. Don't assume there's be a ':' in the action.
2559
c2d6af84
PA
25602013-05-23 Yao Qi <yao@codesourcery.com>
2561 Pedro Alves <palves@redhat.com>
2562
2563 * linux-low.c (lwp_in_step_range): New function.
2564 (linux_wait_1): If the thread was range stepping and stopped
2565 outside the stepping range, report the stop to GDB. Otherwise,
2566 continue stepping. Add range stepping debug output.
2567 (linux_set_resume_request): Copy the step range from the resume
2568 request to the lwp.
2569 (linux_supports_range_stepping): New.
2570 (linux_target_ops) <supports_range_stepping>: Set to
2571 linux_supports_range_stepping.
2572 * linux-low.h (struct linux_target_ops)
2573 <supports_range_stepping>: New field.
2574 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2575 * linux-x86-low.c (x86_supports_range_stepping): New.
2576 (the_low_target) <supports_range_stepping>: Set to
2577 x86_supports_range_stepping.
2578 * server.c (handle_v_cont): Handle 'r' action.
2579 (handle_v_requests): Append ";r" if the target supports range
2580 stepping.
2581 * target.h (struct thread_resume) <step_range_start,
2582 step_range_end>: New fields.
2583 (struct target_ops) <supports_range_stepping>:
2584 New field.
2585 (target_supports_range_stepping): New macro.
2586
58794e1a
JB
25872013-05-17 Joel Brobecker <brobecker@adacore.com>
2588
2589 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2590 confusion in comment.
2591
d631c5a7
JB
25922013-05-17 Joel Brobecker <brobecker@adacore.com>
2593
2594 * lynx-low.c (struct process_info_private): New type.
2595 (lynx_add_process): New function.
2596 (lynx_create_inferior, lynx_attach): Replace calls to
2597 add_process by calls to lynx_add_process.
2598 (lynx_resume): If PTID is null, then try using
2599 current_process()->private->last_wait_event_ptid.
2600 Add comments.
2601 (lynx_clear_inferiors): Delete. The contents of that function
2602 has been inlined in lynx_mourn;
2603 (lynx_wait_1): Save the ptid in the process's private data.
2604 (lynx_mourn): Free the process' private data. Replace call
2605 to lynx_clear_inferiors by call to clear_inferiors.
2606
96f7a20f
YQ
26072013-05-17 Yao Qi <yao@codesourcery.com>
2608
2609 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2610 the right place.
2611
db0dfaa0
LM
26122013-05-16 Luis Machado <lgustavo@codesourcery.com>
2613
2614 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2615 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2616 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2617 PT_TEXT_END_ADDR guards. Update comments.
2618 (linux_target_op) <read_offsets>: Conditionally define to
2619 linux_read_offsets if the target is UCLIBC and if it defines
2620 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2621
68f5f838
SL
26222013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2623 Andrew Jenner <andrew@codesourcery.com>
2624
2625 * Makefile.in (SFILES): Add linux-nios2-low.c.
2626 (clean): Add action to delete nios2-linux.c.
2627 (nios2-linux.c): New rule.
2628 * configure.srv: Add nios2*-*-linux*.
2629 * linux-nios2-low.c: New.
2630
1ebff1fd
HAQ
26312013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2632
2633 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2634
f6150862
HZ
26352013-04-25 Hui Zhu <hui@codesourcery.com>
2636
2637 PR gdb/15186
f6150862
HZ
2638 * ax.c (ax_printf): Add fflush.
2639
614c279d
TT
26402013-04-22 Tom Tromey <tromey@redhat.com>
2641
2642 * Makefile.in (SFILES): Add filestuff.c.
2643 (OBS): Add filestuff.o.
2644 (filestuff.o): New target.
2645 * config.in, configure: Rebuild.
2646 * configure.ac: Check for fdwalk, pipe2.
2647
7d4e5717
PA
26482013-04-17 Pedro Alves <palves@redhat.com>
2649
2650 * configure.ac (USE_THREAD_DB): Delete variable.
2651 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2652 Don't AC_SUBST USE_THREAD_DB.
2653 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2654 * config.in, configure: Regenerate.
2655
d5c93e41
PA
26562013-04-16 Pedro Alves <palves@redhat.com>
2657
2658 * linux-low.h (struct lwp_info) <thread_known>: Move under
2659 the USE_THREAD_DB #ifdef.
2660
04f5fe89
PA
26612013-04-16 Pedro Alves <palves@redhat.com>
2662
2663 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2664 (linux-low.o): Delete rule.
2665 * linux-low.h: Always include "gdb_thread_db.h" instead of
2666 conditionally including thread_db.h.
2667 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2668 HAVE_THREAD_DB_H.
2669
480b27bf
JK
26702013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2671
2672 * Makefile.in (install-only): Fix make install regression.
2673
43662968
JK
26742013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2675
2676 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2677 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2678 installation.
2679 * gdbserver.1: Remove.
2680
3e74e146
PA
26812013-03-22 Pedro Alves <palves@redhat.com>
2682
2683 * linux-low.c (handle_extended_wait): Don't call
2684 linux_enable_event_reporting.
2685
a8347a2a
TT
26862013-03-15 Tony Theodore <tonyt@logyst.com>
2687
2688 PR build/9098:
2689 * Makefile.in (SHELL): Use @SHELL@.
2690
eeb56fa7
SDJ
26912013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2692
2693 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2694 compiler warning.
2695
4fa7e2ff
JB
26962013-03-13 Joel Brobecker <brobecker@adacore.com>
2697
2698 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2699 Remove extraneous NULL element.
2700
8ddb1965
YQ
27012013-03-13 Yao Qi <yao@codesourcery.com>
2702
2703 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2704 'V' block in trace frame.
2705
9accd112
MM
27062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2707
2708 * target.h (struct target_ops): Add btrace ops.
2709 (target_supports_btrace): New macro.
2710 (target_enable_btrace): New macro.
2711 (target_disable_btrace): New macro.
2712 (target_read_btrace): New macro.
2713 * gdbthread.h (struct thread_info): Add btrace field.
2714 * server.c: Include btrace-common.h.
2715 (handle_btrace_general_set): New function.
2716 (handle_btrace_enable): New function.
2717 (handle_btrace_disable): New function.
2718 (handle_general_set): Call handle_btrace_general_set.
2719 (handle_qxfer_btrace): New function.
2720 (struct qxfer qxfer_packets[]): Add btrace entry.
2721 * inferiors.c (remove_thread): Disable btrace.
2722 * linux-low: Include linux-btrace.h.
2723 (linux_low_enable_btrace): New function.
2724 (linux_low_read_btrace): New function.
2725 (linux_target_ops): Add btrace ops.
2726 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2727 Add srv_linux_btrace=yes.
2728 (x86_64-*-linux*): Add linux-btrace.o.
2729 Add srv_linux_btrace=yes.
2730 * configure.ac: Define HAVE_LINUX_BTRACE.
2731 * config.in: Regenerated.
2732 * configure: Regenerated.
2733
5cc22e4c
MM
27342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2735
2736 * server.c (handle_qxfer): Preserve error message if -3 is
2737 returned.
2738 (qxfer): Document the -3 return value.
2739
7c97f91e
MM
27402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2741
2742 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2743 (linux_btrace_h): New variable.
2744 (linux-btrace.o): New rule.
2745
be9a119c 27462013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2747 Hafiz Abid Qadeer <abidh@codesourcery.com>
2748
2749 * tracepoint.c (trace_buffer_size): New global.
2750 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2751 (init_trace_buffer): Change to one-argument function. Allocate
2752 trace buffer memory.
2753 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2754 handle QTBuffer:size packet.
2755 (cmd_bigqtbuffer_size): New function.
2756 (initialize_tracepoint): Call init_trace_buffer with
2757 DEFAULT_TRACE_BUFFER_SIZE.
2758 * server.c (handle_query): Add QTBuffer:size in the
2759 supported packets.
2760
e64f7499
YQ
27612013-03-07 Yao Qi <yao@codesourcery.com>
2762
2763 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2764 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2765 of -1.
2766 (cmd_qtsp): Adjust condition. Do post increment.
2767 Set cur_action and cur_step_action back to 0.
2768
f0ae6fc3
PA
27692013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2770
2771 PR server/15236
2772 * linux-low.c (linux_write_memory): Return early success if LEN is
2773 zero.
2774
b5b0b0af
CV
27752013-03-05 Corinna Vinschen <vinschen@redhat.de>
2776
334ad4a8 2777 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2778
589bc927
TT
27792013-02-28 Tom Tromey <tromey@redhat.com>
2780
2781 * configure.ac: Invoke AC_SYS_LARGEFILE.
2782 * configure, config.in: Rebuild.
2783
dfe07582
CV
27842013-02-28 Corinna Vinschen <vinschen@redhat.com>
2785
2786 * win32-low.c: Throughout, fix format strings and casts of
2787 printf-like functions to avoid type related warnings on all
2788 platforms.
2789 (get_child_debug_event): Print dwDebugEventCode as hex since
2790 that's how it's usually documented.
2791
736cd585
YQ
27922013-02-28 Yao Qi <yao@codesourcery.com>
2793
2794 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2795 pulongest.
2796
e1f58301
JW
27972013-02-27 Jiong Wang <jiwang@tilera.com>
2798
2799 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2800 (reg-tilegx32.c): New rule.
2801 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2802 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2803 different register info initializer according to elf class.
2804 (init_registers_tilgx32): New function. The tilegx32 register info
2805 initializer.
2806 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2807 (tile_store_gregset): Likewise.
2808
d171ca78
YQ
28092013-02-27 Yao Qi <yao@codesourcery.com>
2810
2811 * server.c (process_point_options): Print debug message when
2812 debug_threads is true.
2813
282bbdf3
YQ
28142013-02-26 Yao Qi <yao@codesourcery.com>
2815
2816 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2817
aca22551
PA
28182013-02-19 Pedro Alves <palves@redhat.com>
2819 Kai Tietz <ktietz@redhat.com>
2820
2821 PR gdb/15161
2822
2823 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2824 instead of strtoul to extract address from packet.
2825 (process_serial_event) <'z'>: Likewise.
2826
4f3cee1c
YQ
28272013-02-18 Yao Qi <yao@codesourcery.com>
2828
2829 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2830
8e1d55a3
PA
28312013-02-14 Pedro Alves <palves@redhat.com>
2832
2833 Plug memory leak.
2834
2835 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2836 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2837
458820da
PA
28382013-02-14 Pedro Alves <palves@redhat.com>
2839
2840 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2841
baea0dae
PA
28422013-02-14 Pedro Alves <palves@redhat.com>
2843
2844 * tracepoint.c (save_string): Delete.
2845 (add_tracepoint_action): Use savestring instead of save_string.
2846
0b1afbb3
PA
28472013-02-12 Pedro Alves <palves@redhat.com>
2848
2849 * linux-xtensa-low.c: Ditto.
2850 * xtensa-xtregs.c: Ditto.
2851
8a4ac37e
PA
28522013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2853
2854 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2855 thread_db.
2856
148de6bb
MS
28572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2858
2859 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2860 aarch64_num_wp_regs and aarch64_num_bp_regs to
2861 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2862
55fac6e0
MS
28632013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2864
2865 * linux-aarch64-low.c (ps_get_thread_area): Replace
2866 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2867
176eb98c
MS
28682013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2869 Marcus Shawcroft <marcus.shawcroft@arm.com>
2870 Nigel Stephens <nigel.stephens@arm.com>
2871 Yufeng Zhang <yufeng.zhang@arm.com>
2872
2873 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2874 (aarch64.c, aarch64-without-fpu.c): New targets.
2875 * configure.srv (aarch64*-*-linux*): New.
2876 * linux-aarch64-low.c: New file.
2877
56f7af9c
MS
28782013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2879
43aaf8b6 2880 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2881 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2882 (dequeue_one_deferred_signal, linux_resume_one_thread)
2883 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2884 (linux_tracefork_grandchild, linux_test_for_tracefork)
2885 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2886 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2887 where the argument is 0.
2888
60f662b0
YQ
28892013-01-25 Yao Qi <yao@codesourcery.com>
2890
2891 * event-loop.c: Include "queue.h".
2892 (gdb_event_p): New typedef.
2893 (struct gdb_event) <next_event>: Remove.
2894 (event_queue): Change to QUEUE(gdb_event_p).
2895 (async_queue_event): Remove.
2896 (gdb_event_xfree): New.
2897 (initialize_event_loop): New.
2898 (process_event): Use API from QUEUE.
2899 (wait_for_event): Likewise.
2900 * server.c (main): Call initialize_event_loop.
2901 * server.h (initialize_event_loop): Declare.
2902
5ae4861a
YQ
29032013-01-18 Yao Qi <yao@codesourcery.com>
2904
2905 * ax.h (struct eval_agent_expr_context): New.
2906 (gdb_eval_agent_expr): Update declaration.
2907 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2908 TFRAME. Add new argument CTX.
2909 * server.h (struct eval_agent_expr_context): Declare.
2910 (agent_mem_read, agent_tsv_read): Update declaration.
2911 (agent_mem_read_string): Likewise.
2912 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2913 (add_traceframe_block): Add new argument TPOINT.
2914 Increase TPOINT->traceframe_usage.
2915 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2916 eval_tracepoint_agent_expr.
2917 (condition_true_at_tracepoint): Likewise.
2918 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2919 (agent_mem_read_string, agent_tsv_read): Likewise.
2920
85e00e85
YQ
29212013-01-16 Yao Qi <yao@codesourcery.com>
2922
2923 * linux-low.c (linux_resume_one_lwp): Don't check
2924 'lwp->bp_reinsert != 0'.
2925
4039cf45
JB
29262013-01-07 Joel Brobecker <brobecker@adacore.com>
2927 Pedro Alves <palves@redhat.com>
2928
2929 * lynx-low.c (ptrace_request_to_str): Define a temporary
2930 macro and use it to simplify this function's implementation.
2931
9044dee2
JB
29322013-01-07 Joel Brobecker <brobecker@adacore.com>
2933
2934 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2935 sets errno.
2936
e6352c8f
JB
29372013-01-07 Joel Brobecker <brobecker@adacore.com>
2938
2939 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2940
50681a27
JB
29412013-01-07 Joel Brobecker <brobecker@adacore.com>
2942
2943 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2944
3f6e77ef
JB
29452013-01-07 Joel Brobecker <brobecker@adacore.com>
2946
2947 * lynx-low.c (lynx_resume): Use the resume_info parameter
2948 to determine the ptid for the lynx_ptrace call, unless
2949 it is equal to minus_one_ptid, in which case we use the
2950 ptid of the current_inferior.
2951 (lynx_wait_1): After having received a thread create/exit
2952 event, resume the inferior's execution using the signaling
2953 thread's ptid, rather than the old ptid.
2954
7fda33ae
JB
29552013-01-07 Joel Brobecker <brobecker@adacore.com>
2956
2957 * lynx-low.c (lynx_resume): Delete variable ret.
2958
b9786c74
JB
29592013-01-01 Joel Brobecker <brobecker@adacore.com>
2960
2961 * gdbreplay.c (gdbreplay_version): Update copyright year.
2962 * server.c (gdbserver_version): Likewise.
2963
8b93d60f
JB
29642012-12-17 Joel Brobecker <brobecker@adacore.com>
2965
2966 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2967 new thread.
2968
037335a7
JB
29692012-12-17 Joel Brobecker <brobecker@adacore.com>
2970
2971 * lynx-low.c (ptrace_request_to_str): Add handling for
2972 PTRACE_GETTRACESIG.
2973
52d4cbd8
JB
29742012-12-17 Joel Brobecker <brobecker@adacore.com>
2975
2976 * lynx-low.c (lynx_attach): Delete variable new_process.
2977
ab8f6ca9
JB
29782012-12-17 Joel Brobecker <brobecker@adacore.com>
2979
2980 * lynx-low.c (lynx_create_inferior): Delete variable
2981 new_process.
2982
78cbc024
JB
29832012-12-17 Joel Brobecker <brobecker@adacore.com>
2984
2985 * lynx-low.c (ptrace_request_to_str): Do not handle
2986 PTRACE_GETTHREADLIST if this macro does not exist.
2987
14a00470
YQ
29882012-12-15 Yao Qi <yao@codesourcery.com>
2989
2990 * Makefile.in (OBS): Add notif.o.
2991 * notif.c, notif.h: New.
2992 * server.c: Include "notif.h".
2993 (struct vstop_notif) <next>: Remove.
2994 <base>: New field.
2995 (queue_stop_reply): Update.
2996 (push_event, send_next_stop_reply): Remove.
2997 (discard_queued_stop_replies): Update.
2998 (notif_stop): New variable.
2999 (handle_v_stopped): Remove.
3000 (handle_v_requests): Don't call handle_v_stopped. Call
3001 handle_ack_notif instead.
3002 (queue_stop_reply_callback): Call notif_event_enque instead
3003 of queue_stop_reply.
3004 (handle_status): Don't call send_next_stop_reply, call
3005 notif_write_event instead.
3006 (kill_inferior_callback): Likewise.
3007 (detach_or_kill_inferior_callback): Likewise.
3008 (main): Call initialize_notif.
3009 (process_serial_event): Call QUEUE_is_empty.
3010 (handle_target_event): Call notif_push instead of push event.
3011 * server.h (push_event): Remove declaration.
3012
61c125b9
TT
30132012-12-10 Tom Tromey <tromey@redhat.com>
3014
3015 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3016 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3017 macros.
3018 (.c.o): Rewrite.
3019 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3020 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3021 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3022 (amd64-linux-ipa.o, ax.o): Rewrite.
3023 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3024 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3025 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3026 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3027 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3028 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3029 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3030 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3031 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3032 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3033 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3034 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3035 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3036 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3037 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3038 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3039 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3040 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3041 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3042 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3043 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3044 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3045 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3046 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3047 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3048 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3049 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3050 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3051 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3052 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3053 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3054 (reg-tilegx.o): Remove.
3055 (all_object_files): New macro.
3056 Include .deps files.
3057 * aclocal.m4, configure: Rebuild.
3058 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3059 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3060 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3061
e90e9ad9
TT
30622012-12-05 Tom Tromey <tromey@redhat.com>
3063
3064 PR gdb/14917:
3065 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3066
02d403bf 30672012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3068
3069 * configure.ac: Check for linux/perf_event.h.
3070 * config.in: Regenerated.
3071 * configure: Regenerated.
3072
0270a750
PA
30732012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3074
3075 * hostio.c (handle_readlink): Decrease buffer size
3076 parameter passed to readlink by one byte.
3077
8c29b58e
YQ
30782012-11-26 Yao Qi <yao@codesourcery.com>
3079
3080 * configure.ac (build_warnings): Append '-Wempty-body'.
3081 * configure: Regenerated.
3082 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3083 body.
3084
8bdce1ff
PM
30852012-11-15 Pierre Muller <muller@sourceware.org>
3086
3087 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3088 * config.in: Regenerate.
3089 * configure: Regenerate.
3090 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3091 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3092 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3093 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3094 header.
3095 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3096 instead of <sys/wait.h> header.
3097 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3098
02d403bf 30992012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3100
3101 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3102 (various make rules): Remove -DGDBSERVER
3103
fbd5db48
YQ
31042012-11-09 Yao Qi <yao@codesourcery.com>
3105
3106 * spu-low.c (current_ptid): Move it to ..
3107 * gdbthread.h: ... here. New.
3108 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3109 * server.c (myresume, process_serial_event): Likewise.
3110 * thread-db.c (thread_db_find_new_threads): Likewise.
3111 * tracepoint.c (run_inferior_command): Likewise.
3112
b3dc46ff
AB
31132012-10-01 Andrew Burgess <aburgess@broadcom.com>
3114
3115 * server.c (handle_search_memory_1): Include access length in
3116 warning message.
3117
07c04788
HPN
31182012-09-05 Michael Brandt <michael.brandt@axis.com>
3119
3120 * linux-crisv32-low.c: Fix compile errors.
3121
918d227b
YQ
31222012-09-04 Yao Qi <yao@codesourcery.com>
3123
3124 * tracepoint.c (cmd_qtsv): Adjust debug message.
3125 Don't check CUR_TPOINT.
3126
18c1b81a
YQ
31272012-08-28 Yao Qi <yao@codesourcery.com>
3128
3129 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3130 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3131 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3132 Remove declarations of xmalloc, xreallloc, xstrdup and
3133 freeargv.
3134 * Makefile.in (libiberty_h): New.
3135 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3136 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3137
dc82f37b
YQ
31382012-08-23 Yao Qi <yao@codesourcery.com>
3139
3140 * server.h: Remove declaration of 'xsnprintf'.
3141
406b1477
KS
31422012-08-22 Keith Seitz <keiths@redhat.com>
3143
3144 * server.h: Include build-gnulib-gbserver/config.h.
3145 * gdbreplay.c: Likewise.
3146
e6712ff1
DE
31472012-08-08 Doug Evans <dje@google.com>
3148
3149 * Makefile.in (SFILES): Add gdb_vecs.c.
3150 (OBS): Add gdb_vecs.o.
3151 (gdb_vecs_h, host_defs_h): New variables.
3152 (thread-db.o): Add $(gdb_vecs_h) dependency.
3153 (gdb_vecs.o): New rule.
3154 * thread-db.c: #include "gdb_vecs.h".
3155 (thread_db_load_search): Use a vector to iterate over path elements.
3156 Handle text appearing after "$pdir".
3157
3158 * configure.ac: Add check for strstr.
3159 * config.in: Regenerate.
3160 * configure: Regenerate.
3161
7c3270ae
UW
31622012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3163
3164 * hostio.c (handle_pread): If pread fails, fall back to attempting
3165 lseek/read.
3166 (handle_pwrite): Likewise for pwrite.
3167
b62e2b27
UW
31682012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3169
3170 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3171 between unsupported TYPE and unimplementable ADDR/LEN combination.
3172 (arm_insert_point): Act on new return value.
3173
78a99e91
PA
31742012-07-31 Pedro Alves <palves@redhat.com>
3175
3176 * server.c (process_point_options): Only skip tokens if we find
3177 one that is unrecognized. Don't treat 'X' specially while
3178 skipping unrecognized tokens.
3179
fcf303ab
UW
31802012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3181
3182 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3183 to 4-byte-align HW breakpoint addresses for Thumb.
3184
7255706c
YQ
31852012-07-27 Yao Qi <yao@codesourcery.com>
3186
3187 PR remote/14161.
3188
3189 * server.h: Declare gdb_agent_about_to_close.
3190 * target.c (kill_inferior): Include "agent.h".
3191 New. Send command 'kill'.
3192 * target.h (kill_inferior): Removed macro.
3193 * tracepoint.c (gdb_agent_about_to_close): New.
3194 (gdb_agent_helper_thread): Handle command 'close'.
3195 Wait endlessly until the inferior stops.
3196 Install gdb_agent_remove_socket to atexit hook.
3197 (agent_socket_name): New static variable.
3198 (gdb_agent_socket_init): Replace local variable 'name' with
3199 'agent_socket_name'.
3200 (gdb_agent_remove_socket): New.
3201
5a3f286f
YQ
32022012-07-27 Yao Qi <yao@codesourcery.com>
3203
3204 * server.c (process_point_options): Stop at 'X' when parsing.
3205
961bd387
ME
32062012-07-19 Michael Eager <eager@eagercon.com>
3207
a261b8f5 3208 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3209 to hw_execute.
3210 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3211 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3212 hardware breakpoint.
3213
aa7c7447
JK
32142012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3215
3216 * gdbserver/linux-low.c (initialize_low): Call
3217 linux_ptrace_init_warnings.
3218
7f216e7c
DE
32192012-07-02 Doug Evans <dje@google.com>
3220
3221 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3222 pointer to int.
3223
d3ce09f5
SS
32242012-07-02 Stan Shebs <stan@codesourcery.com>
3225
3226 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3227 (ax.o): Add it to build rule.
3228 (ax-ipa.o): Ditto.
3229 (OBS): Add format.o.
3230 (IPA_OBS): Add format.o.
3231 * server.c (handle_query): Claim support for breakpoint commands.
3232 (process_point_options): Add command case.
3233 (process_serial_event): Leave running if there are printfs in
3234 effect.
3235 * mem-break.h (any_persistent_commands): Declare.
3236 (add_breakpoint_commands): Declare.
3237 (gdb_no_commands_at_breakpoint): Declare.
3238 (run_breakpoint_commands): Declare.
3239 * mem-break.c (struct point_command_list): New struct.
3240 (struct breakpoint): New field command_list.
3241 (any_persistent_commands): New function.
3242 (add_commands_to_breakpoint): New function.
3243 (add_breakpoint_commands): New function.
3244 (gdb_no_commands_at_breakpoint): New function.
3245 (run_breakpoint_commands): New function.
3246 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3247 locally.
3248 * ax.c: Include format.h.
3249 (ax_printf): New function.
3250 (gdb_eval_agent_expr): Add printf opcode.
3251
2f8f6aed
YQ
32522012-06-13 Yao Qi <yao@codesourcery.com>
3253
3254 * server.c (start_inferior): Remove duplicated writes to fields
3255 'last_resume_kind' and 'last_status' of 'current_inferior'.
3256
0c9070b3
YQ
32572012-06-12 Yao Qi <yao@codesourcery.com>
3258 Pedro Alves <palves@redhat.com>
3259
3260 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3261 comment.
3262 * server.c (handle_v_cont): Extend comment.
3263
c52daf70
YQ
32642012-06-11 Yao Qi <yao@codesourcery.com>
3265
3266 * linux-low.c (linux_attach): Add 'static'.
3267
d38bbb0a
YQ
32682012-06-06 Yao Qi <yao@codesourcery.com>
3269
3270 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3271
89dc0afd
JK
32722012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3273
3274 Fix gcc -flto compilation warning.
3275 * server.c (main): Make variable multi_mode and attach volatile.
3276
75f62ce7
TJB
32772012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3278
3279 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3280 if the platform doesn't know about it.
3281
65f479b6
PA
32822012-05-30 Jeff Kenton <jkenton@tilera.com>
3283
3284 * Makefile.in (SFILES): Add linux-tile-low.c.
3285 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3286 * configure.srv: Handle tilegx-*-linux*.
3287 * linux-tile-low.c: New file.
3288
0c5bf5a9
JK
32892012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3290
3291 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3292
a493e3e2
PA
32932012-05-24 Pedro Alves <palves@redhat.com>
3294
3295 PR gdb/7205
3296
43aaf8b6 3297 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3298
2ea28649
PA
32992012-05-24 Pedro Alves <palves@redhat.com>
3300
3301 PR gdb/7205
3302
3303 Replace target_signal with gdb_signal throughout.
3304
8d409d16
MR
33052012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3306
3307 * linux-low.c (linux_store_registers): Avoid the copying sequence
3308 when no data has been retrieved by ptrace.
3309
23512c01
MGD
33102012-05-22 Will Deacon <will.deacon@arm.com>
3311
3312 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3313 Include asm/ptrace.h.
3314 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3315 already defined.
3316
4934b29e
MR
33172012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3318
3319 * linux-low.c (linux_store_registers): Don't re-retrieve data
3320 with ptrace that has already been obtained from /proc. Always
3321 copy any data retrieved with ptrace to the buffer supplied.
3322
bde24c0a
PA
33232012-05-11 Yao Qi <yao@codesourcery.com>
3324 Pedro Alves <palves@redhat.com>
3325
3326 * linux-low.c (enum stopping_threads_kind): New.
3327 (stopping_threads): Change type to `enum stopping_threads_kind'.
3328 (handle_extended_wait): If stopping and suspending threads, leave
3329 the new_lwp suspended too.
3330 (linux_wait_for_event): Adjust.
3331 (stop_all_lwps): Set `stopping_threads' to
3332 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3333 whether we're suspending threads or just stopping them. Assert no
3334 recursion happens.
3335
623b6bdf
YQ
33362012-04-29 Yao Qi <yao@codesourcery.com>
3337
3338 * server.h: Move some code to ...
3339 * gdbthread.h: ... here. New.
3340 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3341 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3342 (nto-low.o, win32-low.o): Likewise.
3343 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3344 * regcache.c, remote-utils.c, server.c: Likewise.
3345 * target.c, tracepoint.c, win32-low.c: Likewise.
3346
f15f9948
TJB
33472012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3348
3349 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3350 (PTRACE_ARG4_TYPE): Likewise.
3351 (PTRACE_XFER_TYPE): Likewise.
3352 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3353 ptrace to PTRACE_ARG3_TYPE.
3354 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3355 (PTRACE_ARG4_TYPE): Likewise.
3356 (PTRACE_XFER_TYPE): Likewise.
3357 (linux_detach_one_lwp): Cast fourth argument of
3358 ptrace to long then PTRACE_ARG4_TYPE.
3359 (regsets_fetch_inferior_registers): Cast third argument of
3360 ptrace to long then PTRACE_ARG3_TYPE.
3361 (regsets_store_inferior_registers): Likewise.
3362
38ea300a
PA
33632012-04-20 Pedro Alves <palves@redhat.com>
3364
3365 * configure: Regenerate.
3366
c971b7fa
PA
33672012-04-19 Pedro Alves <palves@redhat.com>
3368
43aaf8b6 3369 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3370 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3371 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3372 (all, install-only, uninstall, clean-info, all-lib, clean): No
3373 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3374 (maintainer-clean realclean distclean): Use subdir_do.
3375 (subdir_do): New.
3376 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3377 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3378 * acinclude.m4: Include acx_configure_dir.m4.
3379 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3380 calls. Call AC_PROG_RANLIB. Configure gnulib using
3381 ACX_CONFIGURE_DIR.
3382 (GNULIB): New.
3383 (GNULIB_STDINT_H): Adjust.
3384 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3385 * gdbreplay.c: Include build-gnulib/config.h.
3386 * server.h: Likewise.
3387 * aclocal.m4: Regenerate.
3388 * config.in: Regenerate.
3389 * configure: Regenerate.
c971b7fa 3390
809277f8
PA
33912012-04-19 Pedro Alves <palves@redhat.com>
3392
3393 * Makefile.in (LIBGNU, INCGNU): Adjust.
3394 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3395 (all, install-only, uninstall, clean-info, all-lib, clean)
3396 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3397 * configure.ac: Adjust AC_OUTPUT output.
3398 * aclocal.m4: Regenerate.
3399 * configure: Regenerate.
3400
fd9bb8b8
PA
34012012-04-19 Pedro Alves <palves@redhat.com>
3402
3403 * Makefile.in (generated_files): New.
3404 (server_h): Remove the explicit dependency on config.h, and depend
3405 on $generated_files.
3406
1c298c66
PA
34072012-04-19 Pedro Alves <palves@redhat.com>
3408
3409 * Makefile.in (INCGNU): Add -Ignulib.
3410
57c4b50b
PA
34112012-04-19 Pedro Alves <palves@redhat.com>
3412
3413 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3414 (INCGNU): ... this, and spell out -I here.
3415 (GNULIB_LIB): Rename to ...
3416 (LIBGNU): ... this.
3417 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3418
1030e047
PA
34192012-04-19 Pedro Alves <palves@redhat.com>
3420
3421 * config.in: Regenerate.
3422
447d4319
PA
34232012-04-19 Pedro Alves <palves@redhat.com>
3424
3425 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3426 * server.h (memmem): Remove declaration.
3427 * config.in: Regenerate.
3428 * configure: Regenerate.
3429
aad9eab9
YQ
34302012-04-19 Yao Qi <yao@codesourcery.com>
3431
3432 * Makefile.in (SFILES): Add common/vec.c.
3433 (OBS): Add vec.o.
3434 (vec.o): New rule.
3435
3e10640f
YQ
34362012-04-19 Yao Qi <yao@codesourcery.com>
3437
3438 * remote-utils.c (prepare_resume_reply): Replace with macro
3439 target_core_of_thread.
3440 * server.c (handle_qxfer_threads_proper): Likewise.
3441 * target.h (traget_core_of_thread): New macro.
3442
71622373
PA
34432012-04-18 Pedro Alves <palves@redhat.com>
3444
3445 * aclocal.m4: Regenerate.
3446 * configure: Regenerate.
3447
80d26939
YQ
34482012-04-16 Yao Qi <yao@codesourcery.com>
3449
3450 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3451 duplicated on address.
3452
42476b70
YQ
34532012-04-16 Yao Qi <yao@codesourcery.com>
3454
3455 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3456 (struct tracepoint_action_ops) <send>: New field.
3457 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3458 (agent_expr_send, x_tracepoint_action_send): New.
3459 (l_tracepoint_action_send): New.
3460 (cmd_qtdp): Download and install tracepoint
3461 according to `use_agent'.
3462 (run_inferior_command): Add one more parameter `len'.
3463 Update callers.
3464 (tracepoint_send_agent): New.
3465 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3466
7bc83639
YQ
34672012-04-16 Yao Qi <yao@codesourcery.com>
3468
3469 * tracepoint.c (download_tracepoints): Moved to ...
3470 (cmd_qtstart): ... here.
3471
5f18041e
YQ
34722012-04-14 Yao Qi <yao@codesourcery.com>
3473
3474 * tracepoint.c: Include inttypes.h.
3475 (struct collect_memory_action): Use sized types.
3476 (struct tracepoint): Likewise.
3477 (cmd_qtdp, stop_tracing): Update print specifiers.
3478 (cmd_qtp, response_tracepoint): Likewise.
3479 (collect_data_at_tracepoint): Likewise.
3480 (collect_data_at_step): Likewise.
3481
55a8c076
YQ
34822012-04-14 Yao Qi <yao@codesourcery.com>
3483
3484 Import gnulib module inttypes.
3485 * aclocal.m4, config.in, configure: Regenerated.
3486
dc750257
YQ
34872012-04-14 Yao Qi <yao@codesourcery.com>
3488
3489 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3490 Makefile and config.status at last.
3491
0ab5faf9
YQ
34922012-04-13 Yao Qi <yao@codesourcery.com>
3493
3494 * tracepoint.c: Include stdint.h unconditionally.
3495
18f5fd81
TJB
34962012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3497
3498 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3499 on BFD_HAVE_SYS_PROCFS_TYPE.
3500 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3501 * configure: Regenerate.
3502 * config.in: Likewise.
3503
4d47af5c
L
35042012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3505
3506 * Makefile.in (clean): Also remove x32.c x32-linux.c
3507 x32-avx.c x32-avx-linux.c.
3508 (x32.o): New target.
3509 (x32.c): Likewise.
3510 (x32-linux.o): Likewise.
3511 (x32-linux.c): Likewise.
3512 (x32-avx.o): Likewise.
3513 (x32-avx.c): Likewise.
3514 (x32-avx-linux.o): Likewise.
3515 (x32-avx-linux.c): Likewise.
3516
3517 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3518 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3519 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3520 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3521 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3522 i386/x32-avx-linux.xml.
3523
3524 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3525 (init_registers_x32_avx_linux): Likwise.
3526 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3527 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3528
ecedbe58
PA
35292012-04-13 Pedro Alves <palves@redhat.com>
3530
3531 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3532 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3533 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3534 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3535 the sub-make.
3536
c92b5177
L
35372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3538
3539 * linux-x86-low.c (compat_x32_clock_t): New.
3540 (compat_x32_siginfo_t): Likewise.
3541 (compat_x32_siginfo_from_siginfo): Likewise.
3542 (siginfo_from_compat_x32_siginfo): Likewise.
3543 (linux_is_elf64): Likewise.
3544 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3545 and siginfo_from_compat_x32_siginfo for x32.
3546 (x86_arch_setup): Set linux_is_elf64.
3547
214d508e
L
35482012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3549
3550 PR gdb/13969
3551 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3552 e_machine field.
3553 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3554 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3555 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3556 compatible with process.
3557
c9a1864a
YQ
35582012-04-12 Yao Qi <yao@codesourcery.com>
3559
3560 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3561 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3562 (install-only, install-info, clean): Handle sub dir gnulib.
3563 (all-lib, am--refresh): New targets.
3564 (memmem.o): Remove target.
3565 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3566 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3567 (AC_REPLACE_FUNCS): Remove memmem.
3568 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3569 (AC_OUTPUT): Generate Makefile in gnulib/.
3570 * aclocal.m4, config.in, configure: Regenerated.
3571
367ba2c2
MR
35722012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3573
3574 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3575
9d236627
PA
35762012-04-05 Pedro Alves <palves@redhat.com>
3577
3578 -Werror=strict-aliasing
3579
3580 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3581 pointer.
3582
111217b3
PA
35832012-04-04 Pedro Alves <palves@redhat.com>
3584
3585 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3586 (sparc_store_gregset_from_stack, sparc_store_gregset)
3587 (sparc_breakpoint_at): Fix formatting.
3588
8365dcf5
TJB
35892012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3590
3591 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3592 are available.
3593 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3594 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3595 * config.in: Regenerate.
3596 * configure: Likewise.
3597
689cc2ae
PA
35982012-03-29 Pedro Alves <palves@redhat.com>
3599
3600 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3601 Correct ptrace arguments.
3602
c14dfd32
PA
36032012-03-28 Pedro Alves <palves@redhat.com>
3604
3605 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3606 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3607 (IA64_FR1_REGNUM): New defines.
3608 (ia64_fetch_register): New.
3609 (the_low_target): Install it.
3610 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3611 field.
3612 * linux-low.c (linux_fetch_registers): Try the
3613 the_low_target.fetch_register hook first.
3614
3615 * linux-arm-low.c (the_low_target): Adjust.
3616 * linux-bfin-low.c (the_low_target): Adjust.
3617 * linux-cris-low.c (the_low_target): Adjust.
3618 * linux-crisv32-low.c (the_low_target): Adjust.
3619 * linux-m32r-low.c (the_low_target): Adjust.
3620 * linux-m68k-low.c (the_low_target): Adjust.
3621 * linux-mips-low.c (the_low_target): Adjust.
3622 * linux-ppc-low.c (the_low_target): Adjust.
3623 * linux-s390-low.c (the_low_target): Adjust.
3624 * linux-sh-low.c (the_low_target): Adjust.
3625 * linux-sparc-low.c (the_low_target): Adjust.
3626 * linux-tic6x-low.c (the_low_target): Adjust.
3627 * linux-x86-low.c (the_low_target): Adjust.
3628 * linux-xtensa-low.c (the_low_target): Adjust.
3629
63c88e13
PA
36302012-03-26 Pedro Alves <palves@redhat.com>
3631
3632 * server.c (handle_qxfer_libraries): Don't bail early if
3633 the_target->qxfer_libraries_svr4 is not NULL.
3634
fb723180
PA
36352012-03-26 Pedro Alves <palves@redhat.com>
3636
3637 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3638
0afae3cf
PA
36392012-03-23 Pedro Alves <palves@redhat.com>
3640
3641 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3642 "library-list-svr4" element's start tag when the the DSO list is
3643 empty.
3644
485f1ee4
PA
36452012-03-23 Pedro Alves <palves@redhat.com>
3646
3647 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3648 a variable whose type size is the same as the inferior's pointer
3649 size.
3650
a5362b9a
TS
36512012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3652
3653 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3654 struct siginfo.
3655 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3656 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3657 * linux-low.h: Include <signal.h>.
3658 (struct siginfo): Remove forward declaration.
3659 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3660 struct siginfo.
3661
d226c142
MF
36622012-03-21 Mike Frysinger <vapier@gentoo.org>
3663
3664 * .gitignore: Ignore more files.
3665
122f36ef
PA
36662012-03-19 Pedro Alves <palves@redhat.com>
3667 Jan Kratochvil <jan.kratochvil@redhat.com>
3668
3669 * server.c (cont_thread, general_thread): Add describing comments.
3670 (start_inferior): Clear `cont_thread'.
3671 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3672 of a process.
3673
fc3e5175
YQ
36742012-03-15 Yao Qi <yao@codesourcery.com>
3675
3676 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3677 handling to ...
3678 (cmd_qtdp): ... here.
3679
8d0d92cd
YQ
36802012-03-15 Yao Qi <yao@codesourcery.com>
3681
3682 * tracepoint.c (struct tracepoint_action_ops): New.
3683 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3684 (m_tracepoint_action_download): New.
3685 (r_tracepoint_action_download): New.
3686 (x_tracepoint_action_download): New.
3687 (l_tracepoint_action_download): New.
3688 (add_tracepoint_action): Install `action->ops' according type.
3689 (download_tracepoint_1): Move code `download' function pointer
3690 of various tracepoint_action_ops.
3691
87b0bb13
JK
36922012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3693
3694 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3695 linux_ptrace_attach_warnings.
3696
5f572dec
JK
36972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3698
3699 * Makefile.in (linux-ptrace.o): New.
3700 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3701 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3702 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3703 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3704 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3705 of these targets.
3706 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3707
f4647387
YQ
37082012-03-08 Yao Qi <yao@codesourcery.com>
3709 Pedro Alves <palves@redhat.com>
3710
3711 Fix PR server/13392.
3712 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3713 offset of JMP insn.
3714 * tracepoint.c (remove_tracepoint): New.
3715 (cmd_qtdp): Call remove_tracepoint when failed to install.
3716
9b224c5e
PA
37172012-03-07 Pedro Alves <palves@redhat.com>
3718
3719 * linux-low.c (get_detach_signal): New.
3720 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3721 Pass on pending signals to PTRACE_DETACH. Check the result of the
3722 ptrace call.
3723 * server.c (program_signals, program_signals_p): New.
3724 (handle_general_set): Handle QProgramSignals.
3725 * server.h (program_signals, program_signals_p): Declare.
3726
e237a7e2
JK
37272012-03-05 Pedro Alves <palves@redhat.com>
3728 Jan Kratochvil <jan.kratochvil@redhat.com>
3729
3730 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3731 New comment why.
3732
5808517f
YQ
37332012-03-03 Yao Qi <yao@codesourcery.com>
3734
3735 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3736 agent_look_up_symbols.
3737
58b4daa5
YQ
37382012-03-03 Yao Qi <yao@codesourcery.com>
3739
3740 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3741 (linux-x86-low.o): Likewise.
3742 * server.h: Remove in_process_agent_loaded.
3743 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3744 common/agent.c.
3745 Update callers.
3746
8ffcbaaf
YQ
37472012-03-03 Yao Qi <yao@codesourcery.com>
3748
3749 * tracepoint.c (gdb_agent_capability): New global.
3750 (in_process_agent_loaded_ust): Renamed to
3751 `in_process_agent_supports_ust'.
3752 Update callers.
3753 (in_process_agent_supports_ust): Call agent_capability_check.
3754 (clear_installed_tracepoints): Assert that agent supports
3755 agent.
3756
d1feda86
YQ
37572012-03-03 Yao Qi <yao@codesourcery.com>
3758
3759 * linux-low.c (linux_supports_agent): New.
3760 (linux_target_ops): Initialize field `supports_agent' with
3761 linux_supports_agent.
3762 * target.h (struct target_ops) <supports_agent>: New.
3763 (target_supports_agent): New macro.
3764 * server.c (handle_general_set): Handle packet 'QAgent'.
3765 (handle_query): Send `QAgent+'.
3766 * Makefile.in (server.o): Depends on agent.h.
3767
2fa291ac
YQ
37682012-03-03 Yao Qi <yao@codesourcery.com>
3769
3770 * Makefile.in (OBS): Add agent.o.
3771 Add new rule for agent.o.
3772 Track dependence of tracepoint.c on agent.h.
3773 * tracepoint.c (run_inferior_command_1):
3774 (run_inferior_command): Call agent_run_command.
3775 (gdb_ust_connect_sync_socket): Deleted. Move it to
3776 common/agent.c.
3777 (resume_thread, stop_thread): Likewise.
3778 (gdb_ust_socket_init): Renamed to ...
3779 (gdb_agent_socket_init): ... New.
3780 (gdb_ust_thread): Renamed to ...
3781 (gdb_agent_helper_thread): ... New.
3782 (gdb_ust_init): Move some code to ...
3783 (gdb_agent_init): ... here. New.
3784 [HAVE_UST]: Call gdb_ust_init.
3785 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3786 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3787 * config.in, configure: Regenerated.
3788
05044653
PA
37892012-03-02 Pedro Alves <palves@redhat.com>
3790
3791 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3792 * linux-low.c (struct simple_pid_list): New.
3793 (stopped_pids): New a struct simple_pid_list pointer.
3794 (add_to_pid_list, pull_pid_from_list): New.
3795 (handle_extended_wait): Don't assume the first signal new children
3796 report is SIGSTOP. Adjust call to pull_pid_from_list.
3797 (linux_wait_for_lwp): Adjust.
3798
8d00225b
YQ
37992012-03-02 Yao Qi <yao@codesourcery.com>
3800
3801 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3802 debug log.
3803
19560ba5
YQ
38042012-03-02 Yao Qi <yao@codesourcery.com>
3805
3806 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3807 `stop_pc' and `tpoint'. Update caller.
3808
1faeff08
MR
38092012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3810
3811 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3812 * linux-low.c (use_linux_regsets): New macro.
3813 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3814 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3815 (linux_register_in_regsets): New function.
3816 (usr_fetch_inferior_registers): Skip registers covered by
3817 regsets.
3818 (usr_store_inferior_registers): Likewise.
3819 (usr_fetch_inferior_registers): New macro.
3820 (usr_store_inferior_registers): Likewise.
3821 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3822 (linux_store_registers): Likewise.
3823 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3824 prototype.
3825 (init_registers_mips64_dsp_linux): Likewise.
3826 (init_registers_mips_linux): New macro.
3827 (init_registers_mips_dsp_linux): Likewise.
3828 (mips_dsp_num_regs): Likewise.
3829 (DSP_BASE, DSP_CONTROL): New fallback macros.
3830 (mips_base_regs): New macro.
3831 (mips_regmap): Use it. Fix the size.
3832 (mips_dsp_regmap): New variable.
3833 (mips_dsp_regset_bitmap): Likewise.
3834 (mips_arch_setup): New function.
3835 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3836 than mips_regmap.
3837 (mips_cannot_store_register): Likewise.
3838 (the_low_target): Update .arch_setup, .num_regs and .regmap
3839 initializers. Add .regset_bitmap initializer.
3840 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3841 initializer.
3842 * linux-bfin-low.c (the_low_target): Likewise.
3843 * linux-cris-low.c (the_low_target): Likewise.
3844 * linux-crisv32-low.c (the_low_target): Likewise.
3845 * linux-ia64-low.c (the_low_target): Likewise.
3846 * linux-m32r-low.c (the_low_target): Likewise.
3847 * linux-m68k-low.c (the_low_target): Likewise.
3848 * linux-ppc-low.c (the_low_target): Likewise.
3849 * linux-s390-low.c (the_low_target): Likewise.
3850 * linux-sh-low.c (the_low_target): Likewise.
3851 * linux-sparc-low.c (the_low_target): Likewise.
3852 * linux-tic6x-low.c (the_low_target): Likewise.
3853 * linux-x86-low.c (the_low_target): Likewise.
3854 * linux-xtensa-low.c (the_low_target): Likewise.
3855 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3856 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3857 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3858 srv_xmlfiles.
3859 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3860 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3861
c03e6ccc
YQ
38622012-02-29 Yao Qi <yao@codesourcery.com>
3863 Pedro Alves <palves@redhat.com>
3864
3865 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3866 `step_over_finished' is true.
3867
644cebc9
PA
38682012-02-27 Pedro Alves <palves@redhat.com>
3869
3870 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3871 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3872
c14d7ab2
PA
38732012-02-27 Pedro Alves <palves@redhat.com>
3874
3875 PR server/9684
3876 * linux-low.c (pid_is_stopped): New.
3877 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3878
412c89dd
LM
38792012-02-25 Luis Machado <lgustavo@codesourcery.com>
3880
3881 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3882 of conditions.
3883
b745defe
MR
38842012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3885
3886 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3887
9f3a5c85
LM
38882012-02-24 Luis Machado <lgustavo@codesourcery>
3889
3890 * server.c (handle_query): Advertise support for target-side
3891 breakpoint condition evaluation.
3892 (process_point_options): New function.
3893 (process_serial_event): When inserting a breakpoint, check for
3894 a target-side condition that should be evaluated.
3895
3896 * mem-break.c: Include regcache.h and ax.h.
3897 (point_cond_list_t): New data structure.
3898 (breakpoint) <cond_list>: New field.
3899 (find_gdb_breakpoint_at): Make non-static.
3900 (delete_gdb_breakpoint_at): Clear any target-side
3901 conditions.
3902 (clear_gdb_breakpoint_conditions): New function.
3903 (add_condition_to_breakpoint): Likewise.
3904 (add_breakpoint_condition): Likewise.
3905 (gdb_condition_true_at_breakpoint): Likewise.
3906 (gdb_breakpoint_here): Return result directly instead
3907 of going through a local variable.
3908
3909 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3910 (clear_gdb_breakpoint_conditions): Likewise.
3911 (add_breakpoint_condition): Likewise.
3912 (gdb_condition_true_at_breakpoint): Likewise.
3913
3914 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3915 (need_step_over_p): Take target-side breakpoint condition into
3916 consideration.
3917
5e1dc496
LM
39182012-02-24 Luis Machado <lgustavo@codesourcery>
3919
3920 * server.h: Include tracepoint.h.
3921 (agent_mem_read, agent_get_trace_state_variable_value,
3922 agent_set_trace_state_variable_value,
3923 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3924 get_set_tsv_func_addr): New prototypes.
3925
3926 * ax.h: New include file.
3927 * ax.c: New source file.
3928
3929 * tracepoint.c: Include ax.h.
3930 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3931 agent_expr, eval_result_type): Move to ax.h.
3932 (parse_agent_expr): Rename to ...
3933 (gdb_parse_agent_expr): ... this, make it non-static and move
3934 to ax.h.
3935 (unparse_agent_expr) Rename to ...
3936 (gdb_unparse_agent_expr): ... this, make it non-static and move
3937 to ax.h.
3938 (eval_agent_expr): Rename to ...
3939 (eval_tracepoint_agent_expr): ... this.
3940 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3941 forward declarations.
3942 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3943 (agent_get_trace_state_variable_value): New function.
3944 (agent_set_trace_state_variable_value): New function.
3945 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3946 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3947 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3948 (condition_true_at_tracepoint): Likewise.
3949 (parse_agent_expr): Rename to ...
3950 (gdb_parse_agent_expr): ... this and move to ax.c.
3951 (unparse_agent_expr): Rename to ...
3952 (gdb_unparse_agent_expr): ... this and move to ax.c.
3953 (gdb_agent_op_name): Move to ax.c.
3954 (eval_agent_expr): Rename to ...
3955 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3956 and move to ax.c.
3957 (eval_tracepoint_agent_expr): New function.
3958 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3959 non-static.
5e1dc496
LM
3960 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3961 ax.c.
3962 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3963 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3964 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3965 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3966 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3967 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3968 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3969 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3970 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3971 (compile_bytecodes): Remove forward declaration.
3972 (is_goto_target): Move to ax.c.
3973 (compile_bytecodes): Move to ax.c and call
3974 agent_get_trace_state_variable_value (...) and
3975 agent_set_trace_state_variable_value (...).
3976
3977 * Makefile.in: Update ax.c and IPA dependencies.
3978
277e4e52
PA
39792012-02-24 Pedro Alves <palves@redhat.com>
3980
3981 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3982 (cmd_bigqtbuffer_circular): ... this. Only handle
3983 'QTBuffer:circular:'.
3984 (handle_tracepoint_general_set): Adjust.
3985
bf4c19f7
YQ
39862012-02-16 Yao Qi <yao@codesourcery.com>
3987
3988 * inferiors.c: Move code to ...
3989 * dll.c: .... here. New.
3990 * server.h: Declare clear_dlls.
3991 * Makefile.in (SFILES): Add dll.c.
3992 (OBS): Add dll.o
3993 (dll.o): New rule.
3994
d73f2619
YQ
39952012-02-11 Yao Qi <yao@codesourcery.com>
3996
3997 * server.c: (handle_monitor_command): Add a new parameter
3998 `own_buf'.
3999 (handle_query): Update caller.
4000
f8255c2a
JB
40012012-02-09 Joel Brobecker <brobecker@adacore.com>
4002
4003 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4004 * configure, config.in: Regenerate.
4005 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4006 is not defined.
4007
da84f473
PA
40082012-02-02 Pedro Alves <palves@redhat.com>
4009
4010 Try SIGKILL first, then PTRACE_KILL.
4011 * linux-low.c (linux_kill_one_lwp): New.
4012 (linux_kill_one_lwp): Rename to ...
4013 (kill_one_lwp_callback): ... this. Use the new
4014 linux_kill_one_lwp.
4015
e886a173
PA
40162012-02-02 Pedro Alves <palves@redhat.com>
4017
4018 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4019 inferior.
4020
be07f1a2
PA
40212012-01-27 Pedro Alves <palves@redhat.com>
4022
4023 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4024 (elf_64_file_p): Make static.
4025 (linux_pid_exe_is_elf_64_file): New.
4026 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4027 Delete declarations.
4028 (linux_pid_exe_is_elf_64_file): Declare.
4029 * linux-x86-low.c (x86_arch_setup): Use
4030 linux_pid_exe_is_elf_64_file.
4031
d8301ad1
JK
40322012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4033
4034 * linux-low.c (linux_wait_for_event_1): Rename to ...
4035 (linux_wait_for_event): ... here and merge it with former
4036 linux_wait_for_event - new variable wait_ptid, use it.
4037 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4038
01b17894
PA
40392012-01-23 Pedro Alves <palves@redhat.com>
4040
4041 * server.c (main): Avoid yet another case of infinite loop while
4042 detaching/killing after a longjmp.
4043
e825046f
JK
40442012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4045
4046 Code cleanup.
4047 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4048
b9e7b9c3
UW
40492012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4050
4051 * hostio.c (handle_readlink): New function.
4052 (handle_vFile): Call it to handle "vFile:readlink" packets.
4053
901f9912
UW
40542012-01-20 Pedro Alves <palves@redhat.com>
4055 Ulrich Weigand <ulrich.weigand@linaro.org>
4056
4057 * server.c (handle_v_requests): Only support vAttach and vRun to
4058 start multiple processes when in extended protocol mode.
4059
fc1ab1a0
PA
40602012-01-17 Pedro Alves <palves@redhat.com>
4061
4062 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4063 memalign plus mprotect to allocate the scratch buffer.
4064
7d5d4e98
PA
40652012-01-13 Pedro Alves <palves@redhat.com>
4066
4067 * server.c (attach_inferior): Clear `cont_thread'.
4068
f128d5e9
PA
40692012-01-13 Pedro Alves <palves@redhat.com>
4070
4071 * server.c (main): Avoid infinite loop while detaching/killing
4072 after a longjmp.
4073
06db92f0
DE
40742012-01-09 Doug Evans <dje@google.com>
4075
4076 * server.c (start_inferior): Set last_ptid in --wrapper case.
4077
32d92999
YQ
40782012-01-06 Yao Qi <yao@codesourcery.com>
4079
4080 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4081 defined.
4082 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4083
5e0a92a9
YQ
40842012-01-04 Yao Qi <yao@codesourcery.com>
4085
4086 * tracepoint.c (cmd_qtdp): Print debug message
4087 for static tracepoint.
4088
ae639e8c
YQ
40892012-01-04 Yao Qi <yao@codesourcery.com>
4090
4091 * tracepoint.c (trace_vdebug): Differentiate debug message
4092 between gdbserver and IPA.
4093
f72429c5
YQ
40942012-01-03 Yao Qi <yao@codesourcery.com>
4095
4096 * tracepoint.c (tracepoint_was_hit): Don't collect for
4097 static tracepoint.
4098
12c3e59c
JB
40992012-01-02 Joel Brobecker <brobecker@adacore.com>
4100
4101 * terminal.h: Reformat copyright header.
4102
67827812
JB
41032012-01-02 Joel Brobecker <brobecker@adacore.com>
4104
4105 * server.c (gdbserver_version): Update copyright year.
4106 * gdbreplay.c (gdbreplay_version): Likewise.
4107
3e52c33d
JK
41082011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4109
4110 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4111
4112 Revert:
4113 2011-12-18 Hui Zhu <teawater@gmail.com>
4114 * linux-low.c (linux_create_inferior): Save return value to ret.
4115
66f1260e
HZ
41162011-12-18 Hui Zhu <teawater@gmail.com>
4117
4118 * linux-low.c (linux_create_inferior): Save return value to ret.
4119
e77616d7
DE
41202011-12-16 Doug Evans <dje@google.com>
4121
e7b06c57
DE
4122 * linux-low.c (linux_create_inferior): If stdio connection,
4123 redirect stdin from /dev/null, stdout to stderr.
4124 * remote-utils.c (remote_is_stdio): New static global.
4125 (remote_connection_is_stdio): New function.
4126 (remote_prepare): Handle stdio connection.
4127 (remote_open): Ditto.
4128 (remote_close): Don't close stdin for stdio connections.
4129 (read_prim,write_prim): New functions. Replace all calls to
4130 read/write to these.
4131 * server.c (main): Watch for "-" argument. Move call to
4132 remote_prepare before start_inferior.
4133 * server.h (STDIO_CONNECTION_NAME): New macro.
4134 (remote_connection_is_stdio): Declare.
4135
e77616d7
DE
4136 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4137 in debugging output.
4138
82067193
YQ
41392011-12-15 Yao Qi <yao@codesourcery.com>
4140
4141 * tracepoint.c: Include sys/syscall.h.
4142 (gdb_ust_thread): Remove preprocessor conditional.
4143
82bfbe7e
PA
41442011-12-14 Pedro Alves <pedro@codesourcery.com>
4145
4146 * linux-low.c (linux_detach_one_lwp): Call
4147 the_low_target.prepare_to_resume before detaching.
4148
712c6575
YQ
41492011-12-14 Yao Qi <yao@codesourcery.com>
4150
4151 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4152 of write.
4153
d54d1edf
YQ
41542011-12-14 Yao Qi <yao@codesourcery.com>
4155
4156 * i386-low.c (i386_low_stopped_data_address): Initialize local
4157 variable `control'.
4158
6210a125
PA
41592011-12-13 Pedro Alves <pedro@codesourcery.com>
4160
4161 PR remote/13492
4162
4163 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4164 DR_CONTROL unless necessary. Extend comments.
4165 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4166 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4167
2ece8244
YQ
41682011-12-13 Yao Qi <yao@codesourcery.com>
4169
4170 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4171 macros.
4172 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4173
784867a5
JK
41742011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4175
4176 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4177 Print new debug message for such case.
4178
6bf36717
JK
41792011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4180
4181 Fix overlapping memcpy.
4182 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4183 the read_inferior_memory transfer.
4184 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4185 write_inferior_memory transfer.
4186 (set_fast_tracepoint_jump): New variable buf. Use it for the
4187 read_inferior_memory and write_inferior_memory transfers.
4188 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4189 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4190 Use it for the write_inferior_memory transfer.
4191 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4192 buffers.
4193
50275556
MR
41942011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4195
4196 * linux-low.c (fetch_register, store_register): Make code
4197 consistent, fix formatting.
4198
7325beb4
MR
41992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4200
4201 * linux-low.c (usr_store_inferior_registers): Factor out code
4202 to handle individual registers into...
4203 (store_register): ... this new function.
4204
c642a434
UW
42052011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4206
4207 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4208 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4209 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4210 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4211 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4212 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4213 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4214 (srv_xmlfiles): Add new XML files.
4215
4216 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4217 and <sys/uio.h>.
4218 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4219 (init_registers_s390_linux32v1): Add prototype.
4220 (init_registers_s390_linux32v2): Likewise.
4221 (init_registers_s390_linux64v1): Likewise.
4222 (init_registers_s390_linux64v2): Likewise.
4223 (init_registers_s390x_linux64v1): Likewise.
4224 (init_registers_s390x_linux64v2): Likewise.
4225 (s390_num_regs): Increment to 52.
4226 (s390_regmap): Add orig_r2 register.
4227 (s390_num_regs_3264): Increment to 68.
4228 (s390_regmap_3264): Add orig_r2 register.
4229 (s390_collect_ptrace_register): Handle orig_r2 register.
4230 (s390_supply_ptrace_register): Likewise.
4231 (s390_fill_last_break): New function.
4232 (s390_store_last_break): Likewise.
4233 (s390_fill_system_call): New function.
4234 (s390_store_system_call): Likewise.
4235 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4236 register sets.
4237 (s390_check_regset): New function.
4238 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4239 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4240 Update target_regsets for available register sets.
4241
2268b414
JK
42422011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4243 Jan Kratochvil <jan.kratochvil@redhat.com>
4244
4245 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4246 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4247 New.
4248 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4249 * linux-low.h (struct process_info_private): New member r_debug.
4250 * server.c (handle_qxfer_libraries): Call
4251 the_target->qxfer_libraries_svr4.
4252 (handle_qxfer_libraries_svr4): New function.
4253 (qxfer_packets): New entry "libraries-svr4".
4254 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4255 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4256 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4257 PACKET_qXfer_libraries_svr4.
4258
d6db1fab
UW
42592011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4260
4261 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4262 PSW address/mask between 8-byte and 16-byte formats.
4263 (s390_supply_ptrace_register): Likewise.
4264 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4265 basic addressing mode bit.
4266
242f5f1c
SS
42672011-11-24 Stan Shebs <stan@codesourcery.com>
4268
4269 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4270
f196051f
SS
42712011-11-17 Stan Shebs <stan@codesourcery.com>
4272
4273 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4274 (tracing_start_time): New global.
4275 (tracing_stop_time): New global.
4276 (tracing_user_name): New global.
4277 (tracing_notes): New global.
4278 (tracing_stop_note): New global.
4279 (cmd_qtstart): Set traceframe_usage, start_time.
4280 (stop_tracing): Set stop_time.
4281 (cmd_qtstatus): Report additional status.
4282 (cmd_qtp): New function.
4283 (handle_tracepoint_query): Call it.
4284 (cmd_qtnotes): New function.
4285 (handle_tracepoint_general_set): Call it.
4286 (get_timestamp): Rename from tsv_get_timestamp.
4287
405f8e94
SS
42882011-11-14 Stan Shebs <stan@codesourcery.com>
4289 Kwok Cheung Yeung <kcy@codesourcery.com>
4290
4291 * linux-x86-low.c (small_jump_insn): New.
4292 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4293 trampoline and error message, build a trampoline and issue a small
4294 jump instruction to it.
4295 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4296 trampoline and error message.
4297 (x86_get_min_fast_tracepoint_insn_len): New.
4298 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4299 * linux-low.h (struct linux_target_ops): Add arguments to
4300 install_fast_tracepoint_jump_pad operation, add new operation.
4301 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4302 arguments.
4303 (linux_get_min_fast_tracepoint_insn_len): New function.
4304 (linux_target_op): Add new operation.
4305 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4306 (gdb_trampoline_buffer_end): Ditto.
4307 (gdb_trampoline_buffer_error): Ditto.
4308 (struct ipa_sym_addresses): Add fields for new IPA variables.
4309 (symbol_list): Add entries for new IPA variables.
4310 (struct tracepoint): Add fields to hold the address range of the
4311 trampoline used by the tracepoint.
4312 (trampoline_buffer_head): New static variable.
4313 (trampoline_buffer_tail): Ditto.
4314 (claim_trampoline_space): New function.
4315 (have_fast_tracepoint_trampoline_buffer): New function.
4316 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4317 structure.
4318 (install_fast_tracepoint): Ditto, also add error buffer argument.
4319 (cmd_qtminftpilen): New function.
4320 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4321 (fast_tracepoint_from_trampoline_address): New function.
4322 (fast_tracepoint_collecting): Handle trampoline as part of jump
4323 pad space.
4324 (set_trampoline_buffer_space): New function.
4325 (initialize_tracepoint): Initialize new IPA variables.
4326 * target.h (struct target_ops): Add arguments to
4327 install_fast_tracepoint_jump_pad operation, add new
4328 get_min_fast_tracepoint_insn_len operation.
4329 (target_get_min_fast_tracepoint_insn_len): New.
4330 (install_fast_tracepoint_jump_pad): Add arguments.
4331 * server.h (IPA_BUFSIZ): Define.
4332 * linux-i386-ipa.c: Include extra header files.
4333 (initialize_fast_tracepoint_trampoline_buffer): New function.
4334 (initialize_low_tracepoint): Call it.
4335 * server.h (set_trampoline_buffer_space): Declare.
4336 (claim_trampoline_space): Ditto.
4337 (have_fast_tracepoint_trampoline_buffer): Ditto.
4338
1e4d1764
YQ
43392011-11-14 Yao Qi <yao@codesourcery.com>
4340
4341 * server.c (handle_query): Handle InstallInTrace for qSupported.
4342 * tracepoint.c (add_tracepoint): Sort list.
4343 (install_tracepoint, download_tracepoint): New.
4344 (cmd_qtdp): Call them to install and download tracepoints.
4345 (sort_tracepoints): Removed.
4346 (cmd_qtstart): Update.
4347
5c73ff4e
YQ
43482011-11-14 Yao Qi <yao@codesourcery.com>
4349
4350 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4351 * mem-break.h: Declare.
4352 * tracepoint.c (cmd_qtstart): Move some code to ...
4353 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4354 New.
4355 (download_tracepoints): Move some code to ...
4356 (download_tracepoint_1): ... here. New.
4357
86a30030
YQ
43582011-11-08 Yao Qi <yao@codesourcery.com>
4359
4360 * remote-utils.c (relocate_instruction): A comment fix.
4361
8d26e50c
JB
43622011-11-07 Joel Brobecker <brobecker@adacore.com>
4363
4364 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4365 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4366 dr_status_mirror and dr_control_mirror from debug_reg_state.
4367 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4368 (i386_initial_stuff): Remove use of deleted globals.
4369 (i386_get_thread_context, i386_set_thread_context,
4370 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4371 from debug_reg_state.
4372
a59306a3
YQ
43732011-11-05 Yao Qi <yao@codesourcery.com>
4374
4375 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4376 address as TPOINT's.
4377
3065dfb6
SS
43782011-11-02 Stan Shebs <stan@codesourcery.com>
4379
4380 * tracepoint.c (agent_mem_read_string): New function.
4381 (eval_agent_expr): Call it for tracenz.
4382 * server.c (handle_query): Report support for tracenz.
4383
fd0d8c7c
YQ
43842011-11-02 Yao Qi <yao@codesourcery.com>
4385
4386 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4387
609086b1
YQ
43882011-11-02 Yao Qi <yao@codesourcery.com>
4389
4390 * target.h: Fix a typo in comment.
4391
b9fd1791
PA
43922011-10-31 Pedro Alves <pedro@codesourcery.com>
4393
4394 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4395 clobber the breakpoints' shadows with fast tracepoint jumps.
4396 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4397 * target.c (write_inferior_memory): Also pass MYADDR down to
4398 check_mem_write.
4399
03583c20
UW
44002011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4401
4402 * configure.ac: Check support for personality routine.
4403 * configure: Regenerate.
4404 * config.in: Likewise.
4405 * linux-low.c: Include <sys/personality.h>.
4406 Define ADDR_NO_RANDOMIZE if necessary.
4407 (linux_create_inferior): Disable address space randomization when
4408 forking inferior, if requested.
4409 (linux_supports_disable_randomization): New function.
4410 (linux_target_ops): Install it.
4411 * server.h (disable_randomization): Declare.
4412 * server.c (disable_randomization): New global variable.
4413 (handle_general_set): Handle QDisableRandomization.
4414 (handle_query): Likewise for qSupported.
4415 (main): Support --disable-randomization and --no-disable-randomization
4416 command line arguments.
4417 * target.h (struct target_ops): Add supports_disable_randomization.
4418 (target_supports_disable_randomization): New macro.
4419
723b724b
MF
44202011-09-29 Mike Frysinger <vapier@gentoo.org>
4421
4422 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4423 ifdef check.
4424 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4425 [!PT_GETDSBT] (target_loadmap): New definition.
4426 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4427 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4428 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4429 and PT_GETDSBT to LINUX_LOADMAP.
4430 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4431 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4432
55329a5c 44332011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4434
4435 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4436 (arm_linux_hwbp_cap): New static variable.
4437 (arm_linux_get_hwbp_cap): Replace by ...
4438 (arm_linux_init_hwbp_cap): ... this new function.
4439 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4440 (arm_linux_get_hw_watchpoint_count): Likewise.
4441 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4442 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4443 (arm_prepare_to_resume): Use perror_with_name instead of error.
4444
55329a5c 44452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4446
4447 * linux-arm-low.c: Include <signal.h>.
4448 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4449 (struct arm_linux_hwbp_cap): New data type.
4450 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4451 (struct arm_linux_hw_breakpoint): New data type.
4452 (MAX_BPTS, MAX_WPTS): Define.
4453 (struct arch_process_info, struct arch_lwp_info): New data types.
4454 (arm_linux_get_hwbp_cap): New function.
4455 (arm_linux_get_hw_breakpoint_count): Likewise.
4456 (arm_linux_get_hw_watchpoint_count): Likewise.
4457 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4458 (arm_hwbp_control_initialize): Likewise.
4459 (arm_hwbp_control_is_enabled): Likewise.
4460 (arm_hwbp_control_is_initialized): Likewise.
4461 (arm_hwbp_control_disable): Likewise.
4462 (arm_linux_hw_breakpoint_equal): Likewise.
4463 (arm_linux_hw_point_initialize): Likewise.
4464 (struct update_registers_data): New data structure.
4465 (update_registers_callback: New function.
4466 (arm_insert_point): Likewise.
4467 (arm_remove_point): Likewise.
4468 (arm_stopped_by_watchpoint): Likewise.
4469 (arm_stopped_data_address): Likewise.
4470 (arm_new_process): Likewise.
4471 (arm_new_thread): Likewise.
4472 (arm_prepare_to_resume): Likewise.
4473 (the_low_target): Register arm_insert_point, arm_remove_point,
4474 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4475 arm_new_thread, and arm_prepare_to_resume.
4476
6b9801d4
SS
44772011-09-15 Stan Shebs <stan@codesourcery.com>
4478
4479 * server.h (struct emit_ops): Add compare-goto fields.
4480 * tracepoint.c (gdb_agent_op_sizes): New table.
4481 (emit_eq_goto): New function.
4482 (emit_ne_goto): New function.
4483 (emit_lt_goto): New function.
4484 (emit_le_goto): New function.
4485 (emit_gt_goto): New function.
4486 (emit_ge_goto): New function.
4487 (is_goto_target): New function.
4488 (compile_bytecodes): Recognize special cases of compare-goto
4489 combinations and call specialized emitters for them.
4490 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4491 (amd64_emit_ne_goto): New function.
4492 (amd64_emit_lt_goto): New function.
4493 (amd64_emit_le_goto): New function.
4494 (amd64_emit_gt_goto): New function.
4495 (amd64_emit_ge_goto): New function.
4496 (amd64_emit_ops): Add the new functions.
4497 (i386_emit_eq_goto): New function.
4498 (i386_emit_ne_goto): New function.
4499 (i386_emit_lt_goto): New function.
4500 (i386_emit_le_goto): New function.
4501 (i386_emit_gt_goto): New function.
4502 (i386_emit_ge_goto): New function.
4503 (i386_emit_ops): Add the new functions.
4504
bf15cbda
SS
45052011-09-08 Stan Shebs <stan@codesourcery.com>
4506
4507 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4508 (i386_emit_epilogue): Restore %ebx.
4509
943ca1dd
JZ
45102011-08-31 Jie Zhang <jzhang918@gmail.com>
4511
4512 * server.c (step_thread): Remove definition.
4513 (process_serial_event): Don't handle Hs.
4514 * server.h (step_thread): Remove declaration.
4515 * target.c (set_desired_inferior): Remove use of step_thread.
4516
e3deef73
LM
45172011-08-24 Luis Machado <lgustavo@codesourcery.com>
4518
4519 * linux-low.c: Include linux-procfs.h.
4520 (linux_attach_lwp_1): Update comments.
4521 (linux_attach): Scan for existing threads when attaching to a
4522 process that is the tgid.
4523 * Makefile.in: Update dependencies.
4524
13da1c97
LM
45252011-08-24 Luis Machado <lgustavo@codesourcery.com>
4526
4527 * configure.srv: Add linux-procfs.o dependencies.
4528
881127c9
YQ
45292011-08-14 Yao Qi <yao@codesourcery.com>
4530
4531 * target.h (struct target_ops): Fix indent.
4532 * win32-low.c (win32_target_ops): Fix comment.
4533
58dbd541
YQ
45342011-08-14 Andrew Jenner <andrew@codesourcery.com>
4535 Yao Qi <yao@codesourcery.com>
4536
4537 * Makefile.in (clean): Remove tic6x-*.c files.
4538 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4539 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4540 (tic6x-c64xp-linux.c): Likewise.
4541 * configure.srv: Add support for tic6x-*-uclinux.
4542 * linux-tic6x-low.c: New.
4543 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4544
78d85199
YQ
45452011-08-14 Andrew Stubbs <ams@codesourcery.com>
4546 Yao Qi <yao@codesourcery.com>
4547
4548 * target.h (struct target_ops): Add read_loadmap.
4549 * linux-low.c (struct target_loadseg): New type.
4550 (struct target_loadmap): New type.
4551 (linux_read_loadmap): New function.
4552 (linux_target_ops): Add linux_read_loadmap.
4553 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4554 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4555 to NULL.
78d85199 4556
a959a88d
EZ
45572011-08-05 Eli Zaretskii <eliz@gnu.org>
4558
4559 * win32-low.c: Include <stdint.h>.
4560
1ced966e
PA
45612011-07-22 Pedro Alves <pedro@codesourcery.com>
4562
4563 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4564 to the inferior here.
4565 (i386_remove_aligned_watchpoint): Ditto.
4566 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4567 fit part of the watchpoint in the debug registers.
4568 (i386_update_inferior_debug_regs): New.
4569 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4570 registers, and only update the inferior on success.
4571 (i386_low_remove_watchpoint): Ditto.
4572
d26e3629
KY
45732011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4574
4575 * linux-low.c (compare_ints, unique, list_threads, show_process,
4576 linux_core_of_thread): Delete.
4577 (linux_target_ops): Change linux_core_of_thread to
4578 linux_common_core_of_thread.
4579 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4580 * utils.c (malloc_failure): Change type of argument.
4581 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4582 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4583 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4584 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4585 (IPA_OBJS): Add common-utils-ipa.o.
4586 (ptid_h, linux_osdata_h): New macros.
4587 (server_h): Add common/common-utils.h, common/xml-utils.h,
4588 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4589 common/ptid.h.
4590 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4591 ptid.o, buffer.o): New rules.
4592 (linux-low.o): Add common/linux-osdata.h as a dependency.
4593 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4594 * configure.ac: Add AC_HEADER_DIRENT check.
4595 * config.in: Regenerate.
4596 * configure: Regenerate.
4597 * remote-utils.c (xml_escape_text): Delete.
4598 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4599 buffer_xml_printf): Move to common/buffer.c.
4600 * server.c (main): Remove call to initialize_inferiors.
4601 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4602 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4603 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4604 internal_error, gdb_assert, gdb_assert_fail): Delete.
4605 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4606 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4607 common/buffer.h.
4608 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4609 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4610 initialize_inferiors): Delete.
4611
2275a1a7
PA
46122011-07-20 Pedro Alves <pedro@codesourcery.com>
4613
4614 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4615 symbol error.
4616
0a5b1e09
PA
46172011-05-31 Pedro Alves <pedro@codesourcery.com>
4618
4619 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4620 assertion.
4621 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4622
6938fd34
YQ
46232011-05-26 Yao Qi <yao@codesourcery.com>
4624
4625 * Makefile.in (thread-db.o): Track dependence to
4626 common/gdb_thread_db.h.
4627 * thread-db.c: include gdb_thread_db.h from right place.
4628
b481f9e0
TT
46292011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4630
4631 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4632 __FILE__ and __LINE__ to internal_error.
4633
98a5dd13
DE
46342011-05-13 Doug Evans <dje@google.com>
4635
4636 * thread-db.c (try_thread_db_load_from_sdir): New function.
4637 (try_thread_db_load_from_dir): New function.
4638 (thread_db_load_search): Handle $sdir, ignore $pdir.
4639 Remove trying of system directories if search of
4640 libthread-db-search-path fails, that is now done via $sdir.
4641
d248b706
KY
46422011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4643
4644 * server.c (handle_query): Add EnableDisableTracepoints to the list
4645 of supported features.
43aaf8b6 4646 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4647 tracepoints.
43aaf8b6
PA
4648 (cmd_qtenable_disable): New.
4649 (cmd_qtstart): Install tracepoints even if disabled.
4650 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4651 receiving a QTEnable or QTDisable packet.
4652 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4653 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4654 tracepoints.
4655 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4656
84e578fb
DE
46572011-05-10 Doug Evans <dje@google.com>
4658
4659 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4660
71f55dd8
DE
46612011-05-04 Doug Evans <dje@google.com>
4662
4663 * linux-low.c (linux_join): Skip process lookup.
4664 * spu-low.c (spu_join): Ditto.
4665 * server.c (join_inferiors_callback): Delete.
4666 (process_serial_event): For 'D' packet (detach) call join_inferior
4667 directly.
4668
4d393d60
JM
46692011-05-04 Joseph Myers <joseph@codesourcery.com>
4670
4671 * README: Don't mention xscale*-*-linux*.
4672 * configure.srv (xscale*-*-linux*): Don't handle target.
4673
b00ad6ff
NF
46742011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4675
4676 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4677 casting pointers.
4678 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4679 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4680 (i386_emit_void_call_2): Likewise.
4681
af96c192
YQ
46822011-04-26 Yao Qi <yao@codesourcery.com>
4683
43aaf8b6
PA
4684 * linux-low.c: Move common macros to linux-ptrace.h.
4685 Include linux-ptrace.h.
af96c192
YQ
4686 * Makefile.in (linux_ptrace_h): New.
4687 (linux-low.o): Depends on linux-ptrace.h.
4688
03f2bd59
JK
46892011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4690
4691 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4692 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4693 (remote_prepare): New function with most of the TCP code from ...
4694 (remote_open): ... here. Detect PORT here unconditionally. Move also
4695 setting transport_is_reliable.
4696 * server.c (run_once): New variable.
4697 (gdbserver_usage): Document it.
4698 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4699 the first run if RUN_ONCE.
4700 * server.h (run_once, remote_prepare): New declarations.
4701
7a9dd1b2
TT
47022011-04-19 Tom Tromey <tromey@redhat.com>
4703
4704 * win32-low.c (handle_load_dll): Remove duplicate "the".
4705
81239425
PM
47062011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4707
4708 Remove support for old Cygwin 1.5 versions.
4709 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4710 function to avoid warning.
4711 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4712 warning.
4713
9e0627f1
PM
47142011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4715
4716 * gdbserver/server.h (Macro _): Define it if not available.
4717
588eebee
MS
47182011-03-14 Michael Snyder <msnyder@vmware.com>
4719
348af9f7 4720 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4721
43f70d4c
JB
47222011-03-10 Joel Brobecker <brobecker@adacore.com>
4723
4724 * Makefile.in (maintainer-clean realclean distclean): Remove
4725 "make ... subdir_do" command.
4726
348af9f7
MS
47272011-03-10 Michael Snyder <msnyder@vmware.com>
4728
4729 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4730
4731 * server.c (handle_v_run): Free alloced buffer on early return.
4732
e637a4f5
YQ
47332011-03-09 Yao Qi <yao@codesourcery.com>
4734
4735 Revert:
4736 2011-03-04 Yao Qi <yao@codesourcery.com>
4737
4738 * Makefile.in: Remove GNU make feature --directory.
4739
4740 2011-03-05 Yao Qi <yao@codesourcery.com>
4741
4742 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4743 (subdir_do): New make target. Copied from gdb/Makefile.
4744 (maintainer-clean, realclean, distclean, clean): Call corresponding
4745 make targets in common/Makefile.
4746
4747 2011-02-11 Yao Qi <yao@codesourcery.com>
4748
4749 * configure.ac: Call AC_PROG_RANLIB.
4750 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4751 * configure: Regenerate.
4752
e6edda56
JK
47532011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4754
4755 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4756
e5141119
JB
47572011-03-06 Yao Qi <yao@codesourcery.com>
4758
4759 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4760
64794aa4
JB
47612011-03-05 Yao Qi <yao@codesourcery.com>
4762
4763 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4764 (subdir_do): New make target. Copied from gdb/Makefile.
4765 (maintainer-clean, realclean, distclean, clean): Call corresponding
4766 make targets in common/Makefile.
4767
7a762829
YQ
47682011-03-04 Yao Qi <yao@codesourcery.com>
4769
4770 * Makefile.in: Remove GNU make feature --directory.
4771
348af9f7
MS
47722011-03-04 Michael Snyder <msnyder@vmware.com>
4773
4774 * server.c (queue_stop_reply): Call xmalloc not malloc.
4775
47762011-03-02 Michael Snyder <msnyder@vmware.com>
4777
4778 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4779
9f72fee2
MS
47802011-02-28 Michael Snyder <msnyder@vmware.com>
4781
588eebee
MS
4782 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4783 (cmd_qtframe): Ditto.
4784 (cmd_qtbuffer): Ditto.
4785 (cmd_bigqtbuffer): Ditto.
4786
9f72fee2
MS
4787 * utils.c (decimal2str): Initialize 'width' to nine, then
4788 don't mess with it.
4789
8040bd49
UW
47902011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4791
4792 * hostio.c (require_data): Free *data, not data.
4793
7e52cbd0
JK
47942011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4795
4796 * hostio.c (require_data): Use free, not xfree.
4797
9130f83e
MS
47982011-02-27 Michael Snyder <msnyder@vmware.com>
4799
4b812f4e
MS
4800 * server.c (handle_query): Discard unused value.
4801
9130f83e
MS
4802 * hostio.c (require_data): Free malloc memory before returning
4803 error.
4804
69d37113
MS
48052011-02-26 Michael Snyder <msnyder@vmware.com>
4806
4807 * linux-low.c (list_threads): Call closedir for dirent.
4808
35f5825a
MS
48092011-02-27 Michael Snyder <msnyder@vmware.com>
4810
2a589cef
MS
4811 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4812 a case statement falls through.
4813
0adea5f7
MS
4814 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4815
35f5825a
MS
4816 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4817 in comparison.
4818
238f1c74
MS
48192011-02-26 Michael Snyder <msnyder@vmware.com>
4820
4821 * utils.c (decimal2str): Eliminate dead code and dead param.
4822 (pulongest): Drop dead param from call to decimal2str.
4823 (plongest): Ditto.
4824
633ff500
JB
48252011-02-24 Joel Brobecker <brobecker@adacore.com>
4826
4827 Revert the following patch (not approved yet):
4828 2011-02-21 Hui Zhu <teawater@gmail.com>
4829 * tracepoint.c (tp_printf): New function.
4830 (eval_agent_expr): Handle gdb_agent_op_printf.
4831
f9c6ff72
HZ
48322011-02-21 Hui Zhu <teawater@gmail.com>
4833
4834 * tracepoint.c (tp_printf): New function.
4835 (eval_agent_expr): Handle gdb_agent_op_printf.
4836
94d5e490
TT
48372011-02-18 Tom Tromey <tromey@redhat.com>
4838
4839 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4840 (tracepoint.o): Likewise.
4841 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4842 (gdb_agent_op_names): Likewise.
4843
c7f96d2b
TT
48442011-02-18 Tom Tromey <tromey@redhat.com>
4845
4846 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4847 gdb_agent_op_rot>: New constants.
4848 (gdb_agent_op_names): Add pick and roll.
4849 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4850 cases.
4851
0feedb2c
JK
48522011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4853
4854 * aclocal.m4: Regenerated with aclocal-1.11.1.
4855
b3b9301e
PA
48562011-02-14 Pedro Alves <pedro@codesourcery.com>
4857
4858 * server.c (handle_qxfer_traceframe_info): New.
4859 (qxfer_packets): Register "traceframe-info".
4860 (handle_query): Report support for qXfer:traceframe-info:read+.
4861 * tracepoint.c (match_blocktype): New.
4862 (traceframe_find_block_type): Rename to ...
4863 (traceframe_walk_blocks): ... this. Add callback filter argument,
4864 and use it.
4865 (traceframe_find_block_type): New, reimplemented on top of
4866 traceframe_walk_blocks.
4867 (build_traceframe_info_xml): New.
4868 (traceframe_read_info): New.
4869 * server.h (traceframe_read_info): Declare.
4870
4f3e6fb7
YQ
48712011-02-11 Yao Qi <yao@codesourcery.com>
4872
4873 * configure.ac: Call AC_PROG_RANLIB.
4874 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4875 * configure: Regenerate.
4876
764880b7
PA
48772011-02-07 Pedro Alves <pedro@codesourcery.com>
4878
4879 * server.c (gdb_read_memory): Change return semantics to allow
4880 partial transfers.
4881 (handle_search_memory_1): Adjust.
4882 (process_serial_event) <'m' packet>: Handle partial transfers.
4883 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4884
1c79eb8a
PA
48852011-01-28 Pedro Alves <pedro@codesourcery.com>
4886
4887 * regcache.c (init_register_cache): Initialize
4888 regcache->register_status.
4889 (free_register_cache): Release regcache->register_status.
4890 (regcache_cpy): Copy register_status.
4891 (registers_to_string): Print 'x's for unavailable registers.
4892 (supply_register): Mark the register's status valid or
4893 unavailable, depending on whether a buffer was passed in or not.
4894 (supply_register_zeroed): New.
4895 (supply_regblock): Mark the registers' status valid or
4896 unavailable, depending on whether a buffer was passed in or not.
4897 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4898 (struct regcache): New `register_status' field.
4899 (supply_register_zeroed): Declare.
4900 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4901 supply_register_zeroed, rather than passing a NULL buffer to
4902 supply_register.
4903 * tracepoint.c (fetch_traceframe_registers): Update comment.
4904
85724a0e
PA
49052011-01-28 Pedro Alves <pedro@codesourcery.com>
4906
4907 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4908 buffer explicit.
4909
d08aafef
PA
49102011-01-25 Pedro Alves <pedro@codesourcery.com>
4911
4912 * server.h (decode_xfer_write): Change prototype.
4913 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4914 and don't extract the annex here.
4915 * server.c (decode_xfer_read): Remove `annex' parameter,
4916 and don't extract the annex here.
4917 (decode_xfer): New.
4918 (struct qxfer): New.
4919 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4920 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4921 (handle_qxfer_statictrace): New functions, abstracted out from
4922 handle_query, and made to use the struct qxfer interface.
4923 (handle_threads_qxfer_proper): Rename to ...
4924 (handle_qxfer_threads_proper): ... this.
4925 (handle_threads_qxfer): Rename to ...
4926 (handle_qxfer_threads): ... this. Adjust.
4927 (qxfer_packets): New array.
4928 (handle_qxfer): New function.
4929 (handle_query): Use handle_qxfer.
4930
493e2a69
MS
49312011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4932
4933 * gdbreplay.c: Shorten lines of >= 80 columns.
4934 * linux-low.c: Ditto.
4935 * linux-ppc-low.c: Ditto.
4936 * linux-s390-low.c: Ditto.
4937 * linux-sparc-low.c: Ditto.
4938 * linux-x86-low.c: Ditto.
4939 * linux-xtensa-low.c: Ditto.
4940 * mem-break.c: Ditto.
4941 * nto-low.c: Ditto.
4942 * regcache.h: Ditto.
4943 * remote-utils.c: Ditto.
4944 * server.c: Ditto.
4945 * server.h: Ditto.
4946 * thread-db.c: Ditto.
4947 * tracepoint.c: Ditto.
4948 * utils.c: Ditto.
4949 * win32-low.h: Ditto.
4950
44944448
JB
49512011-01-05 Joel Brobecker <brobecker@adacore.com>
4952
4953 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4954 update.
4955
71ce852c
JB
49562011-01-01 Joel Brobecker <brobecker@adacore.com>
4957
4958 * server.c (gdbserver_version): Update copyright year in version
4959 output.
4960 * gdbreplay.c (gdbreplay_version): Ditto.
4961
eb826dc6
MF
49622010-12-29 Jie Zhang <jie.zhang@analog.com>
4963
4964 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4965 * linux-bfin-low.c: New file.
4966 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4967 PT_DATA_ADDR for BFIN targets.
4968 * Makefile.in (SFILES): Add linux-bfin-low.c.
4969 (clean): Remove reg-bfin.c.
4970 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4971 * README: Mention supported Blackfin targets.
4972
39ab222a
MF
49732010-12-23 Mike Frysinger <vapier@gentoo.org>
4974
4975 * .gitignore: New file.
4976
a1f2ce7d
MF
49772010-11-16 Mike Frysinger <vapier@gentoo.org>
4978
4979 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4980
f474844c
JZ
49812010-10-22 Jie Zhang <jie@codesourcery.com>
4982
4983 * Makefile.in: Add FLAGS_TO_PASS variable.
4984 (install): Remove dependency of install-only and recursively
4985 invoke make for install-only.
4986
f1048712
DE
49872010-10-04 Doug Evans <dje@google.com>
4988
4989 * Makefile.in (uninstall): Use $(DESTDIR).
4990
b53a1623
PA
49912010-09-24 Pedro Alves <pedro@codesourcery.com>
4992
e6ee044d
PA
4993 PR gdb/11842
4994
b53a1623
PA
4995 * linux-x86-low.c (compat_siginfo_from_siginfo)
4996 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4997 si_code is < 0. Check for si_code == SI_TIMER before checking for
4998 si_code < 0.
4999
fa1bd1e4
JB
50002010-09-13 Joel Brobecker <brobecker@adacore.com>
5001
5002 * lynx-i386-low.c: New file.
5003 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5004
47fac8f8
JB
50052010-09-13 Joel Brobecker <brobecker@adacore.com>
5006
5007 * lynx-low.c (ptrace_request_to_str): Remove handling for
5008 request values that have been removed in LynxOS 5.x.
5009
1adfc54d
JB
50102010-09-13 Joel Brobecker <brobecker@adacore.com>
5011
5012 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5013 <ptrace.h>
5014
c2a66c29
NS
50152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5016
5017 * configure.ac: Add --enable-inprocess-agent option.
5018 * configure: Rebuilt.
5019
32fcada3
YQ
50202010-09-06 Yao Qi <yao@codesourcery.com>
5021
5022 * linux-low.c (linux_kill): Remove unused variable.
5023 (linux_stabilize_threads): Likewise.
5024 * server.c (start_inferior): Likewise.
5025 (queue_stop_reply_callback): Likewise.
5026 * tracepoint.c (do_action_at_tracepoint): Likewise.
5027
0cccb683
YQ
50282010-09-06 Yao Qi <yao@codesourcery.com>
5029
5030 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5031 on return.
5032
423ec54c
JK
50332010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5034
5035 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5036
12ac6819
PA
50372010-09-06 Pedro Alves <pedro@codesourcery.com>
5038
5039 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5040 "$(IPA_DEPFILES)".
5041
8ed54b31
JB
50422010-09-01 Joel Brobecker <brobecker@adacore.com>
5043
5044 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5045 gdbserver/lynx-ppc-low.c: New files.
5046 * Makefile.in (lynx_low_h): New variable.
5047 (lynx-low.o, lynx-ppc-low.o): New rules.
5048 * configure.ac: On LynxOS, link with -lnetinet.
5049 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5050 * configure: regenerate.
5051
bb0116a4
JB
50522010-09-01 Joel Brobecker <brobecker@adacore.com>
5053
5054 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5055 * configure.ac: Add check for vasprintf and vsnprintf.
5056 * configure, config.in: Regenerate.
5057 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5058
a778ab81 50592010-09-01 Joel Brobecker <brobecker@adacore.com>
5060
5061 * gdbreplay.c: Move include of alloca.h up, next to include of
5062 malloc.h.
5063 * server.h: Add include of malloc.h.
5064 * mem-break.c: Remove include of malloc.h.
5065 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5066
8b034a19 50672010-09-01 Joel Brobecker <brobecker@adacore.com>
5068
5069 * Makefile.in (memmem.o): Build with -Wno-error.
5070
50712010-09-01 Joel Brobecker <brobecker@adacore.com>
5072
5073 * utils.c (xsnprintf): Make non-static.
5074 * server.h: Add xsnprintf declaration.
5075 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5076 replace calls to snprintf by calls to xsnprintf throughout.
5077
50782010-09-01 Joel Brobecker <brobecker@adacore.com>
5079
5080 * configure.ac: Add configure check for alloca.
5081 * configure, config.in: Regenerate.
5082 * server.h: Include alloca.h if it exists.
5083 * gdbreplay.c: Include alloca.h if it exists.
5084
1a981360
PA
50852010-08-28 Pedro Alves <pedro@codesourcery.com>
5086
5087 * linux-low.c (__SIGRTMIN): Define if not already defined.
5088 (linux_create_inferior): Check for __ANDROID__ rather than
5089 __SIGRTMIN.
5090 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5091 are already deferred.
5092 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5093 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5094 stopped and already has a pending signal to report.
5095 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5096 a pending signal to report or is moving out of a jump pad.
5097 (linux_init_signals): Check for __ANDROID__ rather than
5098 __SIGRTMIN.
5099
b4d51a55
PA
51002010-08-28 Pedro Alves <pedro@codesourcery.com>
5101
5102 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5103 debug_threads check. Avoid a linear search when not doing debug
5104 output.
5105
ec48365d
PA
51062010-08-27 Pedro Alves <pedro@codesourcery.com>
5107
5108 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5109 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5110 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5111 (process_event): Change local fd's type to gdb_fildes_t.
5112 (create_file_handler): Adjust prototype.
5113 (delete_file_handler): Adjust prototype.
5114 (handle_file_event): Adjust prototype. Use pfildes.
5115 (create_file_event): Adjsut prototype.
5116 * remote-utils.c (remote_desc, listen_desc): Change type to
5117 gdb_fildes_t.
5118 * server.h: New gdb_fildes_t typedef.
5119 [USE_WIN32API]: Include winsock2.h.
5120 (delete_file_handler, add_file_handler): Adjust prototypes.
5121 (pfildes): Declare.
5122 * utils.c (pfildes): New.
5123
854d88f0
PA
51242010-08-27 Pedro Alves <pedro@codesourcery.com>
5125
5126 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5127 * configure: Regenerate.
5128
0146f85b
PA
51292010-08-27 Pedro Alves <pedro@codesourcery.com>
5130
5131 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5132 (linux_done_accessing_memory): ... this.
5133 (linux_target_ops): Adjust.
5134 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5135 * nto-low.c (nto_target_ops): Adjust comment.
5136 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5137 * spu-low.c (spu_target_ops): Adjust comment.
5138 * target.h (target_ops): Rename unprepare_to_access_memory field
5139 to done_accessing_memory.
5140 (unprepare_to_access_memory): Rename to ...
5141 (done_accessing_memory): ... this.
5142
90d74c30
PA
51432010-08-26 Pedro Alves <pedro@codesourcery.com>
5144
5145 * linux-low.c (linux_prepare_to_access_memory): New.
5146 (linux_unprepare_to_access_memory): New.
5147 (linux_target_ops): Install them.
5148 * server.c (read_memory): Rename to ...
5149 (gdb_read_memory): ... this. Use
5150 prepare_to_access_memory/prepare_to_access_memory.
5151 (write_memory): Rename to ...
5152 (gdb_write_memory): ... this. Use
5153 prepare_to_access_memory/prepare_to_access_memory.
5154 (handle_search_memory_1): Adjust.
5155 (process_serial_event): Adjust.
5156 * target.h (struct target_ops): New fields
5157 prepare_to_access_memory and unprepare_to_access_memory.
5158 (prepare_to_access_memory, unprepare_to_access_memory): New.
5159 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5160 prepare_to_access_memory/prepare_to_access_memory.
5161 * nto-low.c (nto_target_ops): Adjust.
5162 * spu-low.c (spu_target_ops): Adjust.
5163 * win32-low.c (win32_target_ops): Adjust.
5164
fd467969
PA
51652010-08-26 Pedro Alves <pedro@codesourcery.com>
5166
5167 * Makefile.in (WARN_CFLAGS): Get it from configure.
5168 (WERROR_CFLAGS): New.
5169 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5170 * configure.ac: Introduce --enable-werror, which adds -Werror to
5171 the compiler command line. Enabled by default. Disable with
5172 --disable-werror. Add -Wdeclaration-after-statement
5173 Wpointer-arith and -Wformat-nonliteral to warning flags.
5174 * configure: Regenerate.
5175
331e2f5f
PA
51762010-08-26 Pedro Alves <pedro@codesourcery.com>
5177
5178 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5179
e581f2b4
PA
51802010-08-26 Pedro Alves <pedro@codesourcery.com>
5181
5182 * gdbreplay.c (remote_error): New.
5183 (gdbchar): New.
5184 (expect): Use gdbchar. Check for error reading from GDB.
5185 Clarify sync error output.
5186 (play): Check for errors writing to GDB.
5187 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5188 * remote-utils.c (getpkt): Check for errors writing to the remote
5189 descriptor.
5190
3c11dd79
PA
51912010-08-25 Pedro Alves <pedro@codesourcery.com>
5192
5193 * linux-low.c (linux_wait_1): Move non-debugging code out of
5194 `debug_threads' control.
5195
d20a8ad9
PA
51962010-08-25 Pedro Alves <pedro@codesourcery.com>
5197
5198 * linux-low.c (linux_wait_1): Don't set last_status here.
5199 * server.c (push_event, queue_stop_reply_callback): Assert we're
5200 not pushing a TARGET_WAITKIND_IGNORE event.
5201 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5202 (myresume, handle_target_event): Set the thread's last_resume_kind
5203 and last_status from the target returned status.
5204
964e4306
PA
52052010-08-25 Pedro Alves <pedro@codesourcery.com>
5206
5207 PR threads/10729
5208
5209 * linux-x86-low.c (update_debug_registers_callback): New.
5210 (i386_dr_low_set_addr): Use it.
5211 (i386_dr_low_get_addr): New.
5212 (i386_dr_low_set_control): Use update_debug_registers_callback.
5213 (i386_dr_low_get_control): New.
5214 (i386_dr_low_get_status): Adjust.
5215 * linux-low.c (linux_stop_lwp): New.
5216 * linux-low.h (linux_stop_lwp): Declare.
5217
5218 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5219 argument instead of a i386_debug_reg_state.
5220 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5221 a i386_debug_reg_state.
5222 (i386_insert_aligned_watchpoint): Adjust.
5223 (i386_remove_aligned_watchpoint): Adjust.
5224 (i386_low_stopped_data_address): Read the debug registers from the
5225 inferior instead of from the mirrors.
5226 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5227 (i386_dr_low_get_addr): Declare.
5228 (i386_dr_low_get_control): Declare.
5229 (i386_dr_low_get_status): Change prototype.
5230
5231 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5232 (i386_dr_low_get_addr): New.
5233 (i386_dr_low_get_control): New.
5234 (i386_dr_low_get_status): Adjust prototype. Return
5235 dr_status_mirror.
5236 (i386_initial_stuff): Clear dr_status_mirror and
5237 dr_control_mirror.
5238 (i386_get_thread_context): Adjust.
5239 (i386_set_thread_context): Adjust.
5240 (i386_thread_added): Adjust.
5241
5f21a75b
PA
52422010-08-24 Pedro Alves <pedro@codesourcery.com>
5243
5244 * linux-low.h (linux_thread_area): Delete declaration.
5245
3e4c1235
TS
52462010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5247
5248 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5249 after its termination.
5250
1971b033
PA
52512010-08-09 Pedro Alves <pedro@codesourcery.com>
5252
5253 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5254 (gdb_wants_all_stopped): Delete.
5255 (linux_wait_1): Don't call them.
5256 * server.c (handle_v_cont): Tag all threads as want-stopped.
5257 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5258 stopped as "client-wants-stopped".
5259
310444ac
PA
52602010-07-31 Pedro Alves <pedro@codesourcery.com>
5261
5262 * Makefile.in (signals_h): New.
5263 (server_h): Depend on it.
5264 (server.o): Don't depend on $(signals_def).
5265 (signals.o): Depend on $(signals_def).
5266
a19cae16
JK
52672010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5268
5269 * Makefile.in (signals_def): New.
5270 (server_h): Append include/gdb/signals.h and signals_def.
5271 (server.o): Append signals_def.
5272
30d50328
JK
52732010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5274
5275 * server.c (handle_target_event): Use target_signal_to_host for
5276 resume_info.sig initialization.
5277 * target.h (struct thread_resume) <sig>: New comment.
5278
5c3216e2
OS
52792010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5280
c6f46ca0
OS
5281 * server.c (handle_query): strcpy() the returned string from paddress()
5282 instead of sprintf().
5c3216e2
OS
5283 * utils.c (paddress): Return phex_nz().
5284
6bd31874
JB
52852010-07-07 Joel Brobecker <brobecker@adacore.com>
5286
5287 * server.c (handle_v_cont): Call mourn_inferior if process
5288 just exited.
5289 (myresume): Likewise.
5290
0fb4aa4b
PA
52912010-07-01 Pedro Alves <pedro@codesourcery.com>
5292
5293 Static tracepoints, and integration with UST.
5294
5295 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5296 * mem-break.c (uninsert_all_breakpoints)
5297 (reinsert_all_breakpoints): New.
5298 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5299 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5300 (gdb_agent_ust_loaded, helper_thread_id)
5301 (gdb_agent_helper_thread_id): New macros.
5302 (struct ipa_sym_addresses): Add addr_ust_loaded,
5303 addr_helper_thread_id, addr_cmd_buf.
5304 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5305 (in_process_agent_loaded_ust): New.
5306 (write_e_ust_not_loaded): New.
5307 (maybe_write_ipa_ust_not_loaded): New.
5308 (struct collect_static_trace_data_action): New.
5309 (enum tracepoint_type) <static_tracepoint>: New.
5310 (struct tracepoint) <handle>: Mention static tracepoints.
5311 (struct static_tracepoint_ctx): New.
5312 (CMD_BUF_SIZE): New.
5313 (add_tracepoint_action): Handle static tracepoint actions.
5314 (unprobe_marker_at): New.
5315 (clear_installed_tracepoints): Handle static tracepoints.
5316 (cmd_qtdp): Handle static tracepoints.
5317 (probe_marker_at): New.
5318 (cmd_qtstart): Handle static tracepoints.
5319 (response_tracepoint): Handle static tracepoints.
5320 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5321 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5322 (get_context_regcache): Handle static tracepoints.
5323 (do_action_at_tracepoint): Handle static tracepoint actions.
5324 (traceframe_find_block_type): Handle static trace data blocks.
5325 (traceframe_read_sdata): New.
5326 (download_tracepoints): Download static tracepoint actions.
5327 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5328 (GDB_PROBE_NAME): New.
5329 (ust_ops): New.
5330 (GET_UST_SYM): New.
5331 (USTF): New.
5332 (dlsym_ust): New.
5333 (ust_marker_to_static_tracepoint): New.
5334 (gdb_probe): New.
5335 (collect_ust_data_at_tracepoint): New.
5336 (gdb_ust_probe): New.
5337 (UNIX_PATH_MAX, SOCK_DIR): New.
5338 (gdb_ust_connect_sync_socket): New.
5339 (resume_thread, stop_thread): New.
5340 (run_inferior_command): New.
5341 (init_named_socket): New.
5342 (gdb_ust_socket_init): New.
5343 (cstr_to_hexstr): New.
5344 (next_st): New.
5345 (first_marker, next_marker): New.
5346 (response_ust_marker): New.
5347 (cmd_qtfstm, cmd_qtsstm): New.
5348 (unprobe_marker_at, probe_marker_at): New.
5349 (cmd_qtstmat, gdb_ust_thread): New.
5350 (gdb_ust_init): New.
5351 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5352 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5353 (ST_REGENTRY): New.
5354 (x86_64_st_collect_regmap): New.
5355 (X86_64_NUM_ST_COLLECT_GREGS): New.
5356 (AMD64_RIP_REGNUM): New.
5357 (supply_static_tracepoint_registers): New.
5358 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5359 (ST_REGENTRY): New.
5360 (i386_st_collect_regmap): New.
5361 (i386_NUM_ST_COLLECT_GREGS): New.
5362 (supply_static_tracepoint_registers): New.
5363 * server.c (handle_query): Handle qXfer:statictrace:read.
5364 <qSupported>: Report support for StaticTracepoints, and
5365 qXfer:statictrace:read features.
5366 * server.h (traceframe_read_sdata)
5367 (supply_static_tracepoint_registers): Declare.
5368 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5369 (unpack_varlen_hex): Include in IPA build.
5370 * Makefile.in (ustlibs, ustinc): New.
5371 (IPA_OBJS): Add remote-utils-ipa.o.
5372 ($(IPA_LIB)): Link -ldl and -lpthread.
5373 (UST_CFLAGS): New.
5374 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5375 * config.in, configure: Regenerate.
5376
9e4344e5
PA
53772010-06-20 Ian Lance Taylor <iant@google.com>
5378 Pedro Alves <pedro@codesourcery.com>
5379
5380 * linux-x86-low.c (always_true): Delete.
5381 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5382 trying to fool the compiler with always_true.
5383
c6beb2cb
PA
53842010-06-20 Pedro Alves <pedro@codesourcery.com>
5385
5386 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5387 conditions in gdbserver.
5388
d2ed6730
UW
53892010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5390
5391 * spu-low.c (spu_read_memory): Wrap around local store limit.
5392 (spu_write_memory): Likewise.
5393
4e29fb54
PA
53942010-06-15 Pedro Alves <pedro@codesourcery.com>
5395
5396 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5397 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5398 LONGEST uses.
5399 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5400 uses.
5401 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5402 uses with LONGEST uses.
5403
6a271cae
PA
54042010-06-14 Stan Shebs <stan@codesourcery.com>
5405 Pedro Alves <pedro@codesourcery.com>
5406
5407 Bytecode compiler.
5408
5409 * linux-x86-low.c: Include limits.h.
5410 (add_insns): New.
5411 (always_true): New.
5412 (EMIT_ASM): New.
5413 (EMIT_ASM32): New.
5414 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5415 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5416 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5417 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5418 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5419 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5420 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5421 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5422 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5423 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5424 (amd64_emit_void_call_2): New.
5425 (amd64_emit_ops): New.
5426 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5427 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5428 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5429 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5430 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5431 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5432 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5433 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5434 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5435 (i386_emit_stack_adjust, i386_emit_int_call_1)
5436 (i386_emit_void_call_2): New.
5437 (i386_emit_ops): New.
5438 (x86_emit_ops): New.
5439 (the_low_target): Install x86_emit_ops.
5440 * server.h (struct emit_ops): New.
5441 (get_raw_reg_func_addr): Declare.
5442 (current_insn_ptr, emit_error): Declare.
5443 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5444 (set_trace_state_variable_value): New defines.
5445 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5446 addr_get_trace_state_variable_value and
5447 addr_set_trace_state_variable_value.
5448 (symbol_list): New fields for get_raw_reg,
5449 get_trace_state_variable_value and set_trace_state_variable_value.
5450 (condfn): New typedef.
5451 (struct tracepoint): New field `compiled_cond'.
5452 (do_action_at_tracepoint): Clear compiled_cond.
5453 (get_trace_state_variable_value, set_trace_state_variable_value):
5454 Export in the IPA.
5455 (condition_true_at_tracepoint): If there's a compiled condition,
5456 run that.
5457 (current_insn_ptr, emit_error): New globals.
5458 (struct bytecode_address): New.
5459 (get_raw_reg_func_addr): New.
5460 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5461 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5462 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5463 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5464 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5465 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5466 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5467 (compile_tracepoint_condition, compile_bytecodes): New.
5468 * target.h (emit_ops): Forward declare.
5469 (struct target_ops): New field emit_ops.
5470 (target_emit_ops): New.
5471 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5472 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5473 * linux-low.c (linux_emit_ops): New.
5474 (linux_target_ops): Install it.
5475 * linux-low.h (struct linux_target_ops): New field emit_ops.
5476
92b72907
UW
54772010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5478
5479 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5480 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5481
fa593d66
PA
54822010-06-01 Pedro Alves <pedro@codesourcery.com>
5483 Stan Shebs <stan@codesourcery.com>
5484
5485 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5486 (all): Depend on $(extra_libraries).
5487 (install-only): Install the IPA.
5488 (IPA_OBJS, IPA_LIB): New.
5489 (clean): Remove the IPA lib.
5490 (IPAGENT_CFLAGS): New.
5491 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5492 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5493 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5494 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5495 * configure.ac: Check for atomic builtins support in the compiler.
5496 (IPA_DEPFILES, extra_libraries): Define.
5497 * configure.srv (ipa_obj): Add description.
5498 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5499 (i[34567]86-*-linux*): Set ipa_obj.
5500 (x86_64-*-linux*): Set ipa_obj.
5501 * linux-low.c (stabilizing_threads): New.
5502 (supports_fast_tracepoints): New.
5503 (linux_detach): Stabilize threads before detaching.
5504 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5505 the lwp is either not stabilizing, or is moving out of a jump pad.
5506 (linux_fast_tracepoint_collecting): New.
5507 (maybe_move_out_of_jump_pad): New.
5508 (enqueue_one_deferred_signal): New.
5509 (dequeue_one_deferred_signal): New.
5510 (linux_wait_for_event_1): If moving out of a jump pad, defer
5511 pending signals to later.
5512 (linux_stabilize_threads): New.
5513 (linux_wait_1): Check if threads need moving out of jump pads, and
5514 do it if so.
5515 (stuck_in_jump_pad_callback): New.
5516 (move_out_of_jump_pad_callback): New.
5517 (lwp_running): New.
5518 (linux_resume_one_lwp): Handle moving out of jump pads.
5519 (linux_set_resume_request): Dequeue deferred signals.
5520 (need_step_over_p): Also step over fast tracepoint jumps.
5521 (start_step_over): Also uninsert fast tracepoint jumps.
5522 (finish_step_over): Also reinsert fast tracepoint jumps.
5523 (linux_install_fast_tracepoint_jump): New.
5524 (linux_target_ops): Install linux_stabilize_threads and
5525 linux_install_fast_tracepoint_jump_pad.
5526 * linux-low.h (linux_target_ops) <get_thread_area,
5527 install_fast_tracepoint_jump_pad>: New fields.
5528 (struct lwp_info) <collecting_fast_tracepoint,
5529 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5530 (linux_get_thread_area): Declare.
5531 * linux-x86-low.c (jump_insn): New.
5532 (x86_get_thread_area): New.
5533 (append_insns): New.
5534 (push_opcode): New.
5535 (amd64_install_fast_tracepoint_jump_pad): New.
5536 (i386_install_fast_tracepoint_jump_pad): New.
5537 (x86_install_fast_tracepoint_jump_pad): New.
5538 (the_low_target): Install x86_get_thread_area and
5539 x86_install_fast_tracepoint_jump_pad.
5540 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5541 (struct fast_tracepoint_jump): New.
5542 (fast_tracepoint_jump_insn): New.
5543 (fast_tracepoint_jump_shadow): New.
5544 (find_fast_tracepoint_jump_at): New.
5545 (fast_tracepoint_jump_here): New.
5546 (delete_fast_tracepoint_jump): New.
5547 (set_fast_tracepoint_jump): New.
5548 (uninsert_fast_tracepoint_jumps_at): New.
5549 (reinsert_fast_tracepoint_jumps_at): New.
5550 (set_breakpoint_at): Use write_inferior_memory.
5551 (uninsert_raw_breakpoint): Use write_inferior_memory.
5552 (check_mem_read): Mask out fast tracepoint jumps.
5553 (check_mem_write): Mask out fast tracepoint jumps.
5554 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5555 (set_fast_tracepoint_jump): Declare.
5556 (delete_fast_tracepoint_jump)
5557 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5558 (reinsert_fast_tracepoint_jumps_at): Declare.
5559 * regcache.c: Don't compile many functions when building the
5560 in-process agent library.
5561 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5562 the register buffer in the heap.
5563 (free_register_cache): If the register buffer isn't owned by the
5564 regcache, don't free it.
5565 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5566 pre-existing register caches.
5567 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5568 type.
5569 (convert_ascii_to_int): : Constify `from' parameter type.
5570 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5571 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5572 the needed buffer in-place.
5573 (relocate_instruction): New.
5574 * server.c (handle_query) <qSymbols>: If the target supports
5575 tracepoints, give it a chance of looking up symbols. Report
5576 support for fast tracepoints.
5577 (handle_status): Stabilize threads.
5578 (process_serial_event): Adjust.
5579 * server.h (struct fast_tracepoint_jump): Forward declare.
5580 (struct process_info) <fast_tracepoint_jumps>: New field.
5581 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5582 (decode_X_packet, decode_M_packet): Adjust.
5583 (relocate_instruction): Declare.
5584 (in_process_agent_loaded): Declare.
5585 (tracepoint_look_up_symbols): Declare.
5586 (struct fast_tpoint_collect_status): Declare.
5587 (fast_tracepoint_collecting): Declare.
5588 (force_unlock_trace_buffer): Declare.
5589 (handle_tracepoint_bkpts): Declare.
5590 (initialize_low_tracepoint)
5591 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5592 * target.h (struct target_ops) <stabilize_threads,
5593 install_fast_tracepoint_jump_pad>: New fields.
5594 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5595 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5596 [HAVE_STDINT_H]: Include stdint.h.
5597 (trace_debug_1): Rename to ...
5598 (trace_vdebug): ... this.
5599 (trace_debug): Rename to ...
5600 (trace_debug_1): ... this. Add `level' parameter.
5601 (trace_debug): New.
5602 (ATTR_USED, ATTR_NOINLINE): New.
5603 (IP_AGENT_EXPORT): New.
5604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5605 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5606 (about_to_request_buffer_space, trace_buffer_is_full)
5607 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5608 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5609 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5610 (traceframe_write_count, traceframes_created)
5611 (trace_state_variables)
5612 New renaming defines.
5613 (struct ipa_sym_addresses): New.
5614 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5615 (symbol_list): New.
5616 (ipa_sym_addrs): New.
5617 (all_tracepoint_symbols_looked_up): New.
5618 (in_process_agent_loaded): New.
5619 (write_e_ipa_not_loaded): New.
5620 (maybe_write_ipa_not_loaded): New.
5621 (tracepoint_look_up_symbols): New.
5622 (debug_threads) [IN_PROCESS_AGENT]: New.
5623 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5624 (UNKNOWN_SIDE_EFFECTS): New.
5625 (stop_tracing): New.
5626 (flush_trace_buffer): New.
5627 (stop_tracing_bkpt): New.
5628 (flush_trace_buffer_bkpt): New.
5629 (read_inferior_integer): New.
5630 (read_inferior_uinteger): New.
5631 (read_inferior_data_pointer): New.
5632 (write_inferior_data_pointer): New.
5633 (write_inferior_integer): New.
5634 (write_inferior_uinteger): New.
5635 (struct collect_static_trace_data_action): Delete.
5636 (enum tracepoint_type): New.
5637 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5638 <actions_str, step_actions, step_actions_str>: Only include in
5639 GDBserver.
fa593d66
PA
5640 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5641 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5642 (tracepoints): Use IP_AGENT_EXPORT.
5643 (last_tracepoint): Don't include in the IPA.
5644 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5645 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5646 (alloced_trace_state_variables): New.
5647 (trace_state_variables): Use IP_AGENT_EXPORT.
5648 (traceframe_t): Delete unused variable.
5649 (circular_trace_buffer): Don't include in the IPA.
5650 (trace_buffer_start): Delete.
5651 (struct trace_buffer_control): New.
5652 (trace_buffer_free): Delete.
5653 (struct ipa_trace_buffer_control): New.
5654 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5655 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5656 New.
5657 (trace_buffer_ctrl): New.
5658 (TRACE_BUFFER_CTRL_CURR): New.
5659 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5660 Reimplement as macros.
5661 (trace_buffer_wrap): Delete.
5662 (traceframe_write_count, traceframe_read_count)
5663 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5664 (struct tracepoint_hit_ctx) <type>: New field.
5665 (struct fast_tracepoint_ctx): New.
5666 (memory_barrier): New.
5667 (cmpxchg): New.
5668 (record_tracepoint_error): Update atomically in the IPA.
5669 (clear_inferior_trace_buffer): New.
5670 (about_to_request_buffer_space): New.
5671 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5672 updating the same buffer.
5673 (add_tracepoint): Default the tracepoint's type to trap
5674 tracepoint, and orig_size to -1.
5675 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5676 internal variables.
5677 (create_trace_state_variable): New parameter `gdb'. Handle it.
5678 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5679 (cmd_qtdp): Handle fast tracepoints.
5680 (cmd_qtdv): Adjust.
5681 (max_jump_pad_size): New.
5682 (gdb_jump_pad_head): New.
5683 (get_jump_space_head): New.
5684 (claim_jump_space): New.
5685 (sort_tracepoints): New.
5686 (MAX_JUMP_SIZE): New.
5687 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5688 IPA.
5689 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5690 support. Upload fast traceframes, and delete internal IPA
5691 breakpoints.
5692 (stop_tracing_handler): New.
5693 (flush_trace_buffer_handler): New.
5694 (cmd_qtstop): Upload fast tracepoints.
5695 (response_tracepoint): Handle fast tracepoints.
5696 (tracepoint_finished_step): Upload fast traceframes. Set the
5697 tracepoint hit context's tracepoint type.
5698 (handle_tracepoint_bkpts): New.
5699 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5700 type. Add comment about fast tracepoints.
5701 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5702 non-existing action_str field.
5703 (get_context_regcache): Handle fast tracepoints.
5704 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5705 to the regcache.
5706 (fast_tracepoint_from_jump_pad_address): New.
5707 (fast_tracepoint_from_ipa_tpoint_address): New.
5708 (collecting_t): New.
5709 (force_unlock_trace_buffer): New.
5710 (fast_tracepoint_collecting): New.
5711 (collecting): New.
5712 (gdb_collect): New.
5713 (write_inferior_data_ptr): New.
5714 (target_tp_heap): New.
5715 (target_malloc): New.
5716 (download_agent_expr): New.
5717 (UALIGN): New.
5718 (download_tracepoints): New.
5719 (download_trace_state_variables): New.
5720 (upload_fast_traceframes): New.
5721 (IPA_FIRST_TRACEFRAME): New.
5722 (IPA_NEXT_TRACEFRAME_1): New.
5723 (IPA_NEXT_TRACEFRAME): New.
5724 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5725 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5726 (gdb_jump_pad_buffer_end): New.
5727 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5728 (initialize_tracepoint): Adjust.
5729 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5730 buffer. Initialize the low module.
5731 * utils.c (PREFIX, TOOLNAME): New.
5732 (malloc_failure): Use PREFIX.
5733 (error): In the IPA, an error causes an exit.
5734 (fatal, warning): Use PREFIX.
5735 (internal_error): Use TOOLNAME.
5736 (NUMCELLS): Increase to 10.
5737 * configure, config.in: Regenerate.
5738
d149dd1d
PA
57392010-06-01 Pedro Alves <pedro@codesourcery.com>
5740
5741 * server.c (handle_query) <qSupported>: Do two passes over the
5742 qSupported string to avoid nesting strtok.
5743
f6528abd
JK
57442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5745
5746 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5747 (CDEPS): New.
5748 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5749 -Wl,--dynamic-list.
5750 * configure: Regenerate.
5751 * proc-service.list: New.
5752
ca2a87a0
JK
57532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5754
5755 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5756 New comment.
5757
363a6e9f
OS
57582010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5759
5760 * gdbreplay.c (remote_open): Check error return from socket() call by
5761 its equality to -1 not by it being negative.
5762 * remote-utils.c (remote_open): Likewise.
5763
d23b6cb1
PA
57642010-05-23 Pedro Alves <pedro@codesourcery.com>
5765
5766 * config.h: Regenerate.
5767
28d3cf85
MK
57682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5769
5770 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5771 doesn't provide PTRACE_GET_THREAD_AREA.
5772
fea36a59
MK
57732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5774
5775 * linux-m68k-low.c: Include <asm/ptrace.h>
5776 (ps_get_thread_area): Implement.
5777
24b066ba
DE
57782010-05-03 Doug Evans <dje@google.com>
5779
5780 * event-loop.c (struct callback_event): New struct.
5781 (callback_list): New global.
5782 (append_callback_event, delete_callback_event): New functions.
5783 (process_callback): New function.
5784 (start_event_loop): Call it.
5785 * remote-utils.c (NOT_SCHEDULED): Define.
5786 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5787 moved out of readchar.
5788 (readchar): Rewrite. Call reschedule before returning.
5789 (reset_readchar): New function.
5790 (remote_close): Call it.
5791 (process_remaining, reschedule): New functions.
5792 * server.h (callback_handler_func): New typedef.
5793 (append_callback_event, delete_callback_event): Declare.
5794
9836d6ea
PA
57952010-05-03 Pedro Alves <pedro@codesourcery.com>
5796
5797 * proc-service.c (ps_pglobal_lookup): Use
5798 thread_db_look_up_one_symbol.
5799 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5800 parameter. Use it instead of all_symbols_looked_up.
5801 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5802 field.
5803 (all_symbols_looked_up): Don't declare.
5804 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5805 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5806 field.
5807 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5808 Set all_symbols_looked_up here.
5809 (thread_db_look_up_one_symbol): New.
5810 (thread_db_get_tls_address): Adjust.
5811 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5812 thread_db object on the heap, and tentatively set it in the
5813 process structure.
5814 (thread_db_init): Don't set all_symbols_looked_up here.
5815 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5816
7984d532
PA
58172010-05-03 Pedro Alves <pedro@codesourcery.com>
5818
5819 * linux-low.c (linux_kill, linux_detach): Adjust.
5820 (status_pending_p_callback): Remove redundant statement. Check
5821 for !TARGET_WAITIKIND_IGNORE, instead of
5822 TARGET_WAITKIND_STOPPED.
5823 (handle_tracepoints): Make sure LWP is locked. Adjust.
5824 (linux_wait_for_event_1): Adjust.
5825 (linux_cancel_breakpoints): New.
5826 (unsuspend_one_lwp): New.
5827 (unsuspend_all_lwps): New.
5828 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5829 (send_sigstop_callback): Change return type to int, add new
5830 `except' parameter and handle it.
5831 (suspend_and_send_sigstop_callback): New.
5832 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5833 pass them down. If SUSPEND, also increment the lwp's suspend
5834 count.
5835 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5836 (need_step_over_p): Don't consider suspended LWPs.
5837 (start_step_over): Adjust.
5838 (proceed_one_lwp): Change return type to int, add new `except'
5839 parameter and handle it.
5840 (unsuspend_and_proceed_one_lwp): New.
5841 (proceed_all_lwps): Use find_inferior instead of
5842 for_each_inferior.
5843 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5844 also decrement the suspend count of LWPs. Pass `except' down,
5845 instead of hacking its suspend count.
5846 (linux_pause_all): Add `freeze' parameter. Adjust.
5847 (linux_unpause_all): New.
5848 (linux_target_ops): Install linux_unpause_all.
5849 * server.c (handle_status): Adjust.
5850 * target.h (struct target_ops): New fields `unpause_all' and
5851 `cancel_breakpoints'. Add new parameter to `pause_all'.
5852 (pause_all): Add new `freeze' parameter.
5853 (unpause_all): New.
5854 (cancel_breakpoints): New.
5855 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5856 cancel breakpoints.
5857 (cmd_qtstart): Pause threads.
5858 (stop_tracing): Pause threads, and cancel breakpoints.
5859 * win32-low.c (win32_target_ops): Adjust.
5860
e471f25b
PA
58612010-05-03 Pedro Alves <pedro@codesourcery.com>
5862
5863 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5864 the inferior right away from here...
5865 (linux_wait_1): ... to here, and adjust to check the thread's
5866 last_resume_kind instead of the lwp's step or stop_expected flags.
5867
1915ef4f
PA
58682010-05-02 Pedro Alves <pedro@codesourcery.com>
5869
5870 * README: Use consistent `GDB' and `GDBserver' spellings.
5871
f9e39928
PA
58722010-05-02 Pedro Alves <pedro@codesourcery.com>
5873
5874 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5875 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5876 (linux_detach_one_lwp): Assume the lwp is stopped.
5877 (any_thread_of): Delete.
5878 (linux_detach): Stop all lwps here. Don't blindly delete all
5879 breakpoints.
5880 (delete_lwp_callback): New.
5881 (linux_mourn): Delete all lwps of the process that is gone.
5882 (linux_wait_1): Don't delete the last lwp of the process here.
5883 * mem-break.h (mark_breakpoints_out): Declare.
5884 * mem-break.c (mark_breakpoints_out): New.
5885 (free_all_breakpoints): Use it.
5886 * server.c (handle_target_event): If the process is gone, mark
5887 breakpoints out.
5888 * thread-db.c (struct thread_db) <create_bp>: New field.
5889 (thread_db_enable_reporting): Fix prototype. Store a thread event
5890 breakpoint reference in the thread_db struct.
5891 (thread_db_load_search): Clear the thread_db object.
5892 (try_thread_db_load_1): Ditto.
5893 (switch_to_process): New.
5894 (disable_thread_event_reporting): Use it.
5895 (remove_thread_event_breakpoints): New.
5896 (thread_db_detach, thread_db_mourn): Use it.
5897
1e7fc18c
PA
58982010-05-01 Pedro Alves <pedro@codesourcery.com>
5899
5900 * linux-low.c (linux_enable_event_reporting): New.
5901 (linux_wait_for_event_1, handle_extended_wait): Use it.
5902
02fc4de7
PA
59032010-04-30 Pedro Alves <pedro@codesourcery.com>
5904
5905 * linux-low.c (linux_kill_one_lwp, linux_kill)
5906 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5907 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5908 SIGSTOP even if the LWP is stopped.
5909 (send_sigstop_callback): New.
5910 (stop_all_lwps): Use send_sigstop_callback instead.
5911 (linux_resume_one_thread): Adjust.
5912 (proceed_one_lwp): Still proceed an LWP that the client has
5913 requested to stop, if we haven't reported it as stopped yet. Make
5914 sure that LWPs the client want stopped, have a pending SIGSTOP.
5915
bc3b5632
DE
59162010-04-26 Doug Evans <dje@google.com>
5917
ae1ada35
DE
5918 * server.c (handle_general_set): Make static.
5919
bc3b5632
DE
5920 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5921 Print received char after testing for error/eof instead of before.
5922 (input_interrupt): Tweak comment.
5923
65730243
DE
59242010-04-23 Doug Evans <dje@google.com>
5925
5926 * server.c (start_inferior): Print inferior argv if --debug.
5927
a8ae7dc0
AR
59282010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5929
5930 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5931 * nto-x86-low.c: Include server.h
5932
1c07cc19
PM
59332010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5934
5935 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5936 be consistent with other sources of this directory.
5937 (init_registers_amd64): Correct name of source file of this function
5938 in the comment.
5939
e0a61e09
PM
59402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5941
5942 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5943 64-bit executables.
5944
54709339
PM
59452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5946
5947 * win32-i386-low.c: Add 64-bit support.
5948 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5949 (init_registers_amd64): Declare.
5950 (mappings): Add 64-bit version of array.
5951 (init_windows_x86): New function.
5952 (the_low_target): Change init_arch field to init_windows_x86.
5953
e8f0053d
PM
59542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5955
5956 * win32-low.c: Adapt to support also 64-bit architecture.
5957 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5958 (get_image_name): Use SIZE_T type for local variable `done'.
5959 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5960 (toolhelp_get_dll_name): Idem.
5961 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5962 Use uintptr_t typecast to avoid warning.
5963 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5964 (handle_exception): Use phex_nz to avoid warning.
5965 (win32_wait): Remove unused local variable `process'.
5966
c481e77e
PM
59672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5968
5969 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5970 `amd64-avx.o'.
5971
12ea4b69
PM
59722010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5973
5974 * configure.ac: Use `ws2_32' library for srv_mingw.
5975 * configure: Regenerate.
5976 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5977 * remote-utils.c: Likewise.
5978
f6d1620c
L
59792010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5980
5981 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5982 if __x86_64__ is defined.
5983
8e642873
PM
59842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5985
5986 * configure: Regenerate.
5987
711e434b
PM
59882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5989
5990 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5991 * target.h (target_ops): New get_tib_address field.
5992 * win32-low.h (win32_thread_info): Add thread_local_base field.
5993 * win32-low.c (child_add_thread): Add tlb argument.
5994 Set thread_local_base field to TLB.
5995 (get_child_debug_event): Adapt to child_add_thread change.
5996 (win32_get_tib_address): New function.
5997 (win32_target_ops): Set get_tib_address field to
5998 win32_get_tib_address.
5999 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6000
505106cd
PA
60012010-04-12 Pedro Alves <pedro@codesourcery.com>
6002
505106cd
PA
6003 * linux-low.c (linux_mourn): Also remove the process.
6004 * server.c (handle_target_event): Don't remove the process here.
6005 * nto-low.c (nto_mourn): New.
6006 (nto_target_ops): Install it.
6007 * spu-low.c (spu_mourn): New.
6008 (spu_target_ops): Install it.
6009 * win32-low.c (win32_mourn): New.
6010 (win32_target_ops): Install it.
6011
e8470a06
PA
60122010-04-12 Pedro Alves <pedro@codesourcery.com>
6013
6014 * server.h (buffer_xml_printf): Remove redundant `;'.
6015
45ba0d02
PA
60162010-04-12 Pedro Alves <pedro@codesourcery.com>
6017
6018 * regcache.c (set_register_cache): Invalidate regcaches before
6019 changing the register cache layout.
6020 (regcache_invalidate_one): Allow a NULL regcache.
6021 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6022 regcaches before changing the register cache layout or the target
6023 regsets.
6024
59e04013
L
60252010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6026
6027 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6028 variable warning on Linux/x86-64.
6029
8336d594
PA
60302010-04-11 Pedro Alves <pedro@codesourcery.com>
6031
6032 GDBserver disconnected tracing support.
6033
6034 * linux-low.c (linux_remove_process): Delete.
6035 (add_lwp): Don't set last_resume_kind here.
6036 (linux_kill): Use `mourn'.
6037 (linux_detach): Use `thread_db_detach', and `mourn'.
6038 (linux_mourn): New.
6039 (linux_attach_lwp_1): Adjust comment.
6040 (linux_attach): last_resume_kind moved the thread_info; adjust.
6041 (status_pending_p_callback): Adjust.
6042 (linux_wait_for_event_1): Adjust.
6043 (count_events_callback, select_singlestep_lwp_callback)
6044 (select_event_lwp_callback, cancel_breakpoints_callback)
6045 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6046 (proceed_one_lwp): Adjust.
6047 (linux_async): Add debug output.
6048 (linux_thread_stopped): New.
6049 (linux_pause_all): New.
6050 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6051 linux_pause_all.
6052 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6053 (thread_db_free): Delete declaration.
6054 (thread_db_detach, thread_db_mourn): Declare.
6055 * thread-db.c (thread_db_init): Use thread_db_mourn.
6056 (thread_db_free): Delete, split in two.
6057 (disable_thread_event_reporting): New.
6058 (thread_db_detach): New.
6059 (thread_db_mourn): New.
6060
6061 * server.h (struct thread_info) <last_resume_kind>: New field.
6062 <attached>: Add comment.
6063 <gdb_detached>: New field.
6064 (handler_func): Change return type to int.
6065 (handle_serial_event, handle_target_event): Ditto.
6066 (gdb_connected): Declare.
6067 (tracing): Delete.
6068 (disconnected_tracing): Declare.
6069 (stop_tracing): Declare.
6070
6071 * server.c (handle_query) <qSupported>: Report support for
6072 disconnected tracing.
6073 (queue_stop_reply_callback): Account for running threads.
6074 (gdb_wants_thread_stopped): New.
6075 (gdb_wants_all_threads_stopped): New.
6076 (gdb_reattached_process): New.
6077 (handle_status): Clear the `gdb_detached' flag of all processes.
6078 In all-stop, stop all threads.
6079 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6080 (process_serial_event): If the remote connection breaks, or if an
6081 exit was forced with "monitor exit", force an event loop exit.
6082 Handle disconnected tracing on detach.
6083 (handle_serial_event): Adjust.
6084 (handle_target_event): If GDB isn't connected, forward events back
6085 to the inferior, unless the last process exited, in which case,
6086 exit gdbserver. Adjust interface.
6087
6088 * remote-utils.c (remote_open): Don't block in accept. Instead
6089 register an event loop source on the listen socket file
6090 descriptor. Refactor bits into ...
6091 (listen_desc): ... this new global.
6092 (gdb_connected): ... this new function.
6093 (enable_async_notification): ... this new function.
6094 (handle_accept_event): ... this new function.
6095 (remote_close): Clear remote_desc.
6096
6097 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6098
6099 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6100 New fields.
6101 (mourn_inferior): Define.
6102 (target_process_qsupported): Avoid the dangling else problem.
6103 (thread_stopped): Define.
6104 (pause_all): Define.
6105 (target_waitstatus_to_string): Declare.
6106 * target.c (target_waitstatus_to_string): New.
6107
6108 * tracepoint.c (tracing): Make extern.
6109 (disconnected_tracing): New.
6110 (stop_tracing): Make extern. Handle tracing stops due to GDB
6111 disconnecting.
6112 (cmd_qtdisconnected): New.
6113 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6114 (handle_tracepoint_general_set): Handle QTDisconnected.
6115
6116 * event-loop.c (event_handler_func): Change return type to int.
6117 (process_event): Bail out if the event handler wants the event
6118 loop to stop.
6119 (handle_file_event): Ditto.
6120 (start_event_loop): Bail out if the event handler wants the event
6121 loop to stop.
6122
6123 * nto-low.c (nto_target_ops): Adjust.
6124 * spu-low.c (spu_wait): Don't remove the process here.
6125 (spu_target_ops): Adjust.
6126 * win32-low.c (win32_wait): Don't remove the process here.
6127 (win32_target_ops): Adjust.
6128
5d267c4c
PA
61292010-04-11 Pedro Alves <pedro@codesourcery.com>
6130
6131 * regcache.c (realloc_register_cache): Invalidate inferior's
6132 regcache before recreating it.
6133
623ccd72
PA
61342010-04-09 Pedro Alves <pedro@codesourcery.com>
6135
6136 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6137
219f2f23
PA
61382010-04-09 Stan Shebs <stan@codesourcery.com>
6139 Pedro Alves <pedro@codesourcery.com>
6140
6141 * server.h (LONGEST): New.
6142 (struct thread_info) <while_stepping>: New field.
6143 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6144 Declare.
6145 (initialize_tracepoint, handle_tracepoint_general_set)
6146 (handle_tracepoint_query, tracepoint_finished_step)
6147 (tracepoint_was_hit, release_while_stepping_state_list):
6148 (current_traceframe): Declare.
6149 * server.c (handle_general_set): Handle tracepoint packets.
6150 (read_memory): New.
6151 (write_memory): New.
6152 (handle_search_memory_1): Use read_memory.
6153 (handle_query): Report support for conditional tracepoints, trace
6154 state variables, and tracepoint sources. Handle tracepoint
6155 queries.
6156 (main): Initialize the tracepoints module.
6157 (process_serial_event): Handle traceframe reads/writes.
6158
6159 * linux-low.c (handle_tracepoints): New.
6160 (linux_wait_1): Call it.
6161 (linux_resume_one_lwp): Handle while-stepping.
6162 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6163 (linux_target_ops): Install them.
6164 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6165 New field.
6166 * linux-x86-low.c (x86_supports_tracepoints): New.
6167 (the_low_target). Install it.
6168
6169 * mem-break.h (delete_breakpoint): Declare.
6170 * mem-break.c (delete_breakpoint): Make external.
6171
6172 * target.h (struct target_ops): Add `supports_tracepoints',
6173 `read_pc', and `write_pc' fields.
6174 (target_supports_tracepoints): Define.
6175 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6176 (phex_nz): New.
6177
6178 * regcache.h (struct regcache) <registers_owned>: New field.
6179 (init_register_cache, regcache_cpy): Declare.
6180 (regcache_read_pc, regcache_write_pc): Declare.
6181 (register_cache_size): Declare.
6182 (supply_regblock): Declare.
6183 * regcache.c (init_register_cache): New.
6184 (new_register_cache): Use it.
6185 (regcache_cpy): New.
6186 (register_cache_size): New.
6187 (supply_regblock): New.
6188 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6189
219f2f23
PA
6190 * tracepoint.c: New.
6191
6192 * Makefile.in (OBS): Add tracepoint.o.
6193 (tracepoint.o): New rule.
6194
3a13a53b
L
61952010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6196
6197 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6198 (i386-mmx.o): New.
6199 (i386-mmx.c): Likewise.
6200 (i386-mmx-linux.o): Likewise.
6201 (i386-mmx-linux.c): Likewise.
6202
6203 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6204 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6205 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6206 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6207
6208 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6209 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6210 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6211
1570b33e
L
62122010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6213
6214 * Makefile.in (clean): Updated.
6215 (i386-avx.o): New.
6216 (i386-avx.c): Likewise.
6217 (i386-avx-linux.o): Likewise.
6218 (i386-avx-linux.c): Likewise.
6219 (amd64-avx.o): Likewise.
6220 (amd64-avx.c): Likewise.
6221 (amd64-avx-linux.o): Likewise.
6222 (amd64-avx-linux.c): Likewise.
6223
6224 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6225 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6226 (srv_amd64_regobj): Add amd64-avx.o.
6227 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6228 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6229 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6230 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6231 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6232 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6233 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6234
6235 * i387-fp.c: Include "i386-xstate.h".
6236 (i387_xsave): New.
6237 (i387_cache_to_xsave): Likewise.
6238 (i387_xsave_to_cache): Likewise.
6239 (x86_xcr0): Likewise.
6240
6241 * i387-fp.h (i387_cache_to_xsave): Likewise.
6242 (i387_xsave_to_cache): Likewise.
6243 (x86_xcr0): Likewise.
6244
6245 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6246 * linux-crisv32-low.c (target_regsets): Likewise.
6247 * linux-m68k-low.c (target_regsets): Likewise.
6248 * linux-mips-low.c (target_regsets): Likewise.
6249 * linux-ppc-low.c (target_regsets): Likewise.
6250 * linux-s390-low.c (target_regsets): Likewise.
6251 * linux-sh-low.c (target_regsets): Likewise.
6252 * linux-sparc-low.c (target_regsets): Likewise.
6253 * linux-xtensa-low.c (target_regsets): Likewise.
6254
6255 * linux-low.c: Include <sys/uio.h>.
6256 (regsets_fetch_inferior_registers): Support nt_type.
6257 (regsets_store_inferior_registers): Likewise.
6258 (linux_process_qsupported): New.
6259 (linux_target_ops): Add linux_process_qsupported.
6260
6261 * linux-low.h (regset_info): Add nt_type.
6262 (linux_target_ops): Add process_qsupported.
6263
6264 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6265 and <sys/uio.h>.
6266 (init_registers_i386_avx_linux): New.
6267 (init_registers_amd64_avx_linux): Likewise.
6268 (xmltarget_i386_linux_no_xml): Likewise.
6269 (xmltarget_amd64_linux_no_xml): Likewise.
6270 (PTRACE_GETREGSET): Likewise.
6271 (PTRACE_SETREGSET): Likewise.
6272 (x86_fill_xstateregset): Likewise.
6273 (x86_store_xstateregset): Likewise.
6274 (use_xml): Likewise.
6275 (x86_linux_update_xmltarget): Likewise.
6276 (x86_linux_process_qsupported): Likewise.
6277 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6278 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6279 init_registers_i386_linux here. Call
6280 x86_linux_update_xmltarget.
6281 (the_low_target): Add x86_linux_process_qsupported.
6282
6283 * server.c (handle_query): Call target_process_qsupported.
6284
6285 * target.h (target_ops): Add process_qsupported.
6286 (target_process_qsupported): New.
6287
fc7238bb
PA
62882010-04-03 Pedro Alves <pedro@codesourcery.com>
6289
6290 * inferiors.c (add_thread): Set last_status kind to
6291 TARGET_WAITKIND_IGNORE.
6292 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6293 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6294 (linux_wait_1): Move `thread' local definition to block that uses
6295 it. Don't NULL initialize `event_child'.
6296 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6297 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6298 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6299
bdabb078
PA
63002010-04-01 Pedro Alves <pedro@codesourcery.com>
6301
6302 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6303 an extended waitstatus, or by a watchpoint.
6304 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6305 thread was stepping or has been stopped by a watchpoint.
6306
d3bbe7a0
PA
63072010-04-01 Pedro Alves <pedro@codesourcery.com>
6308
6309 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6310 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6311 of another, then delete the previous, and validate all
6312 breakpoints.
6313 (validate_inserted_breakpoint): New.
6314 (delete_disabled_breakpoints): New.
6315 (validate_breakpoints): New.
6316 (check_mem_read): Validate breakpoints before trusting their
6317 shadow. Delete disabled breakpoints.
6318 (check_mem_write): Validate breakpoints before trusting they
6319 should be inserted. Delete disabled breakpoints.
6320 * mem-break.h (validate_breakpoints):
6321 * server.c (handle_query): Validate breakpoints when we see a
6322 qSymbol query.
6323
8b07ae33
PA
63242010-04-01 Pedro Alves <pedro@codesourcery.com>
6325
6326 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6327 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6328 if we could tell there's a GDB breakpoint at stop_pc.
6329 (need_step_over_p): Don't do a step over if we find a GDB
6330 breakpoint at the resume PC.
6331
6332 * mem-break.c (struct raw_breakpoint): New.
6333 (enum bkpt_type): New type `gdb_breakpoint'.
6334 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6335 fields. New field `raw'.
6336 (find_raw_breakpoint_at): New.
6337 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6338 breakpoint instead.
6339 (set_breakpoint_at): Adjust.
6340 (delete_raw_breakpoint): New.
6341 (release_breakpoint): New.
6342 (delete_breakpoint): Rename to...
6343 (delete_breakpoint_1): ... this. Add proc parameter. Use
6344 release_breakpoint. Return ENOENT.
6345 (delete_breakpoint): Reimplement.
6346 (find_breakpoint_at): Delete.
6347 (find_gdb_breakpoint_at): New.
6348 (delete_breakpoint_at): Delete.
6349 (set_gdb_breakpoint_at): New.
6350 (delete_gdb_breakpoint_at): New.
6351 (gdb_breakpoint_here): New.
6352 (set_reinsert_breakpoint): Use release_breakpoint.
6353 (uninsert_breakpoint): Rename to ...
6354 (uninsert_raw_breakpoint): ... this.
6355 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6356 (reinsert_raw_breakpoint): Change parameter type to
6357 raw_breakpoint.
6358 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6359 instead.
6360 (check_breakpoints): Adjust. Use release_breakpoint.
6361 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6362 (breakpoint_inserted_here): Ditto.
6363 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6364 Don't trust the breakpoint's shadow if it is not inserted.
6365 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6366 (delete_all_breakpoints): Adjust.
6367 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6368 use delete_breakpoint_1.
6369
6370 * mem-break.h (breakpoints_supported): Delete declaration.
6371 (set_gdb_breakpoint_at): Declare.
6372 (gdb_breakpoint_here): Declare.
6373 (delete_breakpoint_at): Delete.
6374 (delete_gdb_breakpoint_at): Declare.
6375
6376 * server.h (struct raw_breakpoint): Forward declare.
6377 (struct process_info): New field `raw_breakpoints'.
6378
6379 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6380 breakpoints.
6381
6bf5e0ba
PA
63822010-03-24 Pedro Alves <pedro@codesourcery.com>
6383
6384 * linux-low.c (status_pending_p_callback): Fix comment.
6385 (linux_wait_for_event_1): Move most of the internal breakpoint
6386 handling from here...
6387 (linux_wait_1): ... to here.
6388 (count_events_callback): New.
6389 (select_singlestep_lwp_callback): New.
6390 (select_event_lwp_callback): New.
6391 (cancel_breakpoints_callback): New.
6392 (select_event_lwp): New.
6393 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6394 priority to all LWPs that have had events that should be reported
6395 to the client. Cancel breakpoints when about to reporting the
6396 event to the client, not while stopping lwps. No longer cancel
6397 finished single-steps here.
6398 (cancel_finished_single_step): Delete.
6399 (cancel_finished_single_steps): Delete.
6400
414a389f
PA
64012010-03-24 Pedro Alves <pedro@codesourcery.com>
6402
6403 * mem-break.c (enum bkpt_type): New.
6404 (struct breakpoint): New field `type'.
6405 (set_breakpoint_at): Change return type to struct breakpoint
6406 pointer. Set type to `other_breakpoint' by default.
6407 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6408 in the breakpoint list.
6409 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6410 (reinsert_breakpoint): Rename to ...
6411 (reinsert_raw_breakpoint): ... this.
6412 (reinsert_breakpoints_at): Adjust.
6413 * mem-break.h (struct breakpoint): Declare.
6414 (set_breakpoint_at): Change return type to struct breakpoint
6415 pointer.
6416
2280c721
PA
64172010-03-24 Pedro Alves <pedro@codesourcery.com>
6418
6419 * server.c (handle_query): Assign, not compare.
6420
d50171e4
PA
64212010-03-24 Pedro Alves <pedro@codesourcery.com>
6422
6423 Teach linux gdbserver to step-over-breakpoints.
6424
6425 * linux-low.c (can_hardware_single_step): New.
6426 (supports_breakpoints): New.
6427 (handle_extended_wait): If stopping threads, read the stop pc of
6428 the new cloned LWP.
6429 (get_pc): New.
6430 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6431 low target doesn't support retrieving the PC.
6432 (add_lwp): Set last_resume_kind to resume_continue.
6433 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6434 (linux_attach): Don't clear stop_expected. Set the lwp's
6435 last_resume_kind to resume_stop.
6436 (linux_detach_one_lwp): Don't check for removed breakpoints.
6437 (check_removed_breakpoint): Delete.
6438 (status_pending_p): Rename to ...
6439 (status_pending_p_callback): ... this. Don't check for removed
6440 breakpoints. Don't consider threads that are stopped from GDB's
6441 perspective.
6442 (linux_wait_for_lwp): Always read the stop_pc here.
6443 (cancel_breakpoint): New.
6444 (step_over_bkpt): New global.
6445 (linux_wait_for_event_1): Implement stepping over breakpoints.
6446 (gdb_wants_lwp_stopped): New.
6447 (gdb_wants_all_stopped): New.
6448 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6449 single-step traps here. Store the thread's last reported target
6450 wait status.
6451 (send_sigstop): Don't clear stop_expected. Always set it,
6452 instead.
6453 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6454 (cancel_finished_single_step): New.
6455 (cancel_finished_single_steps): New.
6456 (wait_for_sigstop): Don't cancel finished single-step traps here.
6457 (linux_resume_one_lwp): Don't check for removed breakpoints.
6458 Don't set `step' on non-hardware step archs.
6459 (linux_set_resume_request): Ignore resume_stop requests if already
6460 stopping or stopped. Set the lwp's last_resume_kind.
6461 (resume_status_pending_p): Don't check for removed breakpoints.
6462 (need_step_over_p): New.
6463 (start_step_over): New.
6464 (finish_step_over): New.
6465 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6466 requests. Clear the thread's last reported target waitstatus.
6467 Don't use the `suspended' flag. Don't consider pending breakpoints.
6468 (linux_resume): Start a step-over if necessary.
6469 (proceed_one_lwp): New.
6470 (proceed_all_lwps): New.
6471 (unstop_all_lwps): New.
6472 * linux-low.h (struct lwp_info): Rewrite comment for the
6473 `suspended' flag. Add the `stop_pc' field. Delete the
6474 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6475 Add `'last_resume_kind' and `need_step_over' fields.
6476 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6477 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6478 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6479 (set_raw_breakpoint_at): New.
6480 (set_breakpoint_at): Rewrite to use it.
6481 (reinsert_breakpoint_handler): Delete.
6482 (set_reinsert_breakpoint): New.
6483 (reinsert_breakpoint_by_bp): Delete.
6484 (delete_reinsert_breakpoints): New.
6485 (uninsert_breakpoint): Rewrite.
6486 (uninsert_breakpoints_at): New.
6487 (reinsert_breakpoint): Rewrite.
6488 (reinsert_breakpoints_at): New.
6489 (check_breakpoints): Rewrite.
6490 (breakpoint_here): New.
6491 (breakpoint_inserted_here): New.
6492 (check_mem_read): Adjust.
6493 * mem-break.h (breakpoints_supported, breakpoint_here)
6494 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6495 (reinsert_breakpoint_by_bp): Delete declaration.
6496 (delete_reinsert_breakpoints): Declare.
6497 (reinsert_breakpoint): Delete declaration.
6498 (reinsert_breakpoints_at): Declare.
6499 (uninsert_breakpoint): Delete declaration.
6500 (uninsert_breakpoints_at): Declare.
6501 (check_breakpoints): Adjust prototype.
6502 * server.h: Adjust include order.
6503 (struct thread_info): Declare here. Add a `last_status' field.
6504
30ba68cb
MS
65052010-03-23 Michael Snyder <msnyder@vmware.com>
6506
6507 * server.c (crc32): New function.
6508 (handle_query): Add handling for 'qCRC:' request.
6509
b9a881c2
PA
65102010-03-23 Pedro Alves <pedro@codesourcery.com>
6511
6512 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6513 lwp had been stopped by a watchpoint.
6514
e92d13d5
PA
65152010-03-16 Pedro Alves <pedro@codesourcery.com>
6516
6517 * server.h (internal_error): Declare.
6518 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6519 * utils.c (internal_error): New function.
6520
64daa791
AS
65212010-03-15 Andreas Schwab <schwab@redhat.com>
6522
6523 * configure.srv: Fix typo setting srv_regobj.
6524
f52cd8cd
PA
65252010-03-15 Pedro Alves <pedro@codesourcery.com>
6526
6527 * linux-low.c (fetch_register): Avoid passing a non string literal
6528 format to `error'.
6529 (usr_store_inferior_registers): Ditto.
6530
93ae6fdc
PA
65312010-03-14 Pedro Alves <pedro@codesourcery.com>
6532
6533 * linux-low.c (linux_write_memory): Bail out early if peeking
6534 memory failed.
6535
c3adc08c
PA
65362010-03-14 Pedro Alves <pedro@codesourcery.com>
6537
6538 * linux-low.h (struct lwp_info): New fields
6539 `stopped_by_watchpoint' and `stopped_data_address'.
6540 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6541 here, and cache them in the lwp object.
6542 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6543 directly.
6544 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6545 field.
6546 (linux_stopped_by_watchpoint): Rewrite.
6547 (linux_stopped_data_address): Rewrite.
6548
bce522a2
PA
65492010-03-06 Simo Melenius <simo.melenius@iki.fi>
6550
6551 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6552 switching the current inferior, not before.
6553
90884b2b
L
65542010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6555
6556 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6557 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6558 i386-linux.c and amd64-linux.c.
6559 (reg-i386.o): Removed.
6560 (reg-i386.c): Likewise.
6561 (reg-i386-linux.o): Likewise.
6562 (reg-i386-linux.c): Likewise.
6563 (reg-x86-64.o): Likewise.
6564 (reg-x86-64.c): Likewise.
6565 (reg-x86-64-linux.o): Likewise.
6566 (reg-x86-64-linux.c): Likewise.
6567 (i386.o): New.
6568 (i386.c): Likewise.
6569 (i386-linux.o): Likewise.
6570 (i386-linux.c): Likewise.
6571 (amd64.o): Likewise.
6572 (amd64.c): Likewise.
6573 (amd64-linux.o): Likewise.
6574 (amd64-linux.c): Likewise.
6575
6576 * configure.srv (srv_i386_regobj): New.
6577 (srv_i386_linux_regobj): Likewise.
6578 (srv_amd64_regobj): Likewise.
6579 (srv_amd64_linux_regobj): Likewise.
6580 (srv_i386_32bit_xmlfiles): Likewise.
6581 (srv_i386_64bit_xmlfiles): Likewise.
6582 (srv_i386_xmlfiles): Likewise.
6583 (srv_amd64_xmlfiles): Likewise.
6584 (srv_i386_linux_xmlfiles): Likewise.
6585 (srv_amd64_linux_xmlfiles): Likewise.
6586 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6587 srv_xmlfiles to $srv_i386_xmlfiles.
6588 (i[34567]86-*-mingw32ce*): Likewise.
6589 (i[34567]86-*-mingw*): Likewise.
6590 (i[34567]86-*-nto*): Likewise.
6591 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6592 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6593 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6594 (x86_64-*-linux*): Likewise.
6595
6596 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6597 (init_registers_amd64_linux): New.
6598 (x86_arch_setup): Replace init_registers_x86_64_linux with
6599 init_registers_amd64_linux.
6600
193f13e6
MK
66012010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6602
6603 * configure.ac: Check for libdl. If it is not available link against
6604 static libthread_db.
6605 * configure: Regenerate.
6606
85d721b8
PA
66072010-02-22 Pedro Alves <pedro@codesourcery.com>
6608
6609 PR9605
6610
6611 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6612 handing a read watchpoint.
6613 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6614
6076632b
DE
66152010-02-12 Doug Evans <dje@google.com>
6616
6617 * linux-low.c (linux_supports_tracefork_flag): Document.
6618 (linux_look_up_symbols): Add comment.
6619
3327ccf7
L
66202010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6621
6622 * regcache.c (supply_register): Clear regcache if buf is NULL.
6623
0718675c 66242010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6625 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6626
6627 * inferiors.c (find_inferior): Add function documentation.
6628 (unloaded_dll): Handle the case where the unloaded dll has not
6629 been previously registered in the dll list.
6630
177321bd
DJ
66312010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6632
6633 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6634 (thumb2_breakpoint): New.
6635 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6636
2b009048
DJ
66372010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6638
6639 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6640 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6641 breakpoints.
6642
3be029c7
PA
66432010-01-21 Pedro Alves <pedro@codesourcery.com>
6644
6645 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6646
18f5de3b
JK
66472010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6648
6649 * linux-s390-low.c (s390_collect_ptrace_register)
6650 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6651
3743bb4f
DE
66522010-01-21 Doug Evans <dje@google.com>
6653
14ce3065
DE
6654 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6655 (PTRACE_ARG4_TYPE): New macro.
6656 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6657 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6658 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6659 (usr_store_inferior_registers): Ditto.
6660 (linux_read_memory, linux_write_memory): Ditto.
6661 (linux_test_for_tracefork): Ditto.
6662
3743bb4f
DE
6663 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6664 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6665
8b315be5
PA
66662010-01-21 Pedro Alves <pedro@codesourcery.com>
6667
6668 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6669 target.
6670
85492558
PA
66712010-01-21 Pedro Alves <pedro@codesourcery.com>
6672
6673 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6674 prototype to take a regcache. Adjust.
6675
442ea881
PA
66762010-01-20 Pedro Alves <pedro@codesourcery.com>
6677
6678 * regcache.h (struct thread_info): Forward declare.
6679 (struct regcache): New.
6680 (new_register_cache): Adjust prototype.
6681 (get_thread_regcache): Declare.
6682 (free_register_cache): Adjust prototype.
6683 (registers_to_string, registers_from_string): Ditto.
6684 (supply_register, supply_register_by_name, collect_register)
6685 (collect_register_as_string, collect_register_by_name): Ditto.
6686 * regcache.c (struct inferior_regcache_data): Delete.
6687 (get_regcache): Rename to ...
6688 (get_thread_regcache): ... this. Adjust. Switch inferior before
6689 fetching registers.
6690 (regcache_invalidate_one): Adjust.
6691 (regcache_invalidate): Fix prototype.
6692 (new_register_cache): Return the new register cache.
6693 (free_register_cache): Change prototype.
6694 (realloc_register_cache): Adjust.
6695 (registers_to_string): Change prototype to take a regcache. Adjust.
6696 (registers_from_string): Ditto.
6697 (register_data): Ditto.
6698 (supply_register): Ditto.
6699 (supply_register_by_name): Ditto.
6700 (collect_register): Ditto.
6701 (collect_register_as_string): Ditto.
6702 (collect_register_by_name): Ditto.
6703 * server.c (process_serial_event): Adjust.
6704 * linux-low.h (regset_fill_func, regset_store_func): Change
6705 prototype.
6706 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6707 Change prototype.
6708 * linux-low.c (get_stop_pc): Adjust.
6709 (check_removed_breakpoint): Adjust.
6710 (linux_wait_for_event): Adjust.
6711 (linux_resume_one_lwp): Adjust.
6712 (fetch_register): Add regcache parameter. Adjust.
6713 (usr_store_inferior_registers): Ditto.
6714 (regsets_fetch_inferior_registers): Ditto.
6715 (regsets_store_inferior_registers): Ditto.
6716 (linux_fetch_registers, linux_store_registers): Ditto.
6717 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6718 regcache. Adjust.
43aaf8b6
PA
6719 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6720 Ditto.
442ea881
PA
6721 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6722 prototype to take a regcache.
6723 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6724 * remote-utils.c (convert_ascii_to_int, outreg)
6725 (prepare_resume_reply): Change prototype to take a regcache.
6726 Adjust.
6727 * target.h (struct target_ops) <fetch_registers, store_registers>:
6728 Change prototype to take a regcache.
6729 (fetch_inferior_registers, store_inferior_registers): Change
6730 prototype to take a regcache. Adjust.
6731 * proc-service.c (ps_lgetregs): Adjust.
6732 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6733 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6734 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6735 take a regcache. Adjust.
6736 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6737 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6738 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6739 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6740 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6741 (cris_cannot_fetch_register):
6742 (cris_breakpoint_at): Change prototype to take a regcache.
6743 Adjust.
6744 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6745 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6746 to take a regcache. Adjust.
6747 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6748 Adjust.
6749 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6750 take a regcache. Adjust.
6751 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6752 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6753 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6754 * linux-mips-low.c (mips_get_pc):
6755 (mips_set_pc): Change prototype to take a regcache. Adjust.
6756 (mips_reinsert_addr): Adjust.
6757 (mips_collect_register): Change prototype to take a regcache.
6758 Adjust.
6759 (mips_supply_register):
6760 (mips_collect_register_32bit, mips_supply_register_32bit)
6761 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6762 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6763 * linux-ppc-low.c (ppc_supply_ptrace_register)
6764 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6765 (parse_spufs_run): Adjust.
6766 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6767 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6768 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6769 take a regcache. Adjust.
6770 * linux-s390-low.c (s390_collect_ptrace_register)
6771 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6772 (s390_set_pc): Change prototype to take a regcache. Adjust.
6773 (s390_arch_setup): Adjust.
6774 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6775 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6776 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6777 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6778 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6779 regcache. Adjust.
6780 (sparc_breakpoint_at): Adjust.
6781 * linux-xtensa-low.c (xtensa_fill_gregset):
6782 (xtensa_store_gregset):
6783 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6784 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6785 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6786 prototype to take a regcache. Adjust.
6787 * win32-arm-low.c (arm_fetch_inferior_register)
6788 (arm_store_inferior_register): Change prototype to take a
6789 regcache. Adjust.
6790 * win32-i386-low.c (i386_fetch_inferior_register)
6791 (i386_store_inferior_register): Change prototype to take a
6792 regcache. Adjust.
6793 * win32-low.c (child_fetch_inferior_registers)
6794 (child_store_inferior_registers): Change prototype to take a
6795 regcache. Adjust.
6796 (win32_wait): Adjust.
6797 (win32_fetch_inferior_registers): Change prototype to take a
6798 regcache. Adjust.
6799 (win32_store_inferior_registers): Adjust.
6800 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6801 store_inferior_register>: Change prototype to take a regcache.
6802
60c3d7b0
DE
68032010-01-20 Doug Evans <dje@google.com>
6804
6805 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6806 #ifdef.
6807 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6808 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6809
dc146f7c
VP
68102010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6811
6812 * linux-low.c (linux_core_of_thread): New.
6813 (compare_ints, show_process, list_threads): New.
6814 (linux_qxfer_osdata): Report threads and cores.
6815 (linux_target_op): Register linux_core_of_thread.
6816 * remote-utils.c (prepare_resume_reply): Report the core.
6817 (buffer_xml_printf): Support %d specifier.
6818 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6819 New.
6820 (handle_query): Handle qXfer:threads. Announce availability
6821 thereof.
6822 * target.h (struct target_ops): New field core_of_thread.
6823
7803799a
UW
68242010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6825
6826 * Makefile.in (clean): Remove new generated files.
6827 (reg-s390.o, reg-s390.c): Remove rules.
6828 (reg-s390x.o, reg-s390x.c): Likewise.
6829 (s390-linux32.o, s390-linux32.c): Add rules.
6830 (s390-linux64.o, s390-linux64.c): Likewise.
6831 (s390x-linux64.o, s390x-linux64.c): Likewise.
6832 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6833 * linux-s390-low.c: Include <elf.h>.
6834 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6835 (init_registers_s390): Remove prototype.
6836 (init_registers_s390x): Likewise.
6837 (init_registers_s390_linux32): Add prototype.
6838 (init_registers_s390_linux64): Likewise.
6839 (init_registers_s390x_linux64): Likewise.
6840 (s390_num_regs_3264): New define.
6841 (s390_regmap_3264): New global variable.
6842 (s390_cannot_fetch_register): Remove obsolete check.
6843 (s390_cannot_store_register): Likewise.
6844 (s390_collect_ptrace_register): Handle upper/lower register halves.
6845 (s390_supply_ptrace_register): Likewise.
6846 (s390_fill_gregset): Update to register number changes.
6847 (s390_get_hwcap): New routine.
6848 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6849 Install appropriate regmap and register set.
6850
6e7ffa39
JB
68512010-01-01 Joel Brobecker <brobecker@adacore.com>
6852
6853 * server.c (gdbserver_version): Update copyright year to 2010.
6854 * gdbreplay.c (gdbreplay_version): Likewise.
6855
957f3f49
DE
68562009-12-28 Doug Evans <dje@google.com>
6857
6858 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6859 elf/external.h. Include <elf.h> instead but only if necessary.
6860
ca5c370d
PA
68612009-12-28 Pedro Alves <pedro@codesourcery.com>
6862
6863 * linux-low.c (linux_remove_process): Remove `detaching'
6864 parameter. Don't release/detach from thread_db here.
6865 (linux_kill): Release/detach from thread_db here, ...
6866 (linux_detach): ... and here, before actually detaching.
6867 (linux_wait_1): ... and here, when a process exits.
6868 * thread-db.c (any_thread_of): New.
6869 (thread_db_free): Switch the current inferior to a thread of the
6870 passed in process.
6871
4ee62156
DE
68722009-12-21 Doug Evans <dje@google.com>
6873
d90e6a88
DE
6874 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6875
c5f62d5f
DE
6876 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6877 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6878 warning ifndef __NR_tkill. Move setting of errno there too.
6879 Delete unnecessary resetting of errno after syscall.
6880 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6881
10e86dd7
DE
6882 * configure.ac: Check for dladdr.
6883 * config.in: Regenerate.
6884 * configure: Regenerate.
6885 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6886 (try_thread_db_load): Update.
6887
4ee62156
DE
6888 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6889
00f515da
DE
68902009-12-18 Doug Evans <dje@google.com>
6891
e9464885
DE
6892 * event-loop.c: Include unistd.h if it exists.
6893
07d4f67e
DE
6894 * linux-low.c (my_waitpid): Move definition away from being in
6895 between linux_tracefork_child/linux_test_for_tracefork.
6896
00f515da
DE
6897 * gdb_proc_service.h (psaddr_t): Fix type.
6898 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6899 signature to match glibc.
6900
1de1badb
DE
69012009-12-16 Doug Evans <dje@google.com>
6902
6903 * linux-low.c (linux_read_memory): Fix argument to read.
6904
aeeb81d1
PA
69052009-11-26 Pedro Alves <pedro@codesourcery.com>
6906
6907 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6908 events, don't leave current_inferior pointing at null.
6909
10357975
PA
69102009-11-26 Pedro Alves <pedro@codesourcery.com>
6911
6912 * win32-low.c (LOG): Delete.
6913 (OUTMSG): Output to stderr.
6914 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6915 on compile time LOG macro.
6916 (win32_wait): Fix debug output.
6917
cf6e3471
PA
69182009-11-26 Pedro Alves <pedro@codesourcery.com>
6919
6920 * win32-low.c (win32_add_one_solib): If the dll name is
6921 "ntdll.dll", prepend the system directory to the dll path.
6922
0c85e18e
MK
69232009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6924
6925 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6926
9ac544ce 69272009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6928 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6929
6930 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6931 * configure.ac: Check for __mcoldfire__ and set
6932 gdb_cv_m68k_is_coldfire.
6933 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6934 reg-cf.o and reg-m68k.o.
6935 * configure: Regenerated.
6936
fd7dd3e6
PA
69372009-11-16 Pedro Alves <pedro@codesourcery.com>
6938
6939 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6940 Pass it to thread_db_free.
6941 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6942 proper `detaching' argument to linux_remove_process.
6943 * linux-low.h (thread_db_free): Add `detaching' parameter.
6944 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6945 to thread_db_free.
6946 (thread_db_free): Add `detaching' parameter. Only
6947 call td_ta_clear_event if detaching from process.
6948
75aa492e
MK
69492009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6950
6951 * thread-db.c (thread_db_free): Fix typo.
6952
21e1bee4
PP
69532009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6954
6955 PR gdb/10838
6956 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6957
8838b45e
NS
69582009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6959
6960 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6961 with an i686 compiler.
6962 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6963 needed.
6964 * configure: Rebuilt.
6965
8a35fb51
SL
69662009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6967
6968 PR gdb/10783
6969
6970 * server.c (handle_search_memory_1): Correct read_addr initialization
6971 in loop for searching subsequent chunks.
6972
96f15937
PP
69732009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6974
6975 * configure.ac: New --with-libthread-db option.
6976 * thread-db.c: Allow direct dependence on libthread_db.
6977 (thread_db_free): Adjust.
6978 * config.in: Regenerate.
6979 * configure: Likewise.
889bf7c5 6980
5f7d1694
PP
69812009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6982
6983 PR gdb/10757
6984 * thread-db.c (attach_thread): New function.
6985 (maybe_attach_thread): Return success/failure.
6986 (find_new_threads_callback): Adjust.
889bf7c5
PA
6987 (thread_db_find_new_threads): Loop until no new threads.
6988
88e3b899
PA
69892009-10-13 Pedro Alves <pedro@codesourcery.com>
6990
6991 * proc-service.c (ps_lgetregs): Formatting.
6992
cdbfd419
PP
69932009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6994
6995 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6996 * configure.ac: Adjust.
6997 * linux-low.h (struct process_info_private): Move members to struct
6998 thread_db.
6999 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7000 * linux-low.c (linux_remove_process): Adjust.
7001 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7002 * server.c (handle_query): Move code ...
7003 (handle_monitor_command): ... here. New function.
7004 * target.h (struct target_ops): New member.
7005 * thread-db.c (struct thread_db): New.
7006 (libthread_db_search_path): New variable.
7007 (thread_db_create_event, thread_db_enable_reporting)
7008 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7009 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7010 (try_thread_db_load_1, dladdr_to_soname): New functions.
7011 (try_thread_db_load, thread_db_load_search): New functions.
7012 (thread_db_init): Search for libthread_db.
7013 (thread_db_free): New function.
7014 (thread_db_handle_monitor_command): Likewise.
7015 * config.in: Regenerate.
7016 * configure: Regenerate.
889bf7c5 7017
4168d2d6
UW
70182009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7019
7020 * spu-low.c (spu_kill): Wait for inferior to terminate.
7021 Call clear_inferiors.
7022 (spu_detach): Call clear_inferiors.
7023
81ecdfbb
RW
70242009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7025
7026 * aclocal.m4: Regenerate.
7027 * config.in: Likewise.
7028 * configure: Likewise.
7029
0b9ff2c0
UW
70302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7031
7032 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7033 (parse_spufs_run): New function.
7034 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7035 (ppc_breakpoint_at): Handle SPU breakpoints.
7036
efcbbd14
UW
70372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7038
7039 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7040 (SPUFS_MAGIC): Define.
7041 (spu_enumerate_spu_ids): New function.
7042 (linux_qxfer_spu): New function.
7043 (linux_target_ops): Install linux_qxfer_spu.
7044
f4d9bade
UW
70452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7046
7047 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7048 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7049 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7050 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7051 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7052 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7053 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7054 (init_registers_powerpc_cell32l): Add prototype.
7055 (init_registers_powerpc_cell64l): Likewise.
7056 (ppc_arch_setup): Detect Cell/B.E. architecture.
7057
96e946ca
RW
70582009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7059
7060 * Makefile.in (datarootdir): New variable.
7061
58d6951d
DJ
70622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7063
7064 * linux-low.c (linux_write_memory): Update debugging output.
7065 * Makefile.in (clean): Add new descriptions.
7066 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7067 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7068 * configure.srv: Add new files for arm*-*-linux*.
7069 * linux-arm-low.c: Add new declarations.
7070 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7071 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7072 (HWCAP_VFPv3D16): New.
7073 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7074 instead of __IWMMXT__.
7075 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7076 (arm_arch_setup): New.
7077 (target_regsets): Remove #ifdef. Add VFP regset.
7078 (the_low_target): Use arm_arch_setup.
7079
12b42a12
DJ
70802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7081
7082 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7083 the main thread again.
7084
ac8c974e
AR
70852009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7086
7087 Adding Neutrino gdbserver.
7088 * configure: Regenerated.
7089 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7090 * configure.srv (i[34567]86-*-nto*): New target.
7091 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7092 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7093 (nto_comctrl) [__QNX__]: New function.
7094 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7095
4424e0c3 70962009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7097
7098 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7099 srv_tgtobj.
7100
912cf4ba
PA
71012009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7102 Pedro Alves <pedro@codesourcery.com>
7103
7104 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7105 don't support CONTEXT_EXTENDED_REGISTERS.
7106 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7107 (the_low_target): Install them.
7108 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7109 failing with ERROR_PIPE_NOT_CONNECTED.
7110
aa5ca48f
DE
71112009-06-30 Doug Evans <dje@google.com>
7112 Pierre Muller <muller@ics.u-strasbg.fr>
7113
7114 Add h/w watchpoint support to x86-linux, win32-i386.
7115 * Makefile.in (SFILES): Add i386-low.c
7116 (i386_low_h): Define.
7117 (i386-low.o): Add dependencies.
7118 (linux-x86-low.o): Add i386-low.h dependency.
7119 (win32-i386-low.o): Ditto.
7120 * i386-low.c: New file.
7121 * i386-low.h: New file.
7122 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7123 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7124 * linux-low.c (linux_add_process): Initialize arch_private.
7125 (linux_remove_process): Free arch_private.
7126 (add_lwp): Initialize arch_private.
7127 (delete_lwp): Free arch_private.
7128 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7129 provided.
7130 * linux-low.h (process_info_private): New member arch_private.
7131 (lwp_info): New member arch_private.
7132 (linux_target_ops): New members new_process, new_thread,
7133 prepare_to_resume.
7134 (ptid_of): New macro.
7135 * linux-x86-low.c: Include stddef.h, i386-low.h.
7136 (arch_process_info): New struct.
7137 (arch_lwp_info): New struct.
7138 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7139 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7140 (i386_dr_low_get_status): New function.
7141 (x86_insert_point, x86_remove_point): New functions.
7142 (x86_stopped_by_watchpoint): New function.
7143 (x86_stopped_data_address): New function.
7144 (x86_linux_new_process, x86_linux_new_thread): New functions.
7145 (x86_linux_prepare_to_resume): New function.
7146 (the_low_target): Add entries for insert_point, remove_point,
7147 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7148 prepare_to_resume.
7149 * server.c (debug_hw_points): New global.
7150 (monitor_show_help): Document set debug-hw-points.
7151 (handle_query): Process "set debug-hw-points".
7152 * server.h (debug_hw_points): Declare.
7153 (paddress): Declare.
7154 * utils.c (NUMCELLS, CELLSIZE): New macros.
7155 (get_sell, xsnprintf, paddress): New functions.
7156 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7157 remove_point, stopped_by_watchpoint, stopped_data_address.
7158 * win32-i386-low.c: Include i386-low.h.
7159 (debug_reg_state): Replaces dr.
7160 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7161 (i386_dr_low_get_status): New function.
7162 (i386_insert_point, i386_remove_point): New functions.
7163 (i386_stopped_by_watchpoint): New function.
7164 (i386_stopped_data_address): New function.
7165 (i386_initial_stuff): Update.
7166 (get_thread_context,set_thread_context,i386_thread_added): Update.
7167 (the_low_target): Add entries for insert_point,
7168 remove_point, stopped_by_watchpoint, stopped_data_address.
7169 * win32-low.c (win32_insert_watchpoint): New function.
7170 (win32_remove_watchpoint): New function.
7171 (win32_stopped_by_watchpoint): New function.
7172 (win32_stopped_data_address): New function.
7173 (win32_target_ops): Add entries for insert_watchpoint,
7174 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7175 * win32-low.h (win32_target_ops): New members insert_point,
7176 remove_point, stopped_by_watchpoint, stopped_data_address.
7177
d993e290
PA
71782009-06-25 Pedro Alves <pedro@codesourcery.com>
7179
7180 * server.c (process_serial_event): Re-return unsupported, not
7181 error, if the type isn't recognized. Re-allow supporting only
7182 insert or remove packets. Also call require_running for
7183 breakpoints. Add missing break statement to default case. Tidy.
7184 * target.h (struct target_ops): Rename insert_watchpoint to
7185 insert_point, and remove_watchpoint to remove_point.
7186
7187 * linux-low.h (struct linux_target_ops): Likewise.
7188 * linux-low.c (linux_insert_watchpoint): Rename to ...
7189 (linux_insert_point): ... this. Adjust.
7190 (linux_remove_watchpoint): Rename to ...
7191 (linux_remove_point): ... this. Adjust.
7192 (linux_target_ops): Adjust.
7193 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7194 (cris_insert_point): ... this.
7195 (cris_remove_watchpoint): Rename to ...
7196 (cris_remove_point): ... this.
7197 (the_low_target): Adjust.
7198
0f54c268
PM
71992009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7200
7201 * server.c (handle_v_kill): Pass signal_pid to
7202 kill_inferior if multi_process is zero.
7203
c6314022
AR
72042009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7205
7206 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7207 * target.h (target_ops): Comment for *_watchpoint to make it clear
7208 the functions can get types '0' and '1'.
7209
4463ce24
AR
72102009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7211
7212 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7213 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7214 * regcache.c (get_regcache): Likewise.
7215 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7216 * win32-low.c (child_fetch_inferior_registers): Remove check for
7217 regno 0.
7218
cf8fd78b
PA
72192009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7220 Pedro Alves <pedro@codesourcery.com>
7221
7222 * target.h (struct target_ops) <supports_multi_process>: New
7223 callback.
7224 (target_supports_multi_process): New.
7225 * server.c (handle_query): Even if GDB reports support, only
7226 enable multi-process if the target also supports it. Report
7227 multi-process support only if the target backend supports it.
7228 * linux-low.c (linux_supports_multi_process): New function.
7229 (linux_target_ops): Install it as target_supports_multi_process
7230 callback.
7231
47c0c975
DE
72322009-05-24 Doug Evans <dje@google.com>
7233
e09875d4
DE
7234 Global renaming of find_thread_pid to find_thread_ptid.
7235 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7236 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7237 All callers updated.
7238
e27d73f6
DE
7239 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7240 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7241 directly.
7242
47c0c975
DE
7243 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7244 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7245 (linux_resume_one_lwp): Ditto.
7246
2acc282a
DE
72472009-05-23 Doug Evans <dje@google.com>
7248
7249 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7250 from struct inferior_list_entry * to struct lwp_info *.
7251 All callers updated.
7252
9f1036c1
DE
72532009-05-13 Doug Evans <dje@google.com>
7254
7255 * linux-x86-low.c: Don't include assert.h.
7256 (x86_siginfo_fixup): Use fatal, not assert.
7257 (x86_arch_setup): Fix comment.
7258
d0722149
DE
72592009-05-12 Doug Evans <dje@google.com>
7260
7261 Biarch support for i386/amd64 gdbserver.
7262 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7263 Add linux-x86-low.c.
7264 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7265 (linux-x86-low.o): Add.
7266 * linux-x86-64-low.c: Delete.
7267 * linux-i386-low.c: Delete.
7268 * linux-x86-low.c: New file.
7269 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7270 linux-x86-low.o.
7271 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7272 linux-x86-low.o.
7273 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7274 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7275 (linux_child_pid_to_exec_file): New function.
7276 (elf_64_header_p, elf_64_file_p): New functions.
7277 (siginfo_fixup): New function.
7278 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7279 give target a chance to convert layout.
7280 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7281 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7282
fdeb2a12
DE
72832009-05-07 Doug Evans <dje@google.com>
7284
7285 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7286 (regsets_store_inferior_registers): Ditto.
7287
a6dbe5df
PA
72882009-05-06 Pedro Alves <pedro@codesourcery.com>
7289
7290 PR server/10048
7291
7292 * linux-low.c (must_set_ptrace_flags): Delete.
7293 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7294 of the global.
7295 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7296 `lwp->must_set_ptrace_flags' instead.
ba42693b 7297 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7298 (linux_wait_1): ... not here.
7299
5091eb23
DE
73002009-04-30 Doug Evans <dje@google.com>
7301
9f767825
DE
7302 * inferiors.c (started_inferior_callback): New function.
7303 (attached_inferior_callback): New function.
7304 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7305 * server.c (print_started_pid, print_attached_pid): New functions.
7306 (detach_or_kill_for_exit): New function.
7307 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7308 * server.h (have_started_inferiors_p): Declare.
7309 (have_attached_inferiors_p): Declare.
7310
5091eb23
DE
7311 * inferiors.c (remove_process): Fix memory leak, free process.
7312 * linux-low.c (linux_remove_process): New function.
7313 (linux_kill): Call it instead of remove_process.
7314 (linux_detach, linux_wait_1): Ditto.
7315
155c8968
PA
73162009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7317
7318 * configure.srv: Add x86 Windows CE target.
7319
7fe519cb
UW
73202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7321
7322 * inferiors.c (get_thread_process): Make global.
7323 * server.h (get_thread_process): Add prototype.
7324 * thread-db.c (find_one_thread): Use get_thread_process
7325 instead of current_process.
7326 (thread_db_get_tls_address): Do not crash if called when
7327 thread layer is not yet initialized.
7328
5472f405
UW
73292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7330
7331 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7332 * spu-low.c (current_tid): Rename to ...
7333 (current_ptid): ... this.
7334 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7335 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7336 ptid_get_lwp (current_ptid) instead of current_tid.
7337 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7338 instead of current_tid. Use find_process_pid to verify pid
7339 argument is valid. Pass proper argument to remove_process.
7340 (spu_thread_alive): Compare current_ptid instead of current_tid.
7341 (spu_resume): Likewise.
7342
55ac2b99
PA
73432009-04-02 Pedro Alves <pedro@codesourcery.com>
7344
7345 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7346 variable.
7347
95954743
PA
73482009-04-01 Pedro Alves <pedro@codesourcery.com>
7349
7350 Implement the multiprocess extensions, and add linux multiprocess
7351 support.
7352
7353 * server.h (ULONGEST): Declare.
7354 (struct ptid, ptid_t): New.
7355 (minus_one_ptid, null_ptid): Declare.
7356 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7357 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7358 (struct inferior_list_entry): Change `id' type from unsigned from
7359 to ptid_t.
7360 (struct sym_cache, struct breakpoint, struct
7361 process_info_private): Forward declare.
7362 (struct process_info): Declare.
7363 (current_process): Declare.
7364 (all_processes): Declare.
7365 (initialize_inferiors): Declare.
7366 (add_thread): Adjust to use ptid_t.
7367 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7368 (add_process, remove_process, find_thread_pid): Declare.
7369 (find_inferior_id): Adjust to use ptid_t.
7370 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7371 (multi_process): Declare.
7372 (push_event): Adjust to use ptid_t.
7373 (read_ptid, write_ptid): Declare.
7374 (prepare_resume_reply): Adjust to use ptid_t.
7375 (clear_symbol_cache): Declare.
7376 * inferiors.c (all_processes): New.
7377 (null_ptid, minus_one_ptid): New.
7378 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7379 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7380 (add_thread): Change unsigned long to ptid. Remove gdb_id
7381 parameter. Adjust.
7382 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7383 (gdb_id_to_thread): Rename to ...
7384 (find_thread_pid): ... this. Change unsigned long to ptid.
7385 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7386 (loaded_dll, pull_pid_from_list): Adjust.
7387 (add_process, remove_process, find_process_pid)
7388 (get_thread_process, current_process, initialize_inferiors): New.
7389 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7390 (struct target_waitstatus) <related_pid>: Ditto.
7391 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7392 return type to int.
7393 (struct target_ops) <join>: Add `pid' argument.
7394 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7395 (struct target_ops) <wait>: Add `ptid' field. Change return type
7396 to ptid.
7397 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7398 (mywait): Add `ptid' argument. Change return type to ptid_t.
7399 (target_pid_to_str): Declare.
7400 * target.c (set_desired_inferior): Adjust to use ptids.
7401 (mywait): Add new `ptid' argument. Adjust.
7402 (target_pid_to_str): New.
7403 * mem-break.h (free_all_breakpoints): Declare.
7404 * mem-break.c (breakpoints): Delelete.
7405 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7406 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7407 to use per-process breakpoint list.
7408 (free_all_breakpoints): New.
7409 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7410 (symbol_cache, all_symbols_looked_up): Delete.
7411 (hexchars): New.
7412 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7413 read_ptid): New.
7414 (prepare_resume_reply): Change ptid argument's type from unsigned
7415 long to ptid_t. Adjust. Implement W;process and X;process.
7416 (free_sym_cache, clear_symbol_cache): New.
7417 (look_up_one_symbol): Adjust to per-process symbol cache. *
7418 * server.c (cont_thread, general_thread, step_thread): Change type
7419 to ptid_t.
7420 (attached): Delete.
7421 (multi_process): New.
7422 (last_ptid): Change type to ptid_t.
7423 (struct vstop_notif) <ptid>: Change type to ptid_t.
7424 (queue_stop_reply, push_event): Change `ptid' argument's type to
7425 ptid_t.
7426 (discard_queued_stop_replies): Add `pid' argument.
7427 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7428 changes. Don't reference the `attached' global.
7429 (attach_inferior): Adjust to mywait interface changes.
7430 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7431 features. Handle and report "multiprocess+". Handle
7432 "qAttached:PID".
7433 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7434 changes.
7435 (handle_v_kill): New.
7436 (handle_v_stopped): Adjust to use target_pid_to_str.
7437 (handle_v_requests): Allow multiple attaches and runs when
7438 multiprocess extensions are in effect. Handle "vKill".
7439 (myresume): Adjust to use ptids.
7440 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7441 (handle_status): Adjust to discard_queued_stop_replies interface
7442 change.
7443 (first_thread_of, kill_inferior_callback)
7444 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7445 (main): Call initialize_inferiors. Adjust to use ptids, killing
7446 and detaching from all inferiors. Handle multiprocess packet
7447 variants.
7448 * linux-low.h: Include gdb_proc_service.h.
7449 (struct process_info_private): New.
7450 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7451 <lwpid_of>: Use ptid_get_lwp.
7452 (get_lwp_thread): Adjust.
7453 (struct lwp_info): Add `dead' member.
7454 (find_lwp_pid): Declare.
7455 * linux-low.c (thread_db_active): Delete.
7456 (new_inferior): Adjust comment.
7457 (inferior_pid): Delete.
7458 (linux_add_process): New.
7459 (handle_extended_wait): Adjust.
7460 (add_lwp): Change unsigned long to ptid.
7461 (linux_create_inferior): Add process to processes table. Adjust
7462 to use ptids. Don't set new_inferior here.
7463 (linux_attach_lwp): Rename to ...
7464 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7465 it. Adjust to use ptids.
7466 (linux_attach_lwp): New.
7467 (linux_attach): Add process to processes table. Don't set
7468 new_inferior here.
7469 (struct counter): New.
7470 (second_thread_of_pid_p, last_thread_of_process_p): New.
7471 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7472 multiple processes.
7473 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7474 processes. Remove process from process table.
7475 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7476 to multiple processes.
7477 (any_thread_of): New.
7478 (linux_detach): Add `pid' argument, and handle it. Remove process
7479 from processes table.
7480 (linux_join): Add `pid' argument. Handle it.
7481 (linux_thread_alive): Change unsighed long argument to ptid_t.
7482 Consider dead lwps as not being alive.
7483 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7484 threads we're not interested in.
7485 (same_lwp, find_lwp_pid): New.
7486 (linux_wait_for_lwp): Change `pid' argument's type from int to
7487 ptid_t. Adjust.
7488 (linux_wait_for_event): Rename to ...
7489 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7490 from int to ptid_t. Adjust.
7491 (linux_wait_for_event): New.
7492 (linux_wait_1): Add `ptid' argument. Change return type to
7493 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7494 that exit from the process table.
7495 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7496 Adjust.
7497 (mark_lwp_dead): New.
7498 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7499 stopping all threads, mark its main lwp as dead.
7500 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7501 ptids.
7502 (fetch_register, usr_store_inferior_registers)
7503 (regsets_fetch_inferior_registers)
7504 (regsets_store_inferior_registers, linux_read_memory)
7505 (linux_write_memory): Inline `inferior_pid'.
7506 (linux_look_up_symbols): Adjust to use per-process
7507 `thread_db_active'.
7508 (linux_request_interrupt): Adjust to use ptids.
7509 (linux_read_auxv): Inline `inferior_pid'.
7510 (initialize_low): Don't reference thread_db_active.
7511 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7512 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7513 (ps_getpid): Return the pid of the current inferior.
7514 * thread-db.c (proc_handle, thread_agent): Delete.
7515 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7516 per-process data.
7517 (find_one_thread): Change argument type to ptid_t. Adjust to
7518 per-process data.
7519 (maybe_attach_thread): Adjust to per-process data and ptids.
7520 (thread_db_find_new_threads): Ditto.
7521 (thread_db_init): Ditto.
7522 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7523 processes table. Adjust to use ptids.
7524 (spu_kill, spu_detach): Adjust interface. Remove process from
7525 processes table.
7526 (spu_join, spu_thread_alive): Adjust interface.
7527 (spu_wait): Adjust interface. Remove process from processes
7528 table. Adjust to use ptids.
7529 * win32-low.c (current_inferior_tid): Delete.
7530 (current_inferior_ptid): New.
7531 (debug_event_ptid): New.
7532 (thread_rec): Take a ptid. Adjust.
7533 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7534 (child_delete_thread): Ditto.
7535 (do_initial_child_stuff): Add `attached' argument. Add process to
7536 processes table.
7537 (child_fetch_inferior_registers, child_store_inferior_registers):
7538 Adjust.
7539 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7540 (win32_attach): Pass 1 to do_initial_child_stuff.
7541 (win32_kill): Adjust interface. Remove process from processes
7542 table.
7543 (win32_detach): Ditto.
7544 (win32_join): Adjust interface.
7545 (win32_thread_alive): Take a ptid.
7546 (win32_resume): Adjust to use ptids.
7547 (get_child_debug_event): Ditto.
7548 (win32_wait): Adjust interface. Remove exiting process from
7549 processes table.
7550
bd99dc85
PA
75512009-04-01 Pedro Alves <pedro@codesourcery.com>
7552
7553 Non-stop mode support.
7554
7555 * server.h (non_stop): Declare.
7556 (gdb_client_data, handler_func): Declare.
7557 (delete_file_handler, add_file_handler, start_event_loop):
7558 Declare.
7559 (handle_serial_event, handle_target_event, push_event)
7560 (putpkt_notif): Declare.
7561 * target.h (enum resume_kind): New.
7562 (struct thread_resume): Replace `step' field by `kind' field.
7563 (TARGET_WNOHANG): Define.
7564 (struct target_ops) <wait>: Add `options' argument.
7565 <supports_non_stop, async, start_non_stop>: New fields.
7566 (target_supports_non_stop, target_async): New.
7567 (start_non_stop): Declare.
7568 (mywait): Add `options' argument.
7569 * target.c (mywait): Add `options' argument. Print child exit
7570 notifications here.
7571 (start_non_stop): New.
7572 * server.c (non_stop, own_buf, mem_buf): New globals.
7573 (struct vstop_notif): New.
7574 (notif_queue): New global.
7575 (queue_stop_reply, push_event, discard_queued_stop_replies)
7576 (send_next_stop_reply): New.
7577 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7578 interface changes.
7579 (attach_inferior): In non-stop mode, don't wait for the target
7580 here.
7581 (handle_general_set): Handle QNonStop.
7582 (handle_query): When handling qC, return the current general
7583 thread, instead of the first thread of the list.
7584 (handle_query): If the backend supports non-stop mode, include
7585 QNonStop+ in the qSupported query response.
7586 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7587 and non-stop mode.
7588 (handle_v_attach, handle_v_run): Handle non-stop mode.
7589 (handle_v_stopped): New.
7590 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7591 (myresume): Adjust to use resume_kind. Handle non-stop.
7592 (queue_stop_reply_callback): New.
7593 (handle_status): Handle non-stop mode.
7594 (main): Clear non_stop flag on reconnection. Use the event-loop.
7595 Refactor serial protocol handling from here ...
7596 (process_serial_event): ... to this new function. When GDB
7597 selects any thread, select one here. In non-stop mode, wait until
7598 GDB acks all pending events before exiting.
7599 (handle_serial_event, handle_target_event): New.
7600 * remote-utils.c (remote_open): Install remote_desc in the event
7601 loop.
7602 (remote_close): Remove remote_desc from the event loop.
7603 (putpkt_binary): Rename to...
7604 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7605 (putpkt_binary): New as wrapper around putpkt_binary_1.
7606 (putpkt_notif): New.
7607 (prepare_resume_reply): In non-stop mode, don't change the
7608 general_thread.
7609 * event-loop.c: New.
7610 * Makefile.in (OBJ): Add event-loop.o.
7611 (event-loop.o): New rule.
7612
7613 * linux-low.h (pid_of): Moved here.
7614 (lwpid_of): New.
7615 (get_lwp_thread): Use lwpid_of.
7616 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7617 * linux-low.c (pid_of): Delete.
7618 (inferior_pid): Use lwpid_of.
7619 (linux_event_pipe): New.
7620 (target_is_async_p): New.
7621 (delete_lwp): New.
7622 (handle_extended_wait): Use lwpid_of.
7623 (add_lwp): Don't set lwpid field.
7624 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7625 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7626 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7627 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7628 first. Adjust to linux_wait_for_event interface changes. Use
7629 lwpid_of.
7630 (linux_detach): Don't delete the main lwp here.
7631 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7632 (status_pending_p): Don't consider explicitly suspended lwps.
7633 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7634 pointer. Add OPTIONS argument. Change return type to int. Use
7635 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7636 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7637 pointer. Add status pointer argument. Return a pid instead of a
7638 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7639 changes. In non-stop mode, don't switch to a random thread.
7640 (linux_wait): Rename to...
7641 (linux_wait_1): ... this. Add target_options argument, and handle
7642 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7643 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7644 clean exit and signal exit code. Don't stop all threads in
7645 non-stop mode. In all-stop mode, only stop all threads when
7646 reporting a stop to GDB. Handle explicit thread stop requests.
7647 (async_file_flush, async_file_mark): New.
7648 (linux_wait): New.
7649 (send_sigstop): Use lwpid_of.
7650 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7651 interface changes. In non-stop mode, don't switch to a random
7652 thread.
7653 (linux_resume_one_lwp): Use lwpid_of.
7654 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7655 (linux_resume_one_thread): ... this. Handle resume_stop. In
7656 non-stop mode, don't look for pending flag in all threads.
7657 (resume_status_pending_p): Don't consider explicitly suspended
7658 threads.
7659 (my_waitpid): Reimplement. Emulate __WALL.
7660 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7661 Use lwpid_of.
7662 (sigchld_handler, linux_supports_non_stop, linux_async)
7663 (linux_start_non_stop): New.
7664 (linux_target_ops): Register linux_supports_non_stop, linux_async
7665 and linux_start_non_stop.
7666 (initialize_low): Install SIGCHLD handler.
7667 * thread-db.c (thread_db_create_event, find_one_thread)
7668 (thread_db_get_tls_address): Use lwpid_of.
7669 * win32-low.c (win32_detach): Adjust to use resume_kind.
7670 (win32_wait): Add `options' argument.
7671 * spu-low.c (spu_resume): Adjust to use resume_kind.
7672 (spu_wait): Add `options' argument.
7673
5b1c542e
PA
76742009-04-01 Pedro Alves <pedro@codesourcery.com>
7675
7676 Decouple target code from remote protocol.
7677
7678 * target.h (enum target_waitkind): New.
7679 (struct target_waitstatus): New.
7680 (struct target_ops) <wait>: Return an unsigned long. Take a
7681 target_waitstatus pointer instead of a char pointer.
7682 (mywait): Likewise.
7683 * target.c (mywait): Change prototype to return an unsigned long.
7684 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7685 * server.h (thread_from_wait, old_thread_from_wait): Delete
7686 declarations.
7687 (prepare_resume_reply): Change prototype to take a
7688 target_waitstatus.
7689 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7690 (last_status, last_ptid): New.
7691 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7692 pid instead of a signal.
7693 (attach_inferior): Remove "status" and "signal" parameters.
7694 Adjust.
7695 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7696 not as an address.
7697 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7698 (handle_v_requests, myresume): Remove "status" and "signal"
7699 parameters. Adjust.
7700 (handle_status): New.
7701 (main): Delete local `status'. Adjust.
7702 * remote-utils.c: Include target.h.
7703 (prepare_resume_reply): Change prototype to take a
7704 target_waitstatus. Adjust.
7705
7706 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7707 interface.
7708 * spu-low.c (spu_wait): Adjust.
7709 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7710 Delete.
7711 (win32_wait): Adjust.
7712
2bd7c093
PA
77132009-04-01 Pedro Alves <pedro@codesourcery.com>
7714
7715 * target.h (struct thread_resume): Delete leave_stopped member.
7716 (struct target_ops): Add a `n' argument to the `resume' callback.
7717 * server.c (start_inferior): Adjust.
7718 (handle_v_cont, myresume): Adjust.
7719 * linux-low.c (check_removed_breakpoint): Adjust to resume
7720 interface change, and to removed leave_stopped field.
7721 (resume_ptr): Delete.
7722 (struct thread_resume_array): New.
7723 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7724 resume interface change.
7725 (linux_continue_one_thread, linux_queue_one_thread)
7726 (resume_status_pending_p): Check if the resume field is NULL
7727 instead of checking the leave_stopped member.
7728 (linux_resume): Adjust to the target resume interface change.
7729 * spu-low.c (spu_resume): Adjust to the target resume interface
7730 change.
7731 * win32-low.c (win32_detach, win32_resume): Ditto.
7732
c35fafde
PA
77332009-04-01 Pedro Alves <pedro@codesourcery.com>
7734
7735 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7736 flag.
7737 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7738 pending.
7739 (linux_continue_one_thread): Only preserve the stepping flag if
7740 there's a pending breakpoint.
7741
0a59d50b
PA
77422009-03-31 Pedro Alves <pedro@codesourcery.com>
7743
7744 * server.c (main): After the inferior having exited, call
7745 remote_close before exiting gdbserver.
7746
f04c6d38
TJB
77472009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7748
7749 Fix size of FPSCR in Power 7 processors.
7750 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7751 (PPC_FEATURE_HAS_DFP): New #define.
7752 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7753 size of the FPSCR.
7754
78e5cee6
PA
77552009-03-23 Pedro Alves <pedro@codesourcery.com>
7756
7757 * server.c (handle_query) Whitespace and formatting.
7758
1b3f6016
PA
77592009-03-22 Pedro Alves <pedro@codesourcery.com>
7760
7761 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7762 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7763 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7764 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7765 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7766 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7767 Makefile.in, configure.ac: Fix whitespace throughout.
7768 * configure: Regenerate.
7769
a07b2135
PA
77702009-03-22 Pedro Alves <pedro@codesourcery.com>
7771
7772 * inferiors.c (find_inferior): Make it safe for the callback
7773 function to delete the currently iterated inferior.
7774
67cc2626
PA
77752009-03-22 Pedro Alves <pedro@codesourcery.com>
7776
7777 * Makefile.in (linuw_low_h): Move higher.
7778 (thread-db.o): Depend on $(linux_low_h).
7779
54a0b537
PA
77802009-03-17 Pedro Alves <pedro@codesourcery.com>
7781
7782 Rename "process" to "lwp" throughout.
7783
7784 * linux-low.c (all_processes): Rename to...
7785 (all_lwps): ... this.
7786 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7787 (add_process): Rename to ...
7788 (add_lwp): ... this. Adjust.
7789 (linux_create_inferior): Adjust.
7790 (linux_attach_lwp): Adjust.
7791 (linux_attach): Adjust.
7792 (linux_kill_one_process): Rename to ...
7793 (linux_kill_one_lwp): ... this. Adjust.
7794 (linux_kill): Adjust.
7795 (linux_detach_one_process): Rename to ...
7796 (linux_detach_one_lwp): ... this. Adjust.
7797 (linux_detach): Adjust.
7798 (check_removed_breakpoint): Adjust.
7799 (status_pending_p): Adjust.
7800 (linux_wait_for_process): Rename to ...
7801 (linux_wait_for_lwp): ... this. Adjust.
7802 (linux_wait_for_event): Adjust.
7803 (send_sigstop): Adjust.
7804 (wait_for_sigstop): Adjust.
7805 (stop_all_processes): Rename to ...
7806 (stop_all_lwps): ... this.
7807 (linux_resume_one_process): Rename to ...
7808 (linux_resume_one_lwp): ... this. Adjust.
7809 (linux_set_resume_request, linux_continue_one_thread)
7810 (linux_queue_one_thread, resume_status_pending_p)
7811 (usr_store_inferior_registers, regsets_store_inferior_registers)
7812 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7813 Adjust.
7814 * linux-low.h (get_process): Rename to ...
7815 (get_lwp): ... this. Adjust.
7816 (get_thread_process): Rename to ...
7817 (get_thread_lwp): ... this. Adjust.
7818 (get_process_thread): Rename to ...
7819 (get_lwp_thread): ... this. Adjust.
7820 (struct process_info): Rename to ...
7821 (struct lwp_info): ... this.
7822 (all_processes): Rename to ...
7823 (all_lwps): ... this.
7824 * proc-service.c (ps_lgetregs): Adjust.
7825 * thread-db.c (thread_db_create_event, find_one_thread)
7826 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7827
0b16c5cf
PA
78282009-03-14 Pedro Alves <pedro@codesourcery.com>
7829
7830 * server.c (handle_query): Handle "qAttached".
7831
32de4b9d
NS
78322009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7833
7834 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7835 GPLv3, update license URL.
7836
2aecd87f
DE
78372009-03-01 Doug Evans <dje@google.com>
7838
93efd302 7839 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7840 (server_h): Add gdb_signals.h.
7841 (signals.o): Update.
7842 * server.h (target_signal_from_host,target_signal_to_host_p)
7843 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7844
86b1f9c5
PM
78452009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7846
7847 * remote-utils.c (getpkt): Also generate remote-debug
7848 information if noack_mode is set.
7849
4aa995e1
PA
78502009-02-06 Pedro Alves <pedro@codesourcery.com>
7851
7852 * server.c (handle_query): Report qXfer:siginfo:read and
7853 qXfer:siginfo:write as supported and handle them.
7854 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7855 * linux-low.c (linux_xfer_siginfo): New.
7856 (linux_target_ops): Set it.
7857
62709adf
PA
78582009-01-26 Pedro Alves <pedro@codesourcery.com>
7859
7860 * server.c (gdbserver_usage): Mention --remote-debug.
7861 (main): Accept '--remote-debug' switch.
7862
aef93bd7
DE
78632009-01-18 Doug Evans <dje@google.com>
7864
7865 * regcache.c (new_register_cache): No need to check result of xcalloc.
7866 * server.c (handle_search_memory): Back out calls to xmalloc,
7867 result is checked and error is returned to user upon failure.
7868 (handle_query): Ditto. Add more checks for result of malloc.
7869 (handle_v_cont): Check result of malloc, report error back to
7870 user upon failure.
7871 (handle_v_run): Ditto. Call freeargv.
7872 * server.h (freeargv): Declare.
7873 * utils.c (freeargv): New fn.
7874
54363045
DE
78752009-01-15 Doug Evans <dje@google.com>
7876
f626972c
DE
7877 * gdbreplay.c (perror_with_name): Make arg const char *.
7878 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7879 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7880 * utils.c (perror_with_name): Make arg const char *.
54363045 7881
18aae699
PA
78822009-01-14 Pedro Alves <pedro@codesourcery.com>
7883
7884 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7885 when handling a EXIT_PROCESS_DEBUG_EVENT.
7886
ff703abe
JB
78872009-01-06 Joel Brobecker <brobecker@adacore.com>
7888
7889 * gdbreplay.c (gdbreplay_version): Update copyright year.
7890 * server.c (gdbserver_version): Likewise.
7891
f21cc1a2 78922009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7893
7894 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7895 (handle_extended_wait): Improve comment.
0e21c1ec 7896
bca929d3
DE
78972008-12-13 Doug Evans <dje@google.com>
7898
7899 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7900 * server.h (ATTR_MALLOC): New macro.
7901 (xmalloc,xcalloc,xstrdup): Declare.
7902 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7903 * inferiors.c: Ditto.
7904 * linux-low.c: Ditto.
7905 * mem-break.c: Ditto.
7906 * regcache.c: Ditto.
7907 * remote-utils.c: Ditto.
7908 * server.c: Ditto.
7909 * target.c: Ditto.
7910 * win32-low.c: Ditto.
7911
97438e3f
DE
79122008-12-12 Doug Evans <dje@google.com>
7913
896c7fbb
DE
7914 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7915 in debugging printf.
7916
97438e3f
DE
7917 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7918
e3b886f8
DE
79192008-12-09 Doug Evans <dje@google.com>
7920
7921 * linux-low.h (struct process_info): Delete member tid, unused.
7922 * thread-db.c (find_one_thread): Update.
7923 (maybe_attach_thread): Update.
7924
07e059b5
VP
79252008-12-02 Pedro Alves <pedro@codesourcery.com>
7926
889bf7c5
PA
7927 * target.h (struct target_ops): Add qxfer_osdata member.
7928 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7929 and dirent.h.
7930 (linux_qxfer_osdata): New functions.
7931 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7932 callback.
7933 * server.c (handle_query): Handle "qXfer:osdata:read:".
7934 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7935 (buffer_xml_printf): New functions.
7936 * server.h (struct buffer): New.
7937 (buffer_grow_str, buffer_grow_str0): New macros.
7938 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7939 (buffer_xml_printf): Declare.
07e059b5 7940
4cab47ab
DE
79412008-11-24 Doug Evans <dje@google.com>
7942
7943 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7944
f142445f
DJ
79452008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7946
7947 * server.c (handle_v_run): Always use the supplied argument list.
7948
d0107bb6 79492008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7950
d0107bb6
BW
7951 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7952 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7953
2c4ad781
TJB
79542008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7955
7956 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7957 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7958 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7959 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7960 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7961 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7962 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7963 XML target descriptions.
7964 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7965 when inferior is running on an ISA 2.05 or later processor. Add
7966 special case to return offset for full 64-bit slot of FPSCR when
7967 in 32-bits.
7968
dfb64f85
DJ
79692008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7970
7971 * Makefile.in (SFILES, clean): Added sparc64 files.
7972 (reg-sparc64.o, reg-sparc64.c): New.
7973 * configure.srv (sparc*-*-linux*): New configuration.
7974 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7975 syscall arguments for SPARC.
7976 (regsets_store_inferior_registers): Likewise.
7977 * linux-sparc-low.c: New file.
7978
66b6e1dd
DE
79792008-10-21 Doug Evans <dje@google.com>
7980
7981 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7982 (READLINE_DIR,READLINE_DEP): Delete.
7983 (INTERNAL_CFLAGS): Update.
7984 (LINTFLAGS): Update.
7985
9b710a42
PA
79862008-10-10 Pedro Alves <pedro@codesourcery.com>
7987
7988 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7989 whole argv from the last run, not just argv[0].
7990
5822d809
PA
79912008-09-08 Pedro Alves <pedro@codesourcery.com>
7992
7993 * regcache.c (new_register_cache): Return NULL if the register
7994 cache size isn't known yet.
7995 (free_register_cache): Avoid dereferencing a NULL regcache.
7996
74aac56f
DJ
79972008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7998
7999 * configure.srv: Merge MIPS and MIPS64.
8000
400b20f5
MR
80012008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8002
8003 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8004
677c5bb1
LM
80052008-08-18 Luis Machado <luisgpm@br.ibm.com>
8006
8007 * Makefile.in: Add required vsx dependencies.
8008
8009 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8010 Declare init_registers_powerpc_vsx32l.
8011 Declare init_registers_powerpc_vsx64l.
8012 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8013 (ppc_arch_setup): Check for VSX in hwcap.
8014 (ppc_fill_vsxregset): New function.
8015 (ppc_store_vsxregset): New function.
8016 Add new VSX entry in regset_info target_regsets.
8017
8018 * configure.srv: Add new VSX dependencies.
8019
a6f3e723
SL
80202008-08-12 Pedro Alves <pedro@codesourcery.com>
8021
8022 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8023 (remote_open): Set or clear transport_is_reliable.
8024 (putpkt_binary): Don't expect acks in noack mode.
8025 (getpkt): Don't send ack/nac in noack mode.
8026 * server.c (handle_general_set): Handle QStartNoAckMode.
8027 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8028 qSupported.
8029 (main): Reset noack_mode on every connection.
8030 * server.h (noack_mode): Declare.
8031
a417dc56
RW
80322008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8033
8034 * Makefile.in (GDBREPLAY_OBS): New variable.
8035 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8036
3221518c
UW
80372008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8038 Daniel Jacobowitz <dan@codesourcery.com>
8039
8040 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8041 (usr_store_inferior_registers): Likewise.
8042 (regsets_store_inferior_registers): Likewise.
8043
ec56be1b
PA
80442008-07-31 Rolf Jansen <rj@surtec.com>
8045 Pedro Alves <pedro@codesourcery.com>
8046
8047 * configure.ac: Check for memmem declaration.
8048 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8049 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8050 (disable_packet_qfThreadInfo): Unconditionally compile.
8051 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8052 * configure, config.in: Regenerate.
8053
2fe5e3ff
DE
80542008-07-28 Doug Kwan <dougkwan@google.com>
8055
8056 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8057 (linux_write_memory): Remove declaration of errno.
8058
836acd6d
UW
80592008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8060
8061 * linux-low.c (handle_extended_wait): Do not use "status"
8062 variable uninitialized.
8063
aeba519e
PA
80642008-07-07 Pedro Alves <pedro@codesourcery.com>
8065
8066 * server.c (handle_v_attach): Inhibit reporting dll changes.
8067
db42f210
PA
80682008-06-27 Pedro Alves <pedro@codesourcery.com>
8069
8070 * remote-utils.c (prepare_resume_reply): If requested, don't
8071 output "thread:TID" in the T stop reply.
8072
8073 * server.c (disable_packet_vCont, disable_packet_Tthread)
8074 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8075 (handle_query): If requested, disable support for qC, qfThreadInfo
8076 and qsThreadInfo.
8077 (handle_v_requests): If requested, disable support for vCont.
8078 (gdbserver_show_disableable): New.
8079 (main): Handle --disable-packet and --disable-packet=LIST.
8080
8081 * server.h (disable_packet_vCont, disable_packet_Tthread)
8082 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8083
8e4c5421
CD
80842008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8085
8086 * server.c (gdbserver_usage): Mention --version.
8087
6e23a804
DJ
80882008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8089
8090 * Makefile.in (gdbreplay.o): New rule.
8091
90aa6a40
JM
80922008-06-06 Joseph Myers <joseph@codesourcery.com>
8093
8094 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8095 message, not gdbserver.
8096
c16158bc 80972008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8098 Nathan Sidwell <nathan@codesourcery.com>
8099 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8100
8101 * acinclude.m4: Include ../../config/acx.m4.
8102 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8103 * configure, config.in: Regenerate.
8104 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8105 * server.c (gdbserver_version): Print PKGVERSION.
8106 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8107 (main): Adjust gdbserver_usage calls.
8108 * gdbreplay.c (version, host_name): Add declarations.
8109 (gdbreplay_version, gdbreplay_usage): New.
8110 (main): Accept --version and --help options.
8111
aeb75bf5
DJ
81122008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8113
8114 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8115 (arm_breakpoint_at): Handle Thumb.
8116 (the_low_target): Add comment.
8117
76b233dd
UW
81182008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8119
8120 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8121
08388c79
DE
81222008-05-09 Doug Evans <dje@google.com>
8123
a3c83fae
DE
8124 * server.h (decode_search_memory_packet): Declare.
8125 * remote-utils.c (decode_search_memory_packet): New fn.
8126 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8127 (handle_search_memory): New fn.
8128 (handle_query): Process qSearch:memory packets.
8129
bb9c3d36
UW
81302008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8131
8132 * regcache.c (registers_length): Remove.
8133 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8134 full register packet.
8135 * regcache.h (registers_length): Remove prototype.
8136 * server.h (PBUFSIZ): Define to 16384.
8137
7284e1be
UW
81382008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8139
8140 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8141 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8142 powerpc-64l.o, and powerpc-altivec64l.o.
8143 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8144 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8145 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8146 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8147 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8148 to srv_xmlfiles.
8149
8150 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8151 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8152 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8153 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8154 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8155 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8156 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8157 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8158 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8159 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8160 (clean): Update.
8161
8162 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8163 (init_registers_powerpc_32l): ... this new prototype.
8164 (init_registers_powerpc_32): Remove, replace by ...
8165 (init_registers_powerpc_altivec32l): ... this new prototype.
8166 (init_registers_powerpc_e500): Remove, replace by ...
8167 (init_registers_powerpc_e500l): ... this new prototype.
8168 (init_registers_ppc64): Remove, replace by ...
8169 (init_registers_powerpc_64l): ... this new prototype.
8170 (init_registers_powerpc_64): Remove, replace by ...
8171 (init_registers_powerpc_altivec64l): ... this new prototype.
8172 (ppc_num_regs): Set to 73.
8173 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8174 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8175 (ppc_cannot_store_register): Handle orig_r3 and trap.
8176 (ppc_arch_setup): Update init_registers_... calls.
8177 (ppc_fill_gregset): Handle orig_r3 and trap.
8178
8179 * inferiors.c (clear_inferiors): Reset current_inferior.
8180
fdc59709
PB
81812008-04-23 Paolo Bonzini <bonzini@gnu.org>
8182
889bf7c5
PA
8183 * acinclude.m4: Add override.m4.
8184 * configure: Regenerate.
fdc59709 8185
c9b2f845
UW
81862008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8187
8188 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8189 initial call to init_register_ppc64.
8190
550512b8
UW
81912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8192
43aaf8b6
PA
8193 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8194 single powerpc*-*-linux* case.
550512b8
UW
8195 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8196
b6430ec3
UW
81972008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8198
8199 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8200 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8201 from reg_xmlfiles.
8202 * linux-ppc-low.c: Include <elf.h>.
8203 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8204 (ppc_hwcap): New global variable.
8205 (ppc_regmap): Remove __SPE__ #ifdef sections.
8206 (ppc_regmap_e500): New global variable.
8207 (ppc_cannot_store_register): Update __SPE__ special case.
8208 (ppc_get_hwcap): New function.
8209 (ppc_arch_setup): Use it to determine whether inferior supports
8210 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8211 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8212 Do not access registers if target does not support AltiVec.
8213 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8214 Do not access registers if target does not support SPE.
8215 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8216
52fa2412
UW
82172008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8218
8219 * linux-low.c (disabled_regsets, num_regsets): New.
8220 (use_regsets_p): Delete.
8221 (linux_wait_for_process): Clear disabled_regsets.
8222 (regsets_fetch_inferior_registers): Check and set it.
8223 (regsets_store_inferior_registers): Likewise.
8224 (linux_fetch_registers, linux_store_registers): Do not use
8225 use_regsets_p.
8226 (initialize_low): Allocate disabled_regsets.
8227
e28b3332
DJ
82282008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8229
8230 * Makefile.in (LIBOBJS): New.
8231 (OBS): Use LIBOBJS.
8232 (memmem.o): New rule.
8233 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8234 * configure: Regenerated.
8235
4536995d
UW
82362008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8237
8238 * server.c (handle_query): Never return "unsupported" for
8239 qXfer:features:read queries.
8240
221c031f
UW
82412008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8242
8243 * server.c (get_features_xml): Fix inverted condition.
8244 (handle_query): Always support qXfer:feature:read.
8245
ccd213ac
DJ
82462008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8247
8248 * server.c (wrapper_argv): New.
8249 (start_inferior): Handle wrapper_argv. If set, expect an extra
8250 trap.
8251 (gdbserver_usage): Document --wrapper.
8252 (main): Parse --wrapper.
8253
6fe305f7
UW
82542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8255
8256 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8257 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8258 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8259 (ppc_set_pc): Likewise.
8260 (ppc_arch_setup): New function.
8261 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8262 of collect_register.
889bf7c5 8263 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8264
5b0a002e
UW
82652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8266
8267 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8268 instead of linux-ppc64-low.o.
8269 * linux-ppc64-low.c: Remove file.
8270 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8271 (linux-ppc64-low.o): Remove rule.
8272
8273 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8274 (init_registers_powerpc_64): Likewise.
8275 (ppc_regmap): Conditionally define depending on __powerpc64__.
8276 (ppc_cannot_store_register): Do not special-case "fpscr" when
8277 compiled on __powerpc64__.
8278 (ppc_collect_ptrace_register): New function.
8279 (ppc_supply_ptrace_register): New function.
8280 (ppc_breakpoint): Change type to "unsigned int".
8281 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8282 (the_low_target): Conditionally provide initializers for the
889bf7c5 8283 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8284 collect_ptrace_register and supply_ptrace_register members.
8285
9b4b61c8
UW
82862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8287
8288 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8289 * server.c (gdbserver_xmltarget): Define.
8290 (get_features_xml): Use it to replace "target.xml" and arch_string.
8291
8292 * configure.srv: Remove srv_xmltarget. Add XML files that were
8293 mentioned there to srv_xmlfiles instead. Remove conditional tests
8294 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8295 srv_xmlfiles and srv_regobj to include all possible choices.
8296 * configure.ac (srv_xmltarget): Remove.
8297 (srv_xmlfiles): Do not add "target.xml".
8298 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8299 checks for supplementary target information.
8300 * configure: Regenerate.
8301 * Makefile.in (XML_TARGET): Remove.
8302 (target.xml): Remove rule.
8303 (clean): Do not clean up target.xml.
8304 (.PRECIOUS): Do not mention target.xml.
8305
8306 * target.h (struct target_ops): Remove arch_string member.
8307 * linux-low.c (linux_arch_string): Remove.
8308 (linux_target_ops): Remove arch_string initializer.
8309 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8310 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8311 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8312 * spu-low.c (spu_arch_string): Remove.
8313 (spu_target_ops): Remove arch_string initializer.
8314 * win32-low.c (win32_arch_string): Remove.
8315 (win32_target_ops): Remove arch_string initializer.
8316 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8317 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8318 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8319
ee1a7ae4
UW
83202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8321
8322 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8323 by collect_ptrace_register and supply_ptrace_register hooks.
8324 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8325 instead of checking for the_low_target.left_pad_xfer.
8326 (usr_store_inferior_registers): Use collect_ptrace_register callback
8327 instead of checking for the_low_target.left_pad_xfer.
8328
8329 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8330 (s390_supply_ptrace_register): Likewise.
8331 (s390_fill_gregset): Call s390_collect_ptrace_register.
8332 (the_low_target): Update.
8333
8334 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8335 (ppc_supply_ptrace_register): Likewise.
8336 (the_low_target): Update.
8337
8338 * linux-i386-low.c (the_low_target): Update.
8339 * linux-x86-64-low.c (the_low_target): Update.
8340
d61ddec4
UW
83412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8342
8343 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8344 reg-s390.o and reg-s390x.o.
8345
8346 * linux-low.c (new_inferior): New global variable.
8347 (linux_create_inferior, linux_attach): Set it.
8348 (linux_wait_for_process): Call the_low_target.arch_setup after the
8349 target has stopped for the first time.
8350 (initialize_low): Do not call the_low_target.arch_setup.
8351
8352 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8353 (s390_set_pc): Likewise.
8354 (s390_arch_setup): New function.
8355 (the_low_target): Use s390_arch_setup as arch_setup routine.
8356
8357 * regcache.c (realloc_register_cache): New function.
8358 (set_register_cache): Call it for each existing regcache.
8359
d05b4ac3
UW
83602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8361
8362 * server.h (init_registers): Remove prototype.
8363
8364 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8365 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8366 instead of init_registers ().
8367 * linux-arm-low.c (init_registers_arm): Add prototype.
8368 (init_registers_arm_with_iwmmxt): Likewise.
8369 (the_low_target): Add initializer for arch_setup field.
8370 * linux-cris-low.c (init_registers_cris): Add prototype.
8371 (the_low_target): Add initializer for arch_setup field.
8372 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8373 (the_low_target): Add initializer for arch_setup field.
8374 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8375 (the_low_target): Add initializer for arch_setup field.
8376 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8377 (the_low_target): Add initializer for arch_setup field.
8378 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8379 (the_low_target): Add initializer for arch_setup field.
8380 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8381 (the_low_target): Add initializer for arch_setup field.
8382 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8383 (init_registers_mips64_linux): Likewise.
8384 (the_low_target): Add initializer for arch_setup field.
8385 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8386 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8387 (the_low_target): Add initializer for arch_setup field.
8388 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8389 (init_registers_powerpc_64): Likewise.
8390 (the_low_target): Add initializer for arch_setup field.
8391 * linux-s390-low.c (init_registers_s390): Add prototype.
8392 (init_registers_s390x): Likewise.
8393 (the_low_target): Add initializer for arch_setup field.
8394 * linux-sh-low.c (init_registers_sh): Add prototype.
8395 (the_low_target): Add initializer for arch_setup field.
8396 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8397 (the_low_target): Add initializer for arch_setup field.
8398 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8399 (the_low_target): Add initializer for arch_setup field.
8400
8401 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8402 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8403 instead of init_registers ().
8404 * win32-arm-low.c (init_registers_arm): Add prototype.
8405 (the_low_target): Add initializer for arch_setup field.
8406 * win32-i386-low.c (init_registers_i386): Add prototype.
8407 (the_low_target): Add initializer for arch_setup field.
8408
8409 * spu-low.c (init_registers_spu): Add prototype.
8410 (initialize_low): Call initialie_registers_spu () instead of
8411 initialize_registers ().
8412
fd96d250
PA
84132008-02-19 Pedro Alves <pedro@codesourcery.com>
8414
8415 * server.c (handle_v_requests): When handling the vRun and vAttach
8416 packets, if already debugging a process, don't kill it. Return an
8417 error instead.
8418
d41b6bb4
DJ
84192008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8420
8421 * server.c (handle_query): Correct length check.
8422
5ac588cf
PA
84232008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8424
8425 * win32-low.c (do_initial_child_stuff): Add process handle
8426 parameter. Set current_process_handle and current_process_id from the
8427 parameters. Clear globals.
8428 (win32_create_inferior): Don't set current_process_handle and
8429 current_process_id here. Instead pass them on the call to
8430 do_initial_child_stuff.
8431 (win32_attach): Likewise.
8432 (win32_clear_inferiors): New.
8433 (win32_kill): Don't close the current process handle or the
8434 current thread handle here. Instead call win32_clear_inferiors.
8435 (win32_detach): Don't open a new handle to the process. Call
8436 win32_clear_inferiors.
8437 (win32_join): Don't rely on current_process_handle; open a new
8438 handle using the process id.
8439 (win32_wait): Call win32_clear_inferiors when the inferior process
8440 has exited.
8441
ecd7ecbc
DJ
84422008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8443
8444 * server.c (monitor_show_help): Add "exit".
8445
1525d545
MG
84462008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8447
ecd7ecbc 8448 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8449 (clean): Add reg-xtensa.c.
8450 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8451 * configure.srv (xtensa*-*-linux*) New target.
8452 * linux-xtensa-low.c: New.
8453 * xtensa-xtregs.c: New.
1525d545 8454
59a016f0
PA
84552008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8456
8457 * hostio.c: Don't include errno.h.
8458 (errno_to_fileio_errno): Move to hostio-errno.
8459 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8460 error number outputting to the target->hostio_last_error callback.
8461 (hostio_packet_error): Use FILEIO_EINVAL directly.
8462 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8463 calls to hostio_error.
8464 * hostio-errno.c: New.
8465 * server.h (hostio_last_error_from_errno): Declare.
8466 * target.h (target_ops): Add hostio_last_error member.
8467 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8468 as hostio_last_error handler.
889bf7c5 8469 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8470 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8471 (wince_hostio_last_error): New functions.
8472 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8473 as hostio_last_error handler.
8474 (win32_target_ops) [!_WIN32_WCE]: Register
8475 hostio_last_error_from_errno as hostio_last_error handler.
8476 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8477 (hostio-errno.o): New rule.
8478 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8479 * configure.srv (srv_hostio_err_objs): New variable. Default to
8480 hostio-errno.o.
8481 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8482 * configure: Regenerate.
8483
2d717e4f
DJ
84842008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8485
8486 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8487 (linux_kill, linux_detach): Clean up the process list.
8488 * remote-utils.c (remote_open): Improve port number parsing.
8489 (putpkt_binary, input_interrupt): Only send interrupts if the target
8490 is running.
8491 * server.c (extended_protocol): Make static.
8492 (attached): Define earlier.
8493 (exit_requested, response_needed, program_argv): New variables.
8494 (target_running): New.
8495 (start_inferior): Clear attached here.
8496 (attach_inferior): Set attached here.
8497 (require_running): Define.
8498 (handle_query): Use require_running and target_running. Implement
8499 "monitor exit".
8500 (handle_v_attach, handle_v_run): New.
8501 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8502 (gdbserver_usage): Update.
8503 (main): Redo argument parsing. Handle --debug and --multi. Handle
8504 --attach along with other options or after the port. Save
8505 program_argv. Support no initial program. Resynchronize
8506 communication with GDB after an error. Handle "monitor exit".
8507 Use require_running and target_running. Always allow the extended
8508 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8509 restart in extended mode.
8510 * README: Refer to the GDB manual. Update --attach usage.
8511
7407e2de
AS
85122007-12-20 Andreas Schwab <schwab@suse.de>
8513
8514 * linux-low.c (STACK_SIZE): Define.
8515 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8516 (linux_test_for_tracefork): Likewise.
8517
b65d95c5
DJ
85182007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8519
8520 * linux-low.c (linux_wait_for_event): Update messages. Do not
8521 reinsert auto-delete breakpoints.
8522 * mem-break.c (struct breakpoint): Change return type of handler to
8523 int.
8524 (set_breakpoint_at): Update handler type.
8525 (reinsert_breakpoint_handler): Return 1 instead of calling
8526 delete_breakpoint.
8527 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8528 setting a new one.
8529 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8530 * mem-break.h (set_breakpoint_at): Update handler type.
8531 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8532 * win32-low.c (auto_delete_breakpoint): New.
8533 (get_child_debug_event): Use it.
8534
4e799345
DJ
85352007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8536
8537 * configure.ac: Check for pread and pwrite.
8538 * hostio.c (handle_pread): Fall back to lseek and read.
8539 (handle_pwrite): Fall back to lseek and write.
8540 * config.in, configure: Regenerated.
8541
27524b67
DJ
85422007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8543
8544 * server.c (myresume): Add own_buf argument.
8545 (main): Update calls.
8546
a20d5e98
DJ
85472007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8548
8549 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8550 * remote-utils.c (remote_open): Do not call disable_async_io.
8551 (block_async_io): Delete.
8552 (unblock_async_io): Make static.
8553 (initialize_async_io): New.
8554 * server.c (handle_v_cont): Handle async I/O here.
8555 (myresume): Likewise. Move other common resume tasks here...
8556 (main): ... from here. Call initialize_async_io. Disable async
8557 I/O before the main loop.
8558 * server.h (initialize_async_io): Declare.
8559 (block_async_io, unblock_async_io): Delete prototypes.
8560 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8561
b79d787e
DJ
85622007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8563
8564 * remote-utils.c (readchar): Allow binary data in received messages.
8565
d97903b2
PA
85662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8567
8568 * win32-low.c (attaching): New global.
8569 (win32_create_inferior): Clear the `attaching' global.
8570 (win32_attach): Set the `attaching' global.
8571 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8572 attaching. Only set a breakpoint at the entry point if not
8573 attaching.
8574
311de423
PA
85752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8576
8577 * server.c (main): Don't report dll events on the initial
8578 connection on attaches.
8579
6c2d16d2
PA
85802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8581
8582 * server.c (main): Relax numerical bases supported for the pid of
8583 the --attach command line argument.
8584
5ca906e6
PA
85852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8586
8587 * win32-low.c (win32_attach): Call OpenProcess before
8588 DebugActiveProcess, not after. Add last error output to error
8589 call.
8590
9c6c8194
PA
85912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8592
8593 * win32-low.c (win32_get_thread_context)
8594 (win32_set_thread_context): New functions.
8595 (thread_rec): Use win32_get_thread_context.
8596 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8597 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8598 field.
8599
4d5d1aaa
PA
86002007-12-03 Leo Zayas
8601 Pedro Alves <pedro_alves@portugalmail.pt>
8602
8603 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8604 global variables.
8605 (child_add_thread): Minor cleanup.
8606 (child_continue): Resume artificially suspended threads before
8607 calling ContinueDebugEvent.
8608 (suspend_one_thread): New.
8609 (fake_breakpoint_event): New.
8610 (get_child_debug_event): Change return type to int. Check here if
8611 gdb sent an interrupt request. If a soft interrupt was requested,
8612 fake a breakpoint event. Return 0 if there is no event to handle,
8613 and 1 otherwise.
8614 (win32_wait): Don't check here if gdb sent an interrupt request.
8615 Ensure there is a valid event to handle.
8616 (win32_request_interrupt): Add soft interruption method as last
8617 resort.
8618
c436e841
PA
86192007-12-03 Leo Zayas
8620 Pedro Alves <pedro_alves@portugalmail.pt>
8621
8622 * win32-low.h (win32_thread_info): Add descriptions to the
8623 structure members. Replace `suspend_count' counter by a
8624 `suspended' flag.
8625 * win32-low.c (thread_rec): Update condition of when to get the
8626 context from the inferior. Rely on ContextFlags being set if it
8627 has already been retrieved. Only suspend the inferior thread if
8628 we haven't already. Warn if that fails.
8629 (continue_one_thread): s/suspend_count/suspended/. Only call
8630 ResumeThread once. Warn if that fails.
8631
e7b5fa67
PA
86322007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8633
8634 * win32-low.c (win32_wait): Don't read from the inferior when it
8635 has already exited.
8636
a385171d
PA
86372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8638
8639 * Makefile.in (win32_low_h): New variable.
8640 (win32-low.o): Add dependency on $(win32_low_h).
8641 (win32-arm-low.o, win32-i386-low.o): New rules.
8642
f80c84b3
DJ
86432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8644
8645 * hostio.c: Correct copyright year.
8646
a6b151f1
DJ
86472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8648
8649 * Makefile.in (OBS): Add hostio.o.
8650 (hostio.o): New rule.
8651 * server.h (handle_vFile): Declare.
8652 * hostio.c: New file.
8653 * server.c (handle_v_requests): Take packet_len and new_packet_len
8654 for binary packets. Call handle_vFile.
8655 (main): Update call to handle_v_requests.
8656
f9387fc3
DJ
86572007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8658
8659 * linux-low.c: Include <sched.h>.
8660
51c2684e
DJ
86612007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8662
8663 * linux-low.c (linux_tracefork_grandchild): New.
8664 (linux_tracefork_child): Use clone.
8665 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8666
75f83163
JB
86672007-10-31 Joel Brobecker <brobecker@adacore.com>
8668
8669 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8670
da5898ce
DJ
86712007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8672
8673 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8674
24a09b5f
DJ
86752007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8676
8677 * inferiors.c (change_inferior_id): Delete.
8678 (add_pid_to_list, pull_pid_from_list): New.
8679 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8680 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8681 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8682 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8683 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8684 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8685 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8686 (using_threads): Always set to 1.
8687 (handle_extended_wait): New.
8688 (add_process): Do not set TID.
8689 (linux_create_inferior): Set must_set_ptrace_flags.
8690 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8691 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8692 (linux_thread_alive): Rename TID argument to LWPID.
8693 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8694 (linux_wait_for_event): Do not use TID or check using_threads. Update
8695 call to dead_thread_notify. Call handle_extended_wait.
8696 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8697 (send_sigstop): Delete sigstop_sent.
8698 (wait_for_sigstop): Avoid TID.
8699 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8700 (linux_test_for_tracefork): New.
8701 (linux_lookup_signals): Use thread_db_active and
8702 linux_supports_tracefork_flag.
8703 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8704 * linux-low.h (get_process_thread): Avoid TID.
8705 (struct process_ifo): Move thread_known and tid to the end. Remove
8706 sigstop_sent.
8707 (linux_attach_lwp, thread_db_init): Update prototypes.
8708 * server.h (change_inferior_id): Delete prototype.
8709 (add_pid_to_list, pull_pid_from_list): New prototypes.
8710 * thread-db.c (thread_db_use_events): New.
8711 (find_first_thread): Rename to...
8712 (find_one_thread): ...this. Update callers and messages. Do not
8713 call fatal. Check thread_db_use_events. Do not call
8714 change_inferior_id or new_thread_notify.
8715 (maybe_attach_thread): Update. Do not call new_thread_notify.
8716 (thread_db_init): Set thread_db_use_events. Check use_events.
8717 * utils.c (fatal, warning): Correct message prefix.
8718
30ed0a8f
DJ
87192007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8720
8721 * Makefile.in (clean): Remove new files.
8722 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8723 (powerpc-64.o, powerpc-64.c): New rules.
8724 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8725 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8726 with SPE.
8727 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8728 SPE targets.
8729 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8730 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8731 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8732 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8733 (target_regsets): Add AltiVec and SPE register sets.
8734 * configure.ac: Check for AltiVec and SPE.
8735 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8736 (ppc_fill_vrregset, ppc_store_vrregset): New.
8737 (target_regsets): Add AltiVec register set.
8738 * configure: Regenerated.
8739
fd462a61
DJ
87402007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8741
8742 * linux-low.c (O_LARGEFILE): Define.
8743 (linux_read_memory): Use /proc/PID/mem.
8744 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8745 * configure, config.in: Regenerated.
8746
69f223ed
DJ
87472007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8748
8749 * linux-low.c (linux_wait_for_event): Do not pass signals while
8750 single-stepping.
8751
aec18585
PA
87522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8753
8754 * win32-low.c (create_process): New.
8755 (win32_create_inferior): Use create_process instead of
8756 CreateProcess. If create_process failed retry appending an ".exe"
8757 suffix. Store the GetLastError result immediatelly after
8758 create_process calls and use it on the call to error.
8759
34d86ddd
PA
87602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8761
8762 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8763
5a0e3bd0
JB
87642007-08-23 Joel Brobecker <brobecker@adacore.com>
8765
8766 * configure.ac: Switch license to GPLv3.
8767
f88c79e6
MS
87682007-08-01 Michael Snyder <msnyder@access-company.com>
8769
8770 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8771
6b3d9b83
PA
87722007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8773
8774 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8775 typedef.
8776 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8777 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8778 CloseToolhelp32Snapshot.
8779 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8780 CloseToolhelp32Snapshot.
8781
c588c53c
MS
87822007-07-27 Michael Snyder <michael.snyder@access-company.com>
8783
8784 * server.c (main): Check for inferior exit before main loop.
8785
aa0403d9
PA
87862007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8787
8788 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8789 instead of on tmp_desc.
8790
255e7678
DJ
87912007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8792 Daniel Jacobowitz <dan@codesourcery.com>
8793
8794 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8795 (add_thread): Minor cleanups.
8796 (clear_inferiors): Move lower in the file. Clear the DLL
8797 list.
8798 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8799 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8800 (xml_escape_text): New.
8801 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8802 for qSupported.
8803 (handle_v_cont): Report errors.
8804 (gdbserver_version): Update.
8805 (main): Correct size of own_buf. Do not report initial DLL events.
8806 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8807 (unloaded_dll, xml_escape_text): New.
8808 * win32-low.c (enum target_waitkind): Update comments.
8809 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8810 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8811 (win32_EnumProcessModules, win32_GetModuleInformation)
8812 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8813 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8814 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8815 (win32_Module32First, win32_Module32Next, load_toolhelp)
8816 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8817 (get_child_debug_event): Handle DLL events.
8818 (win32_wait): Likewise.
8819
0d37add9
DJ
88202007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8821
8822 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8823 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8824
45e2715e
PA
88252007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8826
8827 * win32-low.c (handle_output_debug_string): Ignore event if not
8828 waiting.
8829
c5674cf1
PA
88302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8831
8832 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8833
2bbe3cc1
DJ
88342007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8835
8836 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8837
ae13219e
DJ
88382007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8839
8840 * inferiors.c (change_inferior_id): Add comment.
8841 * linux-low.c (check_removed_breakpoint): Add an early
8842 prototype. Improve debug output.
8843 (linux_attach): Doc update.
8844 (linux_detach_one_process, linux_detach): Clean up before releasing
8845 each process.
8846 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8847 * linux-low.h (struct process_info): Doc improvement.
8848 * mem-break.c (delete_all_breakpoints): New.
8849 * mem-break.h (delete_all_breakpoints): New prototype.
8850 * thread-db.c (find_first_thread): New.
8851 (thread_db_create_event): Call it instead of
8852 thread_db_find_new_threads. Clean up unused variables.
8853 (maybe_attach_thread): Remove first thread handling.
8854 (thread_db_find_new_threads): Use find_first_thread.
8855 (thread_db_get_tls_address): Likewise.
8856
4105de34
DJ
88572007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8858
8859 * thread-db.c (thread_db_find_new_threads): Add prototype.
8860 (thread_db_create_event): Check for the main thread before adding
8861 a new thread.
8862 (maybe_attach_thread): Only enable event reporting if TID == 0.
8863 (thread_db_get_tls_address): Check for new threads.
8864
2b876972
DJ
88652007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8866
8867 * linux-low.c (linux_create_inferior): Try execv before execvp.
8868 * spu-low.c (spu_create_inferior): Likewise.
8869
7a245884
DJ
88702007-06-13 Mike Frysinger <vapier@gentoo.org>
8871
8872 * linux-low.c (linux_create_inferior): Change execv to execvp.
8873 * spu-low.c (spu_create_inferior): Likewies.
8874
117ce543
DJ
88752007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8876
8877 * Makefile.in (clean): Clean new files instead of deleted ones.
8878 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8879 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8880 rules.
8881 * configure.srv: Specify XML files and new regformats for MIPS and
8882 MIPS64 GNU/Linux.
8883 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8884 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8885 an entry for the restart register.
8886 (mips_cannot_fetch_register, mips_cannot_store_register)
8887 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8888 register names to match the XML descriptions.
8889 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8890 restart register instead of $0.
8891
0e7f50da
UW
88922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8893 Markus Deuling <deuling@de.ibm.com>
8894
8895 * remote-utils.c (decode_xfer_write): New function.
8896 * server.h (decode_xfer_write): Add prototype.
8897 * server.c (handle_query): Add PACKET_LEN argument. Support
8898 qXfer:spu:read and qXfer:spu:write packets.
8899 (main): Pass packet_len to handle_query.
8900 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8901 * target.h (target_ops): Add qxfer_spu.
8902
374c1d38
UW
89032007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8904
8905 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8906 accessing non-seekable spufs files.
8907
bb63802a
UW
89082007-05-16 Markus Deuling <deuling@de.ibm.com>
8909
889bf7c5 8910 * server.c (handle_query): Add reply for qC packet.
bb63802a 8911
7390519e
PA
89122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8913 Leo Zayas <lerele@champenstudios@com>
8914
8915 * server.h (check_remote_input_interrupt_request): New function.
8916 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8917 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8918 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8919 (check_remote_input_interrupt_request): New function.
8920 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8921 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8922 winapi_GenerateConsoleCtrlEvent): New typedefs.
8923 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8924 to 250 ms.
8925 (win32_wait): Check for remote interrupt request
8926 with check_remote_input_interrupt_request.
8927 (win32_request_interrupt): New function.
8928 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8929
34b34921
PA
89302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8931
8932 * win32-low.c (debug_registers_changed,
8933 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8934 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8935 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8936 (thread_rec): Get context using the low target.
8937 (child_add_thread): Call thread_added on the low target,
8938 which does the same thing.
8939 (regptr): Delete.
8940 (do_initial_child_stuff): Remove debug registers references.
8941 Set context using the low target. Resume threads after
8942 setting the contexts.
8943 (child_continue): Remove dead variable. Remove debug
8944 registers references.
8945 (child_fetch_inferior_registers): Go through the low target.
8946 (do_child_store_inferior_registers): Remove.
8947 (child_store_inferior_registers): Go through the low target.
8948 (win32_resume): Remove debug registers references.
8949 Set context using the low target.
8950 (handle_exception): Change return type to void. Don't record
8951 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8952 first chance exception.
889bf7c5 8953 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8954 goto loop. Always return after waiting for debug event.
8955 (win32_wait): Convert to switch statement. Handle spurious
8956 events.
8957
8958 * win32-i386-low.c (debug_registers_changed,
8959 debug_registers_used): New.
8960 (initial_stuff): Rename to ...
8961 (i386_initial_stuff): ... this. Clear debug registers
8962 state variables.
8963 (store_debug_registers): Delete.
8964 (i386_get_thread_context): New.
8965 (load_debug_registers): Delete.
8966 (i386_set_thread_context): New.
8967 (i386_thread_added): New.
8968 (single_step): Rename to ...
8969 (i386_single_step): ... this.
8970 (do_fetch_inferior_registers): Rename to ...
8971 (i386_fetch_inferior_register): ... this.
8972 (i386_store_inferior_register): New.
8973 (the_low_target): Adapt to new interface.
8974
8975 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8976 (arm_get_thread_context): New.
8977 (arm_set_thread_context): New.
8978 (regptr): New.
8979 (do_fetch_inferior_registers): Rename to ...
8980 (arm_fetch_inferior_register): ... this.
8981 (arm_store_inferior_register): New.
8982 (arm_wince_breakpoint): Reimplement as unsigned long.
8983 (arm_wince_breakpoint_len): Define.
8984 (the_low_target): Adapt to new interface.
8985
8986 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8987 load_debug_registers. Add get_thread_context, set_thread_context,
8988 thread_added and store_inferior_register. Rename
8989 fetch_inferior_registers to fetch_inferior_register.
8990 (regptr): Remove declaration.
8991
dd6953e1
PA
89922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8993
8994 * linux-low.c (linux_detach): Change return type to int. Return 0.
8995 * spu-low.c (spu_detach): Likewise.
8996
444d6139
PA
89972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8998
8999 * target.h (target_ops): Change return type of detach to int.
9000 Add join.
9001 (join_inferior): New.
9002 * server.c (main): Don't skip detach support on mingw32.
9003 If the inferior doesn't support detaching return error.
9004 Call join_inferior instead of using waitpid.
9005 * linux-low.c (linux_join): New.
9006 (linux_target_op): Add linux_join.
9007 * spu-low.c (spu_join): New.
9008 (spu_target_ops): Add spu_join.
9009 * win32-low.c (win32_detach): Adapt to new interface.
9010 Reopen current_process_handle before detaching. Issue a child
9011 resume before detaching.
9012 (win32_join): New.
9013 (win32_target_op): Add win32_join.
9014
1d5315fe
PA
90152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9016
9017 * win32-low.c (win32-attach): Fix return value.
9018 * target.h (target_ops): Describe ATTACH return values.
9019
bf914831
PA
90202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9021
9022 * win32-low.c (GETPROCADDRESS): Define.
9023 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9024 (winapi_DebugSetProcessKillOnExit): Likewise.
9025 (win32_create_inferior): Force usage of ansi CreateProcessA.
9026 (win32_attach): Use GETPROCADDRESS.
9027 (win32_detach): Likewise.
9028
f72f3e60
PA
90292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9030
9031 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9032
ed50f18f
PA
90332007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9034
9035 * win32-low.c: Commit leftover changes from 2007-03-29.
9036
0c2ead7e
DJ
90372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9038
9039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9040 fields short instead of int. Add explicit padding.
9041 (i387_cache_to_fsave): Remove unnecessary casts.
9042 (i387_fsave_to_cache): Doc fix.
9043 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9044
73725ff3
DJ
90452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9046
9047 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9048 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9049
d99f33d8
PA
90502007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9051
9052 * configure.srv (arm*-*-mingw32ce*): Move near the other
9053 arm targets.
9054
68070c10
PA
90552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9056
2482afc6 9057 * configure.ac: Add errno checking.
68070c10
PA
9058 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9059 sys/file.h and malloc.h.
9060 (AC_CHECK_DECLS): Add perror.
9061 (srv_mingwce): Handle.
2482afc6 9062 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9063 win32-i386-low.o to srv_tgtobj.
9064 (i[34567]86-*-mingw*): Likewise.
9065 (arm*-*-mingw32ce*): Add case.
9066 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9067 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9068 [__MINGW32CE__] (strerror): New function.
9069 [__MINGW32CE__] (errno): Define to GetLastError.
9070 [__MINGW32CE__] (COUNTOF): New macro.
9071 (remote_open): Remove extra close call.
9072 * mem-break.c (delete_breakpoint_at): New function.
9073 * mem-break.h (delete_breakpoint_at): Declare.
9074 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9075 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9076 [USE_WIN32API] (read, write): Add char* casts.
9077 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9078 * server.h: Include wincecompat.h on Windows CE.
9079 [HAVE_ERRNO_H]: Check.
9080 (perror): Declare if not declared.
9081 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9082 (perror_with_name): Remove errno declaration.
9083 * wincecompat.h: New.
9084 * wincecompat.c: New.
9085 * win32-low.h: New.
9086 * win32-arm-low.c: New.
9087 * win32-i386-low.c: New.
9088 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9089 (OUTMSG2): Make it safe.
9090 (_T): New macro.
9091 (COUNTOF): New macro.
9092 (NUM_REGS): Get it from the low target.
9093 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9094 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9095 (thread_rec): Let low target handle debug registers.
9096 (child_add_thread): Likewise.
9097 (child_init_thread_list): Likewise.
9098 (continue_one_thread): Likewise.
9099 (regptr): New.
9100 (do_child_fetch_inferior_registers): Move to ...
9101 * win32-i386-low.c: ... here, and rename to ...
9102 (do_fetch_inferior_registers): ... this.
889bf7c5 9103 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9104 Go through the low target.
9105 (do_child_store_inferior_registers): Use regptr.
9106 (strwinerror): New function.
9107 (win32_create_inferior): Handle Windows CE.
9108 Use strwinerror instead of strerror on Windows error
9109 codes. Add program to the error output.
9110 Don't close the main thread handle on Windows CE.
9111 (win32_attach): Use coredll.dll on Windows CE.
9112 (win32_kill): Close current process and current
9113 thread handles.
9114 (win32_detach): Use coredll.dll on Windows CE.
9115 (win32_resume): Let low target handle debug registers, and
9116 step request.
9117 (handle_exception): Add/Remove initial breakpoint. Avoid
9118 non-existant WSTOPSIG on Windows CE.
9119 (win32_read_inferior_memory): Cast to remove warning.
9120 (win32_arch_string): Go through the low target.
9121 (initialize_low): Call set_breakpoint_data with the low
9122 target's breakpoint.
9123 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9124 FOP_REGNUM, mappings): Move to ...
9125 * win32-i386-low.c: ... here.
9126 * win32-low.c (win32_thread_info): Move to ...
9127 * win32-low.h: ... here.
9128 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9129 win32-arm-low.c and wincecompat.c.
9130 (all:): Add $EXEEXT.
9131 (install-only:): Likewise.
9132 (gdbserver:): Likewise.
9133 (gdbreplay:): Likewise.
9134 * config.in: Regenerate.
9135 * configure: Regenerate.
9136
41093d81
PA
91372007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9138
9139 * win32-low.c: Rename typedef thread_info to
9140 win32_thread_info throughout.
9141
544afa54
PA
91422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9143
9144 * win32-i386-low.c: Rename to ...
9145 * win32-low.c: ... this.
9146 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9147 * Makefile.in: Likewise.
9148
bce7165d
PA
91492007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9150
9151 * remote-utils.c (monitor_output): Constify msg parameter.
9152 * server.h (monitor_output): Likewise.
9153 * win32-i386-low.c (handle_output_debug_string): New.
9154 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9155 handle_output_debug_string.
9156 (get_child_debug_event): Likewise.
9157
506c7aa0
DJ
91582007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9159
9160 * server.c (main): Correct strtoul check.
9161
42c81e2a
DJ
91622007-03-27 Jon Ringle <jon@ringle.org>
9163
9164 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9165
9453113a
DJ
91662007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9167
9168 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9169
64a69107
DJ
91702007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9171
9172 * terminal.h: Check HAVE_SGTTY_H.
9173
91742007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9175
9176 * remote-utils.c (remote_open): Print out the assigned port number.
9177
c74d0ad8
DJ
91782007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9179
9180 * remote-utils.c (monitor_output): New function.
9181 * server.c (debug_threads): Define here.
9182 (monitor_show_help): New function.
9183 (handle_query): Handle qRcmd.
9184 (main): Do not handle 'd' packet.
9185 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9186 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9187 of debug_threads.
9188
de7c3b4a
PA
91892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9190
9191 * Makefile.in (EXEEXT): New.
9192 (clean): Use $(EXEEXT).
9193
ef57601b
PA
91942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9195
9196 * target.h (target_ops): Rename send_signal to request_interrupt,
9197 and remove enum target_signal parameter.
9198 * linux-low.c (linux_request_interrupt): Rename from
9199 linux_send_signal, and always send SIGINT.
9200 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9201 and always send SIGINT.
9202 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9203 of send_signal.
9204 (input_interrupt): Likewise.
9205
820f2bda
PA
92062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9207
9208 * server.c (get_features_xml): Check if target implemented
9209 arch_string.
9210 * win32-i386-low.c (win32_arch_string): New.
9211 (win32_target_ops): Add win32_arch_string as arch_string member.
9212
ab39bf24
UW
92132007-02-22 Markus Deuling <deuling@de.ibm.com>
9214
9215 * spu-low.c (spu_arch_string): New.
9216 (spu_target_ops): Add spu_arch_string.
9217
61ff6e04
DJ
92182007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9219
9220 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9221 * configure.ac: Do not check for terminal.h.
9222 * configure, config.in: Regenerated.
9223
fb1e4ffc
DJ
92242007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9225
9226 * Makefile.in (OBS): Add $(XML_BUILTIN).
9227 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9228 (clean): Update.
9229 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9230 (arm-with-iwmmxt.c): New.
9231 * config.in, configure: Regenerate.
9232 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9233 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9234 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9235 (arm*-*-linux*): Add iWMMXt and regset support.
9236 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9237 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9238 (arm_store_wmmxregset, target_regsets): New.
9239 * server.c (get_features_xml): Take annex argument. Check builtin
9240 XML documents.
9241 (handle_query): Handle multiple annexes.
9242
0f48aa01
DJ
92432007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9244
9245 * remote-utils.c [USE_WIN32API] (read, write): Define.
9246 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9247 write.
9248
23181151
DJ
92492007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9250
9251 * linux-i386-low.c (the_low_target): Set arch_string.
9252 * linux-x86-64-low.c (the_low_target): Likewise.
9253 * linux-low.c (linux_arch_string): New.
9254 (linux_target_ops): Add it.
9255 * linux-low.h (struct linux_target_ops): Add arch_string.
9256 * server.c (write_qxfer_response): Use const void * for DATA.
9257 (get_features_xml): New.
9258 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9259 * target.h (struct target_ops): Add arch_string method.
9260
9d606399
DJ
92612007-01-03 Denis Pilat <denis.pilat@st.com>
9262 Daniel Jacobowitz <dan@codesourcery.com>
9263
9264 * linux-low.c (linux_kill): Handle being called with no threads.
9265 * win32-i386-low.c (win32_kill): Likewise.
9266 (get_child_debug_event): Clear current_process_handle.
9267
92682006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9269 Daniel Jacobowitz <dan@codesourcery.com>
9270
9271 * remote-utils.c (remote_open): Check the type of specified
9272 serial port devices before opening them.
9273 * server.c (main): Kill the inferior if an error occurs during
9274 the first remote_open.
9275
a5e13d24
DJ
92762006-12-05 Markus Deuling <deuling@de.ibm.com>
9277
9278 * README: Update supported targets.
9279
186947f7
DJ
92802006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9281
9282 * Makefile.in (clean): Remove reg-mips64.c.
9283 (reg-mips64.c, reg-mips64.o): New rules.
9284 * configure.srv: Handle mips64. Include regset support for mips.
9285 * linux-mips-low.c (union mips_register): New.
9286 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9287 (mips_breakpoint, mips_breakpoint_at): Use int.
9288 (mips_collect_register, mips_supply_register)
9289 (mips_collect_register_32bit, mips_supply_register_32bit)
9290 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9291 (mips_store_fpregset, target_regsets): New.
9292 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9293
a13e2c95
UW
92942006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9295
9296 * configure.srv: Add target "spu*-*-*".
9297 * Makefile.in (clean): Remove reg-spu.c.
9298 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9299 * spu-low.c: New file.
9300
cb7283db
DJ
93012006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9302
9303 * configure.ac: Correct td_thr_tls_get_addr test.
9304 * configure: Regenerated.
9305
89be2091
DJ
93062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9307
9308 * linux-low.c (linux_wait_for_event): Reformat. Use the
9309 pass_signals array.
9310 * remote-utils.c (decode_address_to_semicolon): New.
9311 * server.c (pass_signals, handle_general_set): New.
9312 (handle_query): Mention QPassSignals for qSupported.
9313 (main): Call handle_general_set.
9314 * server.h (pass_signals, decode_address_to_semicolon): New.
9315
000ef4f0
DJ
93162006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9317
9318 * server.c (handle_query): Correct error handling for read_auxv.
9319
b7149293
UW
93202005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9321
9322 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9323 and srv_linux_thread_db to yes.
9324 * linux-s390-low.c (s390_fill_gregset): New function.
9325 (target_regsets): Define data structure.
9326
dae5f5cf
DJ
93272006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9328
9329 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9330 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9331 * config.in, configure: Regenerated.
9332 * inferiors.c (gdb_id_to_thread): New function.
9333 (gdb_id_to_thread_id): Use it.
9334 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9335 * linux-low.h (struct process_info): Add th member.
9336 (thread_db_get_tls_address): New prototype.
9337 * remote-utils.c (decode_address): Make non-static.
9338 * server.c (handle_query): Handle qGetTLSAddr.
9339 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9340 * target.h (struct target_ops): Add get_tls_address.
9341 * thread-db.c (maybe_attach_thread): Save the thread handle.
9342 (thread_db_get_tls_address): New.
9343
32ca6d61
DJ
93442006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9347 (linux_resume_one_process): Take a siginfo_t *. Update all
9348 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9349 (struct pending_signals): Add a siginfo_t.
9350 (linux_wait_for_process): Always set last_status.
9351 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9352 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9353 * linux-low.h (struct process_info): Add last_status.
9354
5ffff7c1
DJ
93552006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9356
9357 * remote-utils.c (try_rle): New function.
9358 (putpkt_binary): Use it.
9359
8695c747
DJ
93602006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9361
9362 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9363 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9364 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9365 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9366 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9367 point registers.
9368
290fadea
RS
93692006-08-08 Richard Sandiford <richard@codesourcery.com>
9370
9371 * server.c (terminal_fd): New variable.
9372 (old_foreground_pgrp): Likewise.
9373 (restore_old_foreground_pgrp): New function.
9374 (start_inferior): Record the terminal file descriptor in terminal_fd
9375 and its original foreground group in old_foreground_pgrp. Register
9376 restore_old_foreground_pgrp with atexit().
9377
9f2e1e63
DJ
93782006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * server.c (handle_query): Correct qPart to qXfer.
9381
b80864fb
DJ
93822006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9383
9384 * configure.ac: Check for more headers which are missing on
9385 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9386 * configure.srv: Add Cygwin and mingw32.
9387 * remote-utils.c: Don't include headers unconditionally which
9388 are missing on mingw32. Include <winsock.h> for mingw32.
9389 (remote_open): Adjust for mingw32 support. Flush
9390 standard error after writing to it.
9391 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9392 (unblock_async_io, enable_async_io, disable_async_io)
9393 (readchar, getpkt): Update for Winsock support.
9394 (prepare_resume_reply): Expect a protocol signal number.
9395 * server.c: Disable <sys/wait.h> on mingw32.
9396 (start_inferior): Adjust for mingw32 support. Flush
9397 standard error after writing to it.
9398 (attach_inferior): Likewise. Use protocol signal
9399 numbers.
9400 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9401 and names.
9402 * win32-i386-low.c: New file.
9403 * Makefile.in (XM_CLIBS): Set.
9404 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9405 (win32-i386-low.o): New dependency rule.
9406 * linux-low.c (linux_wait): Use target signal numbers.
9407 * target.h (struct target_ops): Doc fix.
9408 * server.h (target_signal_to_name): New prototype.
9409 * gdbreplay.c: Don't include headers unconditionally which
9410 are missing on mingw32. Include <winsock.h> for mingw32.
9411 (remote_close, remote_open): Adjust for Winsock support.
9412 * configure, config.in: Regenerated.
9413
0876f84a
DJ
94142006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9415
9416 * server.c (decode_xfer_read, write_qxfer_response): New.
9417 (handle_query): Take a packet length argument. Handle
9418 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9419 the qSupported response.
9420 (main): Update call to handle_query.
9421
01f9e8fa
DJ
94222006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9423
9424 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9425 (putpkt_binary): Renamed from putpkt and adjusted for binary
9426 data.
9427 (putpkt): New wrapper for putpkt_binary.
9428 (readchar): Don't mask off the high bit.
9429 (decode_X_packet): New function.
9430 * server.c (main): Call putpkt_binary if a handler sets the packet
9431 length. Save the length of the incoming packet. Handle 'X'.
9432 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9433
be2a5f71
DJ
94342006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9435
9436 * server.c (handle_query): Handle qSupported.
9437
ea025f5f
DJ
94382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9439
9440 * remote-utils.c (all_symbols_looked_up): New variable.
9441 (look_up_one_symbol): Check it.
9442 * server.h (look_up_one_symbol): New declaration.
9443 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9444
9308fc88
DJ
94452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9448 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9449 (PTRACE_GET_THREAD_AREA): Define.
9450 (ps_get_thread_area): New function.
9451
52fb6437
NS
94522006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9453
9454 * configure.srv (m68k*-*-uclinux*): New target.
9455 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9456 (linux_resume_one_process): Remove extraneous cast.
9457 (linux_read_offsets): New.
9458 (linux_target_op): Add linux_read_offsets on mmuless systems.
9459 * server.c (handle_query): Add qOffsets logic.
9460 * target.h (struct target_ops): Add read_offsets.
9461
21b0f40c
DJ
94622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9463
9464 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9465 (PTRACE_GET_THREAD_AREA): Define.
9466 (ps_get_thread_area): New function.
9467 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9468 (linux-x86-64-low.o): Update.
9469
0050a760
DJ
94702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9471
9472 * configure.ac: Remove checks for prfpregset_t.
9473 * gdb_proc_service.h: New file.
9474 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9475 new "gdb_proc_service.h".
9476 * proc-service.c: Likewise.
9477 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9478 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9479 * Makefile.in (gdb_proc_service_h): Updated.
9480 * configure, config.in: Regenerated.
9481
b92a518e
DJ
94822006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9483
9484 * remote-utils.c (prepare_resume_reply): Move declaration
9485 of gdb_id_from_wait to the top of the block.
9486
545587ee
DJ
94872006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9488
9489 * linux-low.c (regsets_store_inferior_registers): Read the regset
9490 from the target before filling it.
9491
9db87ebd
DJ
94922006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9493
9494 * server.c (attach_inferior): Return SIGTRAP for a successful
9495 attach.
9496
dd24457d
DJ
94972006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9498
9499 * Makefile.in (OBS): Add version.o.
9500 (STAGESTUFF): Delete.
9501 (version.o): Add dependencies.
9502 (version.c): Replace rule.
9503 (clean): Remove version.c.
9504 * server.c (gdbserver_version): New.
9505 (gdbserver_usage): Use printf.
9506 (main): Handle --version and --help.
9507 * server.h (version, host_name): Add declarations.
9508
6f0f660e
EZ
95092005-12-23 Eli Zaretskii <eliz@gnu.org>
9510
889bf7c5
PA
9511 * linux-arm-low.c:
9512 * linux-arm-low.c:
9513 * inferiors.c:
9514 * i387-fp.h:
9515 * i387-fp.c:
9516 * gdbreplay.c:
9517 * regcache.c:
9518 * proc-service.c:
9519 * mem-break.h:
9520 * mem-break.c:
9521 * linux-x86-64-low.c:
9522 * linux-sh-low.c:
9523 * linux-s390-low.c:
9524 * linux-ppc64-low.c:
9525 * linux-ppc-low.c:
9526 * linux-mips-low.c:
9527 * linux-m68k-low.c:
9528 * linux-m32r-low.c:
9529 * linux-low.h:
9530 * linux-low.c:
9531 * linux-ia64-low.c:
9532 * linux-i386-low.c:
9533 * linux-crisv32-low.c:
9534 * thread-db.c:
9535 * terminal.h:
9536 * target.h:
9537 * target.c:
9538 * server.h:
9539 * server.c:
9540 * remote-utils.c:
9541 * regcache.h:
9542 * utils.c:
9543 * Makefile.in:
9544 * configure.ac:
6f0f660e
EZ
9545 * gdbserver.1: Add (C) after Copyright. Update the FSF
9546 address.
9547
9d1fb177
DJ
95482005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9549
9550 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9551 (arm_breakpoint_at): Recognize both breakpoints.
9552 (the_low_target): Use the correct breakpoint instruction.
9553
011a70c2
DJ
95542005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9555
9556 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9557 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9558 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9559 (the_low_target): Update.
9560
7fb85e41
AS
95612005-10-25 Andreas Schwab <schwab@suse.de>
9562
9563 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9564
9565 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9566 (ia64_num_regs): Reduce to 462.
9567
3db0444b
DJ
95682005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9569
9570 * acinclude.m4: Correct quoting.
9571 * aclocal.m4: Regenerated.
9572
9573 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9574 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9575 (thread_db_init): Call thread_db_err_str.
9576 * configure.ac: Check for TD_VERSION.
9577 * config.in, configure: Regenerated.
9578
bee0189a
DJ
95792005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9580
9581 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9582
e9d25b98
DJ
95832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9584
9585 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9586 is not available. Define HAVE_PTRACE_GETREGS if it is.
9587 * config.in, configure: Regenerated.
9588 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9589 * linux-i386-low.c, linux-m68k-low.c: Update to use
9590 HAVE_PTRACE_GETREGS.
9591 * linux-low.c (regsets_fetch_inferior_registers)
9592 (regsets_store_inferior_registers): Only return 0 if we processed
9593 GENERAL_REGS.
9594 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9595 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9596
a06660f7
DJ
95972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9598
9599 * inferiors.c (struct thread_info): Add gdb_id.
9600 (add_thread): Add gdb_id argument.
9601 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9602 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9603 calls to add_thread.
9604 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9605 * server.c (handle_query): Use thread_to_gdb_id.
9606 (handle_v_cont, main): Use gdb_id_to_thread_id.
9607 * server.h (add_thread): Update prototype.
9608 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9609 prototypes.
9610
5a1f5858
DJ
96112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9612
9613 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9614 left-padded registers.
9615 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9616 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9617
e122f1f5
SE
96182005-07-01 Steve Ellcey <sje@cup.hp.com>
9619
9620 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9621 * configure: Regenerate.
9622 * config.in: Regenerate.
9623 * server.h (NEED_DECLARATION_STRERROR):
9624 Replace with !HAVE_DECL_STRERROR.
9625
d592fa2f
DJ
96262005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9627
9628 * linux-low.c (linux_wait, linux_send_signal): Don't test
9629 an unsigned long variable for > 0 if it could be MAX_ULONG.
9630 * server.c (myresume): Likewise.
9631 * target.c (set_desired_inferior): Likewise.
9632
ccbd4912
MK
96332005-06-13 Mark Kettenis <kettenis@gnu.org>
9634
9635 * configure.ac: Simplify and improve check for socklen_t.
9636 * configure, config.in: Regenerate.
9637
f450004a
DJ
96382005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * acconfig.h: Remove.
9641 * configure.ac: Add a test for socklen_t. Use three-argument
9642 AC_DEFINE throughout.
9643 * config.in: Regenerated using autoheader 2.59.
9644 * configure: Regenerated.
9645
9646 * gdbreplay.c (socklen_t): Provide a default.
9647 (remote_open): Use socklen_t.
9648 * remote-utils.c (socklen_t): Provide a default.
9649 (remote_open): Use socklen_t.
9650 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9651 unsigned char.
9652
9653 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9654 char for buffers.
9655 * linux-low.c (linux_read_memory, linux_write_memory)
9656 (linux_read_auxv): Likewise.
9657 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9658 (check_mem_write): Likewise.
9659 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9660 Likewise.
9661 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9662 (registers_from_string, register_data): Likewise.
9663 * server.c (handle_query, main): Likewise.
9664 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9665 (decode_M_packet): Likewise.
9666 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9667 * target.h (struct target_ops): Update read_memory, write_memory,
9668 and read_auxv.
9669 (read_inferior_memory, write_inferior_memory): Update.
9670 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9671 to unsigned char *.
9672 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9673 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9674 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9675 linux-s390-low.c, linux-sh-low.c: Update for changes in
9676 read_inferior_memory and the_low_target->breakpoint.
9677
eee84df1
DJ
96782005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9679
9680 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9681 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9682 * configure.srv: Add powerpc64-*-linux*.
9683 * linux-ppc64-low.c: New file.
9684
45b134e5
OF
96852005-05-23 Orjan Friberg <orjanf@axis.com>
9686
9687 * linux-cris-low.c: New file with support for CRIS.
9688 * linux-crisv32-low.c: Ditto for CRISv32.
9689 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9690 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9691 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9692 reg-crisv32.o, and reg-crisv32.c to make rules.
9693 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9694 recognized targets.
9695
48d93c75
UW
96962005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9697
9698 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9699 of sizeof (PTRACE_XFER_TYPE).
9700 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9701
e013ee27
OF
97022005-05-12 Orjan Friberg <orjanf@axis.com>
9703
889bf7c5 9704 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9705 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9706 pointers for hardware watchpoint support.
9707 * linux-low.h (struct linux_target_ops): Ditto.
9708 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9709 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9710 to linux_target_ops.
9711 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9712 reply packet.
9713 * server.c (main): Recognize 'Z' and 'z' packets.
9714
b0ded00b
UW
97152005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9716
9717 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9718 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9719 (the_low_target): Add new members.
9720
8643e2ad
DJ
97212005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9722
9723 * proc-service.c (ps_lgetregs): Search all_processes instead of
9724 all_threads.
9725
fc620387
DJ
97262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9727
9728 * server.c (start_inferior): Change return type to int.
9729 (attach_inferior): Change sigptr to int *.
9730 (handle_v_cont, handle_v_requests): Change signal to int *.
9731 (main): Change signal to int.
9732
97332005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9734
9735 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9736 * configure.srv: Add m32r*-*-linux*.
9737 * linux-m32r-low.c: New file.
9738
e0e76420
DJ
97392005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9740
9741 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9742
a1928bad
DJ
97432005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9744
9745 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9746 Take unsigned long arguments for PIDs.
9747 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9748 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9749 (wait_for_sigstop, linux_resume_one_process)
9750 (regsets_fetch_inferior_registers, linux_send_signal)
9751 (linux_read_auxv): Likewise. Update the types of variables holding
9752 PIDs. Update format string specifiers.
9753 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9754 * remote-utils.c (prepare_resume_reply): Likewise.
9755 * server.c (cont_thread, general_thread, step_thread)
9756 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9757 unsigned long.
9758 (handle_query): Update format specifiers.
9759 (handle_v_cont, main): Use strtoul for thread IDs.
9760 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9761 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9762 (general_thread, step_thread, thread_from_wait)
9763 (old_thread_from_wait): Update.
9764 * target.h (struct thread_resume): Use unsigned long for THREAD.
9765 (struct target_ops): Use unsigned long for arguments to attach and
9766 thread_alive.
9767
dcdb98d2
DJ
97682005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * acinclude.m4: Include bfd/bfd.m4 directly.
9771 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9772 <agriffis@toolchain.org>.
9773 * aclocal.m4, configure: Regenerated.
9774
bec39cab
AC
97752005-01-07 Andrew Cagney <cagney@gnu.org>
9776
9777 * configure.ac: Rename configure.in, require autoconf 2.59.
9778 * configure: Re-generate.
9779
434c4c77
DJ
97802004-12-08 Daniel Jacobowitz <dan@debian.org>
9781
9782 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9783 LIBS when finished.
9784 * aclocal.m4: Regenerated.
9785 * configure: Regenerated.
9786
db1d3e1b
AS
97872004-11-21 Andreas Schwab <schwab@suse.de>
9788
9789 * linux-m68k-low.c (m68k_num_gregs): Define.
9790 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9791 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9792 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9793 (m68k_breakpoint_at): New. Add to the_low_target.
9794
9795 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9796 srv_linux_thread_db to yes.
9797
43360365
JB
97982004-10-20 Joel Brobecker <brobecker@gnat.com>
9799
9800 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9801 (ARCH_SET_FS): Likewise.
9802 (ARCH_GET_FS): Likewise.
9803 (ARCH_GET_GS): Likewise.
9804
fd500816
DJ
98052004-10-16 Daniel Jacobowitz <dan@debian.org>
9806
9807 * linux-i386-low.c (ps_get_thread_area): New.
9808 * linux-x86-64-low.c (ps_get_thread_area): New.
9809 * linux-low.c: Include <sys/syscall.h>.
9810 (linux_kill_one_process): Don't kill the first thread here.
9811 (linux_kill): Kill the first thread here.
9812 (kill_lwp): New function.
9813 (send_sigstop, linux_send_signal): Use it.
9814 * proc-service.c: Clean up #ifdefs.
9815 (fpregset_info): Delete.
9816 (ps_lgetregs): Update and enable implementation.
9817 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9818 implementations.
9819 * remote-utils.c (struct sym_cache, symbol_cache): New.
9820 (input_interrupt): Print a clearer message.
9821 (async_io_enabled): New variable.
9822 (enable_async_io, disable_async_io): Use it. Update comments.
9823 (look_up_one_symbol): Use the symbol cache.
9824 * thread-db.c (thread_db_look_up_symbols): New function.
9825 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9826
f6de3c42
DJ
98272004-10-16 Daniel Jacobowitz <dan@debian.org>
9828
9829 * configure.in: Test for -rdynamic.
9830 * configure: Regenerated.
9831 * Makefile (INTERNAL_LDFLAGS): New.
9832 (gdbserver, gdbreplay): Use it.
9833
2c0fc042
AC
98342004-09-02 Andrew Cagney <cagney@gnu.org>
9835
9836 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9837
075b3282
DJ
98382004-03-23 Daniel Jacobowitz <drow@mvista.com>
9839
9840 * linux-low.c (linux_wait): Clear all_processes list also.
9841
fa6a77dc
DJ
98422004-03-12 Daniel Jacobowitz <drow@mvista.com>
9843
9844 * linux-low.c: Include <errno.h>. Remove extern declaration of
9845 errno.
9846
6d782a97
DJ
98472004-03-12 Daniel Jacobowitz <drow@mvista.com>
9848
9849 * gdbreplay.c, server.h, utils.c: Update copyright years.
9850
3a7fb99b
DJ
98512004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9852
9853 * server.c (main): Print child status or termination signal from
9854 variable 'signal', not 'sig'.
9855
c3e735a6
DJ
98562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9857
9858 * linux-low.c (linux_read_memory): Change return type to
9859 int. Check for and return error from ptrace().
9860 * target.c (read_inferior_memory): Change return type to int. Pass
9861 back return status from the_target->read_memory().
9862 * target.h (struct target_ops): Adapt *read_memory() prototype.
9863 Update comment.
9864 (read_inferior_memory): Adapt prototype.
9865 * server.c (main): Return an error packet if
9866 read_inferior_memory() returns an error.
9867
a59d1c82
DJ
98682004-03-04 Daniel Jacobowitz <drow@mvista.com>
9869
9870 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9871 Unify with other clean targets.
9872
dc3f8883
DJ
98732004-02-29 Daniel Jacobowitz <drow@mvista.com>
9874
9875 * server.c (handle_v_cont): Call set_desired_inferior.
9876
89a208da
DJ
98772004-02-29 Daniel Jacobowitz <drow@mvista.com>
9878
9879 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9880
62ea82f5
DJ
98812004-02-29 Daniel Jacobowitz <drow@mvista.com>
9882
9883 * linux-low.c (linux_wait): Unblock async I/O.
9884 (linux_resume): Block and enable async I/O.
9885 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9886 * server.h (block_async_io, unblock_async_io): Add prototypes.
9887
6910d122
DJ
98882004-02-29 Daniel Jacobowitz <drow@mvista.com>
9889
9890 * remote-utils.c (remote_open): Print a status notice after
9891 opening a TCP port.
9892 * server.c (attach_inferior): Print a status notice after
9893 attaching.
9894
98952004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9896
9897 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9898
c89dc5d4
DJ
98992004-02-26 Daniel Jacobowitz <drow@mvista.com>
9900
9901 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9902 error packet.
9903 * server.c, target.h: Update copyright years.
9904
4b8dad4a
RM
99052004-02-25 Roland McGrath <roland@redhat.com>
9906
9907 * target.h (struct target_ops): New member `read_auxv'.
9908 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9909 * linux-low.c (linux_read_auxv): New function.
9910 (linux_target_ops): Initialize `read_auxv' member to that.
9911
d7446758
JB
99122004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9913
9914 Committed by Jim Blandy <jimb@redhat.com>.
9915
9916 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9917 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9918 instead of GPR_SIZE to distiguish s390 and s390x targets.
9919
5544ad89
DJ
99202004-01-31 Daniel Jacobowitz <drow@mvista.com>
9921
9922 * linux-low.c: Update copyright year.
9923 (check_removed_breakpoint): Clear pending_is_breakpoint.
9924 (linux_set_resume_request, linux_queue_one_thread)
9925 (resume_status_pending_p): New functions.
9926 (linux_continue_one_thread): Use process->resume.
9927 (linux_resume): Only resume threads if there are no pending events.
9928 * linux-low.h (struct process_info): Add resume request
9929 pointer.
9930
2a68b70e
DJ
99312004-01-30 Daniel Jacobowitz <drow@mvista.com>
9932
9933 * regcache.c (new_register_cache): Clear the allocated register
9934 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9935
64386c31
DJ
99362003-10-13 Daniel Jacobowitz <drow@mvista.com>
9937
9938 * linux-low.c (linux_resume): Take a struct thread_resume *
9939 argument.
9940 (linux_wait): Update call.
9941 (resume_ptr): New static variable.
9942 (linux_continue_one_thread): Renamed from
9943 linux_continue_one_process. Use resume_ptr.
9944 (linux_resume): Use linux_continue_one_thread.
9945 * server.c (handle_v_cont, handle_v_requests): New functions.
9946 (myresume): New function.
9947 (main): Handle 'v' case.
9948 * target.h (struct thread_resume): New type.
9949 (struct target_ops): Change argument of "resume" to struct
9950 thread_resume *.
9951 (myresume): Delete macro.
9952
c938e9b0
L
99532003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9954
9955 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9956 (uninstall): Support DESTDIR.
9957
7f313d07
BC
9958Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9959
9960 * configure.srv: Add xscale*linux copy of arm*linux entry.
9961
3b2fc2ea
DJ
99622003-07-24 Daniel Jacobowitz <drow@mvista.com>
9963
9964 * linux-arm-low.c (arm_reinsert_addr): New function.
9965 (the_low_target): Add arm_reinsert_addr.
9966
1c0a559e
MK
99672003-07-08 Mark Kettenis <kettenis@gnu.org>
9968
9969 * mem-break.c: Remove whitespace at end of file.
9970
43d5792c
DJ
99712003-06-28 Daniel Jacobowitz <drow@mvista.com>
9972
9973 * configure.in: Check whether we need to prototype strerror.
9974 * server.h: Optionally prototype strerror.
9975 * gdbreplay.c (perror_with_name): Use strerror.
9976 * linux-low.c (linux_attach_lwp): Use strerror.
9977 * utils.c (perror_with_name): Use strerror.
9978 * config.in, configure: Regenerated.
9979
c8a86edf
DJ
99802003-06-28 Daniel Jacobowitz <drow@mvista.com>
9981
9982 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9983 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9984
73d37363
DJ
99852003-06-20 Daniel Jacobowitz <drow@mvista.com>
9986
9987 * Makefile.in (SFILES): Update.
9988 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9989 low-sun3.c: Remove files.
9990
6ad8ae5c
DJ
99912003-06-17 Daniel Jacobowitz <drow@mvista.com>
9992
9993 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9994 (linux_detach_one_process, linux_detach): New functions.
9995 (linux_target_ops): Add linux_detach.
9996 * server.c (main): Handle 'D' packet.
9997 * target.h (struct target_ops): Add "detach" member.
9998 (detach_inferior): Define.
9999
1581182a
MK
100002003-06-13 Mark Kettenis <kettenis@gnu.org>
10001
10002 From Kelley Cook <kelleycook@wideopenwest.com>:
10003 * configure.srv: Accept i[34567]86 variants.
10004
e5379b03
DJ
100052003-06-05 Daniel Jacobowitz <drow@mvista.com>
10006
10007 * linux-low.c (linux_wait_for_event): Correct comment typos.
10008 (linux_resume_one_process): Call check_removed_breakpoint.
10009 (linux_send_signal): New function.
10010 (linux_target_ops): Add linux_send_signal.
10011 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10012 of kill.
10013 * target.h (struct target_ops): Add send_signal.
10014
2ff29de4
JB
100152003-05-29 Jim Blandy <jimb@redhat.com>
10016
10017 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10018 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10019 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10020 away part of the register's value.
10021
254787d4
DJ
100222003-03-26 Daniel Jacobowitz <drow@mvista.com>
10023
10024 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10025 (linux_wait_for_event, linux_init_signals): Likewise.
10026
94e10508
DJ
100272003-03-17 Daniel Jacobowitz <drow@mvista.com>
10028
10029 * configure.in: Check for stdlib.h.
10030 * configure: Regenerated.
10031 * config.in: Regenerated.
10032
4c0711e0
DJ
100332003-01-04 Andreas Schwab <schwab@suse.de>
10034
10035 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10036
ef66e766
AC
100372003-01-02 Andrew Cagney <ac131313@redhat.com>
10038
10039 * Makefile.in: Remove obsolete code.
10040
a1358604
DJ
100412002-11-20 Daniel Jacobowitz <drow@mvista.com>
10042
10043 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10044 defined(PT_FPR0_HI).
10045
23ce3b1c
DJ
100462002-11-17 Stuart Hughes <seh@zee2.com>
10047
10048 * linux-arm-low.c (arm_num_regs): Increase.
10049 (arm_regmap): Include status register.
10050
100512002-11-17 Daniel Jacobowitz <drow@mvista.com>
10052
10053 * linux-low.c (register_addr): Remove incorrect -1 check.
10054
a9fa9f7d
DJ
100552002-08-29 Daniel Jacobowitz <drow@mvista.com>
10056
10057 * linux-low.c (linux_create_inferior): Call setpgid. Return
10058 the new PID.
10059 (unstopped_p, linux_signal_pid): Remove.
10060 (linux_target_ops): Remove linux_signal_pid.
10061 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10062 global instead of target method.
10063 * target.h (struct target_ops): Remove signal_pid. Update comment
10064 for create_inferior.
10065 * server.c (signal_pid): New variable.
10066 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10067 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10068 (attach_inferior): Set signal_pid.
10069
17574093
DJ
100702002-08-23 Daniel Jacobowitz <drow@mvista.com>
10071
10072 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10073
100742002-08-20 Jim Blandy <jimb@redhat.com>
10075
10076 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10077 default for this.
10078
100792002-08-01 Andrew Cagney <cagney@redhat.com>
10080
10081 * Makefile.in: Make chill references obsolete.
10082
100832002-07-24 Kevin Buettner <kevinb@redhat.com>
10084
10085 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10086 * configure: Regenerate.
10087 * config.in: Regenerate.
10088
100892002-07-09 David O'Brien <obrien@FreeBSD.org>
10090
10091 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10092 (perror_with_name, remote_close, remote_open, expect, play): Static.
10093
100942002-07-04 Michal Ludvig <mludvig@suse.cz>
10095
4b8dad4a 10096 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10097 byte offsets instead of an array of indexes.
10098 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10099
101002002-06-13 Daniel Jacobowitz <drow@mvista.com>
10101
10102 * regcache.c: Add comment.
10103
101042002-06-11 Daniel Jacobowitz <drow@mvista.com>
10105
10106 * thread-db.c: New file.
10107 * proc-service.c: New file.
10108 * acinclude.m4: New file.
10109 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10110 proc-service.o, and thread-db.o.
10111 (linux-low.o): Add USE_THREAD_DB.
10112 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10113 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10114 * aclocal.m4: Regenerated.
10115 * config.in: Regenerated.
10116 * configure: Regenerated.
10117 * configure.in: Check for proc_service.h, sys/procfs.h,
10118 thread_db.h, and linux/elf.h headrs.
10119 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10120 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10121 Check for -lthread_db and thread support.
10122 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10123 PowerPC, and SuperH.
10124 * i387-fp.c: Constify arguments.
10125 * i387-fp.h: Likewise.
10126 * inferiors.c: (struct thread_info): Renamed from
10127 `struct inferior_info'. Remove PID member. Use generic inferior
10128 list header. All uses updated.
10129 (inferiors, signal_pid): Removed.
10130 (all_threads): New variable.
10131 (get_thread): Define.
10132 (add_inferior_to_list): New function.
10133 (for_each_inferior): New function.
10134 (change_inferior_id): New function.
10135 (add_inferior): Removed.
10136 (remove_inferior): New function.
10137 (add_thread): New function.
10138 (free_one_thread): New function.
10139 (remove_thread): New function.
10140 (clear_inferiors): Use for_each_inferior and free_one_thread.
10141 (find_inferior): New function.
10142 (find_inferior_id): New function.
10143 (inferior_target_data): Update argument type.
10144 (set_inferior_target_data): Likewise.
10145 (inferior_regcache_data): Likewise.
10146 (set_inferior_regcache_data): Likewise.
10147 * linux-low.c (linux_bp_reinsert): Remove.
10148 (all_processes, stopping_threads, using_thrads)
10149 (struct pending_signals, debug_threads, pid_of): New.
10150 (inferior_pid): Replace with macro.
10151 (struct inferior_linux_data): Remove.
10152 (get_stop_pc, add_process): New functions.
10153 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10154 Use add_process and add_thread.
10155 (linux_attach_lwp): New function, based on old linux_attach. Use
10156 add_process and add_thread. Set stop_expected for new threads.
10157 (linux_attach): New function.
10158 (linux_kill_one_process): New function.
10159 (linux_kill): Kill all LWPs.
10160 (linux_thread_alive): Use find_inferior_id.
10161 (check_removed_breakpoints, status_pending_p): New functions.
10162 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10163 Update. Use WNOHANG. Wait for cloned processes also. Update process
10164 struct for the found process.
10165 (linux_wait_for_event): New function.
10166 (linux_wait): Use it. Support LWPs.
10167 (send_sigstop, wait_for_sigstop, stop_all_processes)
10168 (linux_resume_one_process, linux_continue_one_process): New functions.
10169 (linux_resume): Support LWPs.
10170 (REGISTER_RAW_SIZE): Remove.
10171 (fetch_register): Use register_size instead. Call supply_register.
10172 (usr_store_inferior_registers): Likewise. Call collect_register.
10173 Fix recursive case.
10174 (regsets_fetch_inferior_registers): Improve error message.
10175 (regsets_store_inferior_registers): Add debugging.
10176 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10177 (unstopped_p, linux_signal_pid): New functions.
10178 (linux_target_ops): Add linux_signal_pid.
10179 (linux_init_signals): New function.
10180 (initialize_low): Call it. Initialize using_threads.
10181 * regcache.c (inferior_regcache_data): Add valid
10182 flag.
10183 (get_regcache): Fetch registers lazily. Add fetch argument
10184 and update all callers.
10185 (regcache_invalidate_one, regcache_invalidate): New
10186 functions.
10187 (new_register_cache): Renamed from create_register_cache.
10188 Return the new regcache.
10189 (free_register_cache): Change argument to a void *.
10190 (registers_to_string, registers_from_string): Call get_regcache
10191 with fetch flag set.
10192 (register_data): Make static. Pass fetch flag to get_regcache.
10193 (supply_register): Call get_regcache with fetch flag clear.
10194 (collect_register): Call get_regcache with fetch flag set.
10195 (collect_register_as_string): New function.
10196 * regcache.h: Update.
10197 * remote-utils.c (putpkt): Flush after debug output and use
10198 stderr.
10199 Handle input interrupts while waiting for an ACK.
10200 (input_interrupt): Use signal_pid method.
10201 (getpkt): Flush after debug output and use stderr.
10202 (outreg): Use collect_register_as_string.
10203 (new_thread_notify, dead_thread_notify): New functions.
10204 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10205 and general_thread.
10206 (look_up_one_symbol): Flush after debug output.
10207 * server.c (step_thread, server_waiting): New variables.
10208 (start_inferior): Don't use signal_pid. Update call to mywait.
10209 (attach_inferior): Update call to mywait.
10210 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10211 (main): Don't fetch/store registers explicitly. Use
10212 set_desired_inferior. Support proposed ``Hs'' packet. Update
10213 calls to mywait.
10214 * server.h: Update.
10215 (struct inferior_list, struct_inferior_list_entry): New.
10216 * target.c (set_desired_inferior): New.
10217 (write_inferior_memory): Constify.
10218 (mywait): New function.
10219 * target.h: Update.
10220 (struct target_ops): New signal_pid method.
10221 (mywait): Removed macro, added prototype.
10222
10223 * linux-low.h (regset_func): Removed.
10224 (regset_fill_func, regset_store_func): New.
10225 (enum regset_type): New.
10226 (struct regset_info): Add type field. Use new operation types.
10227 (struct linux_target_ops): stop_pc renamed to get_pc.
10228 Add decr_pc_after_break and breakpoint_at.
10229 (get_process, get_thread_proess, get_process_thread)
10230 (strut process_info, all_processes, linux_attach_lwp)
10231 (thread_db_init): New.
10232
10233 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10234 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10235 (the_low_target): Add new members.
10236 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10237 (i386_store_fpxregset): Constify.
10238 (target_regsets): Add new kind identifier.
10239 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10240 (i386_set_pc): Add debugging.
10241 (i386_breakpoint_at): New function.
10242 (the_low_target): Add new members.
10243 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10244 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10245 (mips_breakpoint_at): New.
10246 (the_low_target): Add new members.
10247 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10248 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10249 (the_low_target): Add new members.
10250 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10251 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10252 (the_low_target): Add new members.
10253 * linux-x86-64-low.c (target_regsets): Add new kind
10254 identifier.
10255
102562002-05-15 Daniel Jacobowitz <drow@mvista.com>
10257
10258 From Martin Pool <mbp@samba.org>:
10259 * server.c (gdbserver_usage): New function.
10260 (main): Call it.
10261
102622002-05-14 Daniel Jacobowitz <drow@mvista.com>
10263
10264 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10265 stop_at -> stop_pc.
10266
102672002-05-04 Andrew Cagney <ac131313@redhat.com>
10268
10269 * Makefile.in: Remove obsolete code.
10270
102712002-04-24 Michal Ludvig <mludvig@suse.cz>
10272
10273 * linux-low.c (regsets_fetch_inferior_registers),
10274 (regsets_store_inferior_registers): Removed cast to int from
10275 ptrace() calls.
10276 * regcache.h: Added declaration of struct inferior_info.
10277
102782002-04-20 Daniel Jacobowitz <drow@mvista.com>
10279
10280 * inferiors.c (struct inferior_info): Add regcache_data.
10281 (add_inferior): Call create_register_cache.
10282 (clear_inferiors): Call free_register_cache.
10283 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10284 * regcache.c (struct inferior_regcache_data): New.
10285 (registers): Remove.
10286 (get_regcache): New function.
10287 (create_register_cache, free_register_cache): New functions.
10288 (set_register_cache): Don't initialize the register cache here.
10289 (registers_to_string, registers_from_string, register_data): Call
10290 get_regcache.
10291 * regcache.h: Add prototypes.
10292 * server.h: Likewise.
10293
102942002-04-20 Daniel Jacobowitz <drow@mvista.com>
10295
10296 * mem-break.c: New file.
10297 * mem-break.h: New file.
10298 * Makefile.in: Add mem-break.o rule; update server.h
10299 dependencies.
10300 * inferiors.c (struct inferior_info): Add target_data
10301 member.
10302 (clear_inferiors): Free target_data member if set.
10303 (inferior_target_data, set_inferior_target_data): New functions.
10304 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10305 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10306 * linux-low.c (linux_bp_reinsert): New variable.
10307 (struct inferior_linux_data): New.
10308 (linux_create_inferior): Use set_inferior_target_data.
10309 (linux_attach): Likewise. Call add_inferior.
10310 (linux_wait_for_one_inferior): New function.
10311 (linux_wait): Call it.
10312 (linux_write_memory): Add const.
10313 (initialize_low): Call set_breakpoint_data.
10314 * linux-low.h (struct linux_target_ops): Add breakpoint
10315 handling members.
10316 * server.c (attach_inferior): Remove extra add_inferior
10317 call.
10318 * server.h: Include mem-break.h. Update inferior.c
10319 prototypes.
10320 * target.c (read_inferior_memory)
10321 (write_inferior_memory): New functions.
10322 * target.h (read_inferior_memory)
10323 (write_inferior_memory): Change macros to prototypes.
10324 (struct target_ops): Update comments. Add const to write_memory
10325 definition.
10326
103272002-04-11 Daniel Jacobowitz <drow@mvista.com>
10328
10329 * linux-low.c (usr_store_inferior_registers): Support
10330 registers which are allowed to fail to store.
10331 * linux-low.h (linux_target_ops): Likewise.
10332 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10333 (ppc_cannot_store_register): FPSCR may not be storable.
10334
103352002-04-09 Daniel Jacobowitz <drow@mvista.com>
10336
10337 * server.h: Include <string.h> if HAVE_STRING_H.
10338 * ChangeLog: Correct paths in last ChangeLog entry.
10339
103402002-04-09 Daniel Jacobowitz <drow@mvista.com>
10341
10342 * linux-low.h: Remove obsolete prototypes.
10343 (struct linux_target_ops): New.
10344 (extern the_low_target): New.
10345 * linux-low.c (num_regs, regmap): Remove declarations.
10346 (register_addr): Use the_low_target explicitly.
10347 (fetch_register): Likewise.
10348 (usr_fetch_inferior_registers): Likewise.
10349 (usr_store_inferior_registers): Likewise.
10350 * linux-arm-low.c (num_regs): Remove.
10351 (arm_num_regs): Define.
10352 (arm_regmap): Renamed from regmap, made static.
10353 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10354 made static.
10355 (arm_cannot_store_register): Renamed from cannot_store_register,
10356 made static.
10357 (the_low_target): New.
10358 * linux-i386-low.c (num_regs): Remove.
10359 (i386_num_regs): Define.
10360 (i386_regmap): Renamed from regmap, made static.
10361 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10362 made static.
10363 (i386_cannot_store_register): Renamed from cannot_store_register,
10364 made static.
10365 (the_low_target): New.
10366 * linux-ia64-low.c (num_regs): Remove.
10367 (ia64_num_regs): Define.
10368 (ia64_regmap): Renamed from regmap, made static.
10369 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10370 made static.
10371 (ia64_cannot_store_register): Renamed from cannot_store_register,
10372 made static.
10373 (the_low_target): New.
10374 * linux-m68k-low.c (num_regs): Remove.
10375 (m68k_num_regs): Define.
10376 (m68k_regmap): Renamed from regmap, made static.
10377 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10378 made static.
10379 (m68k_cannot_store_register): Renamed from cannot_store_register,
10380 made static.
10381 (the_low_target): New.
10382 * linux-mips-low.c (num_regs): Remove.
10383 (mips_num_regs): Define.
10384 (mips_regmap): Renamed from regmap, made static.
10385 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10386 made static.
10387 (mips_cannot_store_register): Renamed from cannot_store_register,
10388 made static.
10389 (the_low_target): New.
10390 * linux-ppc-low.c (num_regs): Remove.
10391 (ppc_num_regs): Define.
10392 (ppc_regmap): Renamed from regmap, made static.
10393 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10394 made static.
10395 (ppc_cannot_store_register): Renamed from cannot_store_register,
10396 made static.
10397 (the_low_target): New.
10398 * linux-s390-low.c (num_regs): Remove.
10399 (s390_num_regs): Define.
10400 (s390_regmap): Renamed from regmap, made static.
10401 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10402 made static.
10403 (s390_cannot_store_register): Renamed from cannot_store_register,
10404 made static.
10405 (the_low_target): New.
10406 * linux-sh-low.c (num_regs): Remove.
10407 (sh_num_regs): Define.
10408 (sh_regmap): Renamed from regmap, made static.
10409 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10410 made static.
10411 (sh_cannot_store_register): Renamed from cannot_store_register,
10412 made static.
10413 (the_low_target): New.
10414 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10415 (the_low_target): New.
10416
104172002-04-09 Daniel Jacobowitz <drow@mvista.com>
10418
10419 * Makefile.in: Add stamp-h target.
10420 * configure.in: Create stamp-h.
10421 * configure: Regenerated.
10422
104232002-04-09 Daniel Jacobowitz <drow@mvista.com>
10424
10425 * inferiors.c: New file.
10426 * target.c: New file.
10427 * target.h: New file.
10428 * Makefile.in: Add target.o and inferiors.o. Update
10429 dependencies.
10430 * linux-low.c (inferior_pid): New static variable,
10431 moved from server.c.
10432 (linux_create_inferior): Renamed from create_inferior.
10433 Call add_inferior. Return 0 on success instead of a PID.
10434 (linux_attach): Renamed from myattach.
10435 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10436 (linux_thread_alive): Renamed from mythread_alive.
10437 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10438 child dies.
10439 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10440 (regsets_store_inferior_registers): Correct error message.
10441 Add missing ``return 0''.
10442 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10443 (linux_store_registers): Renamed from store_inferior_registers.
10444 (linux_read_memory): Renamed from read_inferior_memory.
10445 (linux_write_memory): Renamed from write_inferior_memory.
10446 (linux_target_ops): New structure.
10447 (initialize_low): Call set_target_ops ().
10448 * remote-utils.c (unhexify): New function.
10449 (hexify): New function.
10450 (input_interrupt): Send signals to ``signal_pid''.
10451 * server.c (inferior_pid): Remove.
10452 (start_inferior): Update create_inferior call.
10453 (attach_inferior): Call add_inferior.
10454 (handle_query): New function.
10455 (main): Call handle_query for `q' packets.
10456 * server.h: Include "target.h". Remove obsolete prototypes.
10457 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10458
104592002-04-09 Daniel Jacobowitz <drow@mvista.com>
10460
10461 * Makefile.in: Add WARN_CFLAGS. Update configury
10462 dependencies.
10463 * configure.in: Check for <string.h>
10464 * configure: Regenerate.
10465 * config.in: Regenerate.
10466 * gdbreplay.c: Include needed system headers.
10467 (remote_open): Remove strchr prototype.
10468 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10469 * regcache.c (supply_register): Change buf argument to const void *.
10470 (supply_register_by_name): Likewise.
10471 (collect_register): Change buf argument to void *.
10472 (collect_register_by_name): Likewise.
10473 * regcache.h: Add missing prototypes.
10474 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10475 * server.c (handle_query): New function.
10476 (attached): New static variable, moved out of main.
10477 (main): Quiet longjmp clobber warnings.
10478 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10479 * utils.c (error): Remove NORETURN.
10480 (fatal): Likewise.
This page took 1.705647 seconds and 4 git commands to generate.