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