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