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