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