1 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4 linux_ptrace_attach_warnings.
6 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8 * Makefile.in (linux-ptrace.o): New.
9 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
17 2012-03-08 Yao Qi <yao@codesourcery.com>
18 Pedro Alves <palves@redhat.com>
21 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
23 * tracepoint.c (remove_tracepoint): New.
24 (cmd_qtdp): Call remove_tracepoint when failed to install.
26 2012-03-07 Pedro Alves <palves@redhat.com>
28 * linux-low.c (get_detach_signal): New.
29 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
30 Pass on pending signals to PTRACE_DETACH. Check the result of the
32 * server.c (program_signals, program_signals_p): New.
33 (handle_general_set): Handle QProgramSignals.
34 * server.h (program_signals, program_signals_p): Declare.
36 2012-03-05 Pedro Alves <palves@redhat.com>
37 Jan Kratochvil <jan.kratochvil@redhat.com>
39 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
42 2012-03-03 Yao Qi <yao@codesourcery.com>
44 * tracepoint.c (tracepoint_look_up_symbols): Update call to
45 agent_look_up_symbols.
47 2012-03-03 Yao Qi <yao@codesourcery.com>
49 * Makefile.in (linux-low.o): Keep dependence on agent.h.
50 (linux-x86-low.o): Likewise.
51 * server.h: Remove in_process_agent_loaded.
52 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
56 2012-03-03 Yao Qi <yao@codesourcery.com>
58 * tracepoint.c (gdb_agent_capability): New global.
59 (in_process_agent_loaded_ust): Renamed to
60 `in_process_agent_supports_ust'.
62 (in_process_agent_supports_ust): Call agent_capability_check.
63 (clear_installed_tracepoints): Assert that agent supports
66 2012-03-03 Yao Qi <yao@codesourcery.com>
68 * linux-low.c (linux_supports_agent): New.
69 (linux_target_ops): Initialize field `supports_agent' with
71 * target.h (struct target_ops) <supports_agent>: New.
72 (target_supports_agent): New macro.
73 * server.c (handle_general_set): Handle packet 'QAgent'.
74 (handle_query): Send `QAgent+'.
75 * Makefile.in (server.o): Depends on agent.h.
77 2012-03-03 Yao Qi <yao@codesourcery.com>
79 * Makefile.in (OBS): Add agent.o.
80 Add new rule for agent.o.
81 Track dependence of tracepoint.c on agent.h.
82 * tracepoint.c (run_inferior_command_1):
83 (run_inferior_command): Call agent_run_command.
84 (gdb_ust_connect_sync_socket): Deleted. Move it to
86 (resume_thread, stop_thread): Likewise.
87 (gdb_ust_socket_init): Renamed to ...
88 (gdb_agent_socket_init): ... New.
89 (gdb_ust_thread): Renamed to ...
90 (gdb_agent_helper_thread): ... New.
91 (gdb_ust_init): Move some code to ...
92 (gdb_agent_init): ... here. New.
93 [HAVE_UST]: Call gdb_ust_init.
94 (initialize_tracepoint_ftlib): Call gdb_agent_init.
95 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
96 * config.in, configure: Regenerated.
98 2012-03-02 Pedro Alves <palves@redhat.com>
100 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
101 * linux-low.c (struct simple_pid_list): New.
102 (stopped_pids): New a struct simple_pid_list pointer.
103 (add_to_pid_list, pull_pid_from_list): New.
104 (handle_extended_wait): Don't assume the first signal new children
105 report is SIGSTOP. Adjust call to pull_pid_from_list.
106 (linux_wait_for_lwp): Adjust.
108 2012-03-02 Yao Qi <yao@codesourcery.com>
110 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
113 2012-03-02 Yao Qi <yao@codesourcery.com>
115 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
116 `stop_pc' and `tpoint'. Update caller.
118 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
120 * linux-low.h (linux_target_ops): Add regset_bitmap member.
121 * linux-low.c (use_linux_regsets): New macro.
122 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
123 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
124 (linux_register_in_regsets): New function.
125 (usr_fetch_inferior_registers): Skip registers covered by
127 (usr_store_inferior_registers): Likewise.
128 (usr_fetch_inferior_registers): New macro.
129 (usr_store_inferior_registers): Likewise.
130 (linux_fetch_registers): Handle mixed regset/non-regset targets.
131 (linux_store_registers): Likewise.
132 * linux-mips-low.c (init_registers_mips_dsp_linux): New
134 (init_registers_mips64_dsp_linux): Likewise.
135 (init_registers_mips_linux): New macro.
136 (init_registers_mips_dsp_linux): Likewise.
137 (mips_dsp_num_regs): Likewise.
138 (DSP_BASE, DSP_CONTROL): New fallback macros.
139 (mips_base_regs): New macro.
140 (mips_regmap): Use it. Fix the size.
141 (mips_dsp_regmap): New variable.
142 (mips_dsp_regset_bitmap): Likewise.
143 (mips_arch_setup): New function.
144 (mips_cannot_fetch_register): Use the_low_target.regmap rather
146 (mips_cannot_store_register): Likewise.
147 (the_low_target): Update .arch_setup, .num_regs and .regmap
148 initializers. Add .regset_bitmap initializer.
149 * linux-arm-low.c (the_low_target): Add .regset_bitmap
151 * linux-bfin-low.c (the_low_target): Likewise.
152 * linux-cris-low.c (the_low_target): Likewise.
153 * linux-crisv32-low.c (the_low_target): Likewise.
154 * linux-ia64-low.c (the_low_target): Likewise.
155 * linux-m32r-low.c (the_low_target): Likewise.
156 * linux-m68k-low.c (the_low_target): Likewise.
157 * linux-ppc-low.c (the_low_target): Likewise.
158 * linux-s390-low.c (the_low_target): Likewise.
159 * linux-sh-low.c (the_low_target): Likewise.
160 * linux-sparc-low.c (the_low_target): Likewise.
161 * linux-tic6x-low.c (the_low_target): Likewise.
162 * linux-x86-low.c (the_low_target): Likewise.
163 * linux-xtensa-low.c (the_low_target): Likewise.
164 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
165 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
166 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
168 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
169 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
171 2012-02-29 Yao Qi <yao@codesourcery.com>
172 Pedro Alves <palves@redhat.com>
174 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
175 `step_over_finished' is true.
177 2012-02-27 Pedro Alves <palves@redhat.com>
179 * linux-low.c (pid_is_stopped): Delete, moved to common/.
180 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
182 2012-02-27 Pedro Alves <palves@redhat.com>
185 * linux-low.c (pid_is_stopped): New.
186 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
188 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
190 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
193 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
195 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
197 2012-02-24 Luis Machado <lgustavo@codesourcery>
199 * server.c (handle_query): Advertise support for target-side
200 breakpoint condition evaluation.
201 (process_point_options): New function.
202 (process_serial_event): When inserting a breakpoint, check for
203 a target-side condition that should be evaluated.
205 * mem-break.c: Include regcache.h and ax.h.
206 (point_cond_list_t): New data structure.
207 (breakpoint) <cond_list>: New field.
208 (find_gdb_breakpoint_at): Make non-static.
209 (delete_gdb_breakpoint_at): Clear any target-side
211 (clear_gdb_breakpoint_conditions): New function.
212 (add_condition_to_breakpoint): Likewise.
213 (add_breakpoint_condition): Likewise.
214 (gdb_condition_true_at_breakpoint): Likewise.
215 (gdb_breakpoint_here): Return result directly instead
216 of going through a local variable.
218 * mem-break.h (find_gdb_breakpoint_at): New prototype.
219 (clear_gdb_breakpoint_conditions): Likewise.
220 (add_breakpoint_condition): Likewise.
221 (gdb_condition_true_at_breakpoint): Likewise.
223 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
224 (need_step_over_p): Take target-side breakpoint condition into
227 2012-02-24 Luis Machado <lgustavo@codesourcery>
229 * server.h: Include tracepoint.h.
230 (agent_mem_read, agent_get_trace_state_variable_value,
231 agent_set_trace_state_variable_value,
232 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
233 get_set_tsv_func_addr): New prototypes.
235 * ax.h: New include file.
236 * ax.c: New source file.
238 * tracepoint.c: Include ax.h.
239 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
240 agent_expr, eval_result_type): Move to ax.h.
241 (parse_agent_expr): Rename to ...
242 (gdb_parse_agent_expr): ... this, make it non-static and move
244 (unparse_agent_expr) Rename to ...
245 (gdb_unparse_agent_expr): ... this, make it non-static and move
247 (eval_agent_expr): Rename to ...
248 (eval_tracepoint_agent_expr): ... this.
249 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
250 forward declarations.
251 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
252 (agent_get_trace_state_variable_value): New function.
253 (agent_set_trace_state_variable_value): New function.
254 (cmd_qtdp): Call gdb_parse_agent_expr (...).
255 (response_tracepoint): Call gdb_unparse_agent_expr (...).
256 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
257 (condition_true_at_tracepoint): Likewise.
258 (parse_agent_expr): Rename to ...
259 (gdb_parse_agent_expr): ... this and move to ax.c.
260 (unparse_agent_expr): Rename to ...
261 (gdb_unparse_agent_expr): ... this and move to ax.c.
262 (gdb_agent_op_name): Move to ax.c.
263 (eval_agent_expr): Rename to ...
264 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
266 (eval_tracepoint_agent_expr): New function.
267 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
269 (current_insn_ptr, emit_error, struct bytecode_address): Move to
271 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
272 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
273 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
274 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
275 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
276 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
277 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
278 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
279 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
280 (compile_bytecodes): Remove forward declaration.
281 (is_goto_target): Move to ax.c.
282 (compile_bytecodes): Move to ax.c and call
283 agent_get_trace_state_variable_value (...) and
284 agent_set_trace_state_variable_value (...).
286 * Makefile.in: Update ax.c and IPA dependencies.
288 2012-02-24 Pedro Alves <palves@redhat.com>
290 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
291 (cmd_bigqtbuffer_circular): ... this. Only handle
292 'QTBuffer:circular:'.
293 (handle_tracepoint_general_set): Adjust.
295 2012-02-16 Yao Qi <yao@codesourcery.com>
297 * inferiors.c: Move code to ...
298 * dll.c: .... here. New.
299 * server.h: Declare clear_dlls.
300 * Makefile.in (SFILES): Add dll.c.
304 2012-02-11 Yao Qi <yao@codesourcery.com>
306 * server.c: (handle_monitor_command): Add a new parameter
308 (handle_query): Update caller.
310 2012-02-09 Joel Brobecker <brobecker@adacore.com>
312 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
313 * configure, config.in: Regenerate.
314 * hostio.c: Provide an alternate implementation if HAVE_READLINK
317 2012-02-02 Pedro Alves <palves@redhat.com>
319 Try SIGKILL first, then PTRACE_KILL.
320 * linux-low.c (linux_kill_one_lwp): New.
321 (linux_kill_one_lwp): Rename to ...
322 (kill_one_lwp_callback): ... this. Use the new
325 2012-02-02 Pedro Alves <palves@redhat.com>
327 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
330 2012-01-27 Pedro Alves <palves@redhat.com>
332 * linux-low.c (linux_child_pid_to_exec_file): Delete.
333 (elf_64_file_p): Make static.
334 (linux_pid_exe_is_elf_64_file): New.
335 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
337 (linux_pid_exe_is_elf_64_file): Declare.
338 * linux-x86-low.c (x86_arch_setup): Use
339 linux_pid_exe_is_elf_64_file.
341 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
343 * linux-low.c (linux_wait_for_event_1): Rename to ...
344 (linux_wait_for_event): ... here and merge it with former
345 linux_wait_for_event - new variable wait_ptid, use it.
346 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
348 2012-01-23 Pedro Alves <palves@redhat.com>
350 * server.c (main): Avoid yet another case of infinite loop while
351 detaching/killing after a longjmp.
353 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
356 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
358 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
360 * hostio.c (handle_readlink): New function.
361 (handle_vFile): Call it to handle "vFile:readlink" packets.
363 2012-01-20 Pedro Alves <palves@redhat.com>
364 Ulrich Weigand <ulrich.weigand@linaro.org>
366 * server.c (handle_v_requests): Only support vAttach and vRun to
367 start multiple processes when in extended protocol mode.
369 2012-01-17 Pedro Alves <palves@redhat.com>
371 * tracepoint.c (initialize_tracepoint): Use mmap instead of
372 memalign plus mprotect to allocate the scratch buffer.
374 2012-01-13 Pedro Alves <palves@redhat.com>
376 * server.c (attach_inferior): Clear `cont_thread'.
378 2012-01-13 Pedro Alves <palves@redhat.com>
380 * server.c (main): Avoid infinite loop while detaching/killing
383 2012-01-09 Doug Evans <dje@google.com>
385 * server.c (start_inferior): Set last_ptid in --wrapper case.
387 2012-01-06 Yao Qi <yao@codesourcery.com>
389 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
391 [IN_PROCESS_AGENT] (debug_agent): New global variable.
393 2012-01-04 Yao Qi <yao@codesourcery.com>
395 * tracepoint.c (cmd_qtdp): Print debug message
396 for static tracepoint.
398 2012-01-04 Yao Qi <yao@codesourcery.com>
400 * tracepoint.c (trace_vdebug): Differentiate debug message
401 between gdbserver and IPA.
403 2012-01-03 Yao Qi <yao@codesourcery.com>
405 * tracepoint.c (tracepoint_was_hit): Don't collect for
408 2012-01-02 Joel Brobecker <brobecker@adacore.com>
410 * terminal.h: Reformat copyright header.
412 2012-01-02 Joel Brobecker <brobecker@adacore.com>
414 * server.c (gdbserver_version): Update copyright year.
415 * gdbreplay.c (gdbreplay_version): Likewise.
417 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
419 * linux-low.c (linux_create_inferior): Put empty if clause for write.
422 2011-12-18 Hui Zhu <teawater@gmail.com>
423 * linux-low.c (linux_create_inferior): Save return value to ret.
425 2011-12-18 Hui Zhu <teawater@gmail.com>
427 * linux-low.c (linux_create_inferior): Save return value to ret.
429 2011-12-16 Doug Evans <dje@google.com>
431 * linux-low.c (linux_create_inferior): If stdio connection,
432 redirect stdin from /dev/null, stdout to stderr.
433 * remote-utils.c (remote_is_stdio): New static global.
434 (remote_connection_is_stdio): New function.
435 (remote_prepare): Handle stdio connection.
436 (remote_open): Ditto.
437 (remote_close): Don't close stdin for stdio connections.
438 (read_prim,write_prim): New functions. Replace all calls to
440 * server.c (main): Watch for "-" argument. Move call to
441 remote_prepare before start_inferior.
442 * server.h (STDIO_CONNECTION_NAME): New macro.
443 (remote_connection_is_stdio): Declare.
445 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
448 2011-12-15 Yao Qi <yao@codesourcery.com>
450 * tracepoint.c: Include sys/syscall.h.
451 (gdb_ust_thread): Remove preprocessor conditional.
453 2011-12-14 Pedro Alves <pedro@codesourcery.com>
455 * linux-low.c (linux_detach_one_lwp): Call
456 the_low_target.prepare_to_resume before detaching.
458 2011-12-14 Yao Qi <yao@codesourcery.com>
460 * tracepoint.c (gdb_ust_thread): Don't ignore return value
463 2011-12-14 Yao Qi <yao@codesourcery.com>
465 * i386-low.c (i386_low_stopped_data_address): Initialize local
468 2011-12-13 Pedro Alves <pedro@codesourcery.com>
472 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
473 DR_CONTROL unless necessary. Extend comments.
474 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
475 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
477 2011-12-13 Yao Qi <yao@codesourcery.com>
479 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
481 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
483 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
485 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
486 Print new debug message for such case.
488 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
490 Fix overlapping memcpy.
491 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
492 the read_inferior_memory transfer.
493 (delete_fast_tracepoint_jump): New variable buf. Use it for the
494 write_inferior_memory transfer.
495 (set_fast_tracepoint_jump): New variable buf. Use it for the
496 read_inferior_memory and write_inferior_memory transfers.
497 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
498 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
499 Use it for the write_inferior_memory transfer.
500 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
503 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
505 * linux-low.c (fetch_register, store_register): Make code
506 consistent, fix formatting.
508 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
510 * linux-low.c (usr_store_inferior_registers): Factor out code
511 to handle individual registers into...
512 (store_register): ... this new function.
514 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
516 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
517 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
518 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
519 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
520 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
521 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
522 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
523 (srv_xmlfiles): Add new XML files.
525 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
527 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
528 (init_registers_s390_linux32v1): Add prototype.
529 (init_registers_s390_linux32v2): Likewise.
530 (init_registers_s390_linux64v1): Likewise.
531 (init_registers_s390_linux64v2): Likewise.
532 (init_registers_s390x_linux64v1): Likewise.
533 (init_registers_s390x_linux64v2): Likewise.
534 (s390_num_regs): Increment to 52.
535 (s390_regmap): Add orig_r2 register.
536 (s390_num_regs_3264): Increment to 68.
537 (s390_regmap_3264): Add orig_r2 register.
538 (s390_collect_ptrace_register): Handle orig_r2 register.
539 (s390_supply_ptrace_register): Likewise.
540 (s390_fill_last_break): New function.
541 (s390_store_last_break): Likewise.
542 (s390_fill_system_call): New function.
543 (s390_store_system_call): Likewise.
544 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
546 (s390_check_regset): New function.
547 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
548 NT_S390_SYSTEM_CALL regsets and use appropriate description.
549 Update target_regsets for available register sets.
551 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
552 Jan Kratochvil <jan.kratochvil@redhat.com>
554 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
555 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
557 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
558 * linux-low.h (struct process_info_private): New member r_debug.
559 * server.c (handle_qxfer_libraries): Call
560 the_target->qxfer_libraries_svr4.
561 (handle_qxfer_libraries_svr4): New function.
562 (qxfer_packets): New entry "libraries-svr4".
563 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
564 * target.h (struct target_ops): New member qxfer_libraries_svr4.
565 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
566 PACKET_qXfer_libraries_svr4.
568 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
570 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
571 PSW address/mask between 8-byte and 16-byte formats.
572 (s390_supply_ptrace_register): Likewise.
573 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
574 basic addressing mode bit.
576 2011-11-24 Stan Shebs <stan@codesourcery.com>
578 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
580 2011-11-17 Stan Shebs <stan@codesourcery.com>
582 * tracepoint.c (struct tracepoint): New field traceframe_usage.
583 (tracing_start_time): New global.
584 (tracing_stop_time): New global.
585 (tracing_user_name): New global.
586 (tracing_notes): New global.
587 (tracing_stop_note): New global.
588 (cmd_qtstart): Set traceframe_usage, start_time.
589 (stop_tracing): Set stop_time.
590 (cmd_qtstatus): Report additional status.
591 (cmd_qtp): New function.
592 (handle_tracepoint_query): Call it.
593 (cmd_qtnotes): New function.
594 (handle_tracepoint_general_set): Call it.
595 (get_timestamp): Rename from tsv_get_timestamp.
597 2011-11-14 Stan Shebs <stan@codesourcery.com>
598 Kwok Cheung Yeung <kcy@codesourcery.com>
600 * linux-x86-low.c (small_jump_insn): New.
601 (i386_install_fast_tracepoint_jump_pad): Add arguments for
602 trampoline and error message, build a trampoline and issue a small
603 jump instruction to it.
604 (x86_install_fast_tracepoint_jump_pad): Add arguments for
605 trampoline and error message.
606 (x86_get_min_fast_tracepoint_insn_len): New.
607 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
608 * linux-low.h (struct linux_target_ops): Add arguments to
609 install_fast_tracepoint_jump_pad operation, add new operation.
610 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
612 (linux_get_min_fast_tracepoint_insn_len): New function.
613 (linux_target_op): Add new operation.
614 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
615 (gdb_trampoline_buffer_end): Ditto.
616 (gdb_trampoline_buffer_error): Ditto.
617 (struct ipa_sym_addresses): Add fields for new IPA variables.
618 (symbol_list): Add entries for new IPA variables.
619 (struct tracepoint): Add fields to hold the address range of the
620 trampoline used by the tracepoint.
621 (trampoline_buffer_head): New static variable.
622 (trampoline_buffer_tail): Ditto.
623 (claim_trampoline_space): New function.
624 (have_fast_tracepoint_trampoline_buffer): New function.
625 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
627 (install_fast_tracepoint): Ditto, also add error buffer argument.
628 (cmd_qtminftpilen): New function.
629 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
630 (fast_tracepoint_from_trampoline_address): New function.
631 (fast_tracepoint_collecting): Handle trampoline as part of jump
633 (set_trampoline_buffer_space): New function.
634 (initialize_tracepoint): Initialize new IPA variables.
635 * target.h (struct target_ops): Add arguments to
636 install_fast_tracepoint_jump_pad operation, add new
637 get_min_fast_tracepoint_insn_len operation.
638 (target_get_min_fast_tracepoint_insn_len): New.
639 (install_fast_tracepoint_jump_pad): Add arguments.
640 * server.h (IPA_BUFSIZ): Define.
641 * linux-i386-ipa.c: Include extra header files.
642 (initialize_fast_tracepoint_trampoline_buffer): New function.
643 (initialize_low_tracepoint): Call it.
644 * server.h (set_trampoline_buffer_space): Declare.
645 (claim_trampoline_space): Ditto.
646 (have_fast_tracepoint_trampoline_buffer): Ditto.
648 2011-11-14 Yao Qi <yao@codesourcery.com>
650 * server.c (handle_query): Handle InstallInTrace for qSupported.
651 * tracepoint.c (add_tracepoint): Sort list.
652 (install_tracepoint, download_tracepoint): New.
653 (cmd_qtdp): Call them to install and download tracepoints.
654 (sort_tracepoints): Removed.
655 (cmd_qtstart): Update.
657 2011-11-14 Yao Qi <yao@codesourcery.com>
659 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
660 * mem-break.h: Declare.
661 * tracepoint.c (cmd_qtstart): Move some code to ...
662 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
664 (download_tracepoints): Move some code to ...
665 (download_tracepoint_1): ... here. New.
667 2011-11-08 Yao Qi <yao@codesourcery.com>
669 * remote-utils.c (relocate_instruction): A comment fix.
671 2011-11-07 Joel Brobecker <brobecker@adacore.com>
673 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
674 (i386_dr_low_get_control, i386_dr_low_get_status): Use
675 dr_status_mirror and dr_control_mirror from debug_reg_state.
676 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
677 (i386_initial_stuff): Remove use of deleted globals.
678 (i386_get_thread_context, i386_set_thread_context,
679 i386_thread_added): Use dr_status_mirror and dr_control_mirror
680 from debug_reg_state.
682 2011-11-05 Yao Qi <yao@codesourcery.com>
684 * tracepoint.c (gdb_collect): Loop over tracepoints of same
687 2011-11-02 Stan Shebs <stan@codesourcery.com>
689 * tracepoint.c (agent_mem_read_string): New function.
690 (eval_agent_expr): Call it for tracenz.
691 * server.c (handle_query): Report support for tracenz.
693 2011-11-02 Yao Qi <yao@codesourcery.com>
695 * tracepoint.c (cmd_qtstart): Remove unused local variables.
697 2011-11-02 Yao Qi <yao@codesourcery.com>
699 * target.h: Fix a typo in comment.
701 2011-10-31 Pedro Alves <pedro@codesourcery.com>
703 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
704 clobber the breakpoints' shadows with fast tracepoint jumps.
705 * mem-break.h (check_mem_write): Add `myaddr' parameter.
706 * target.c (write_inferior_memory): Also pass MYADDR down to
709 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
711 * configure.ac: Check support for personality routine.
712 * configure: Regenerate.
713 * config.in: Likewise.
714 * linux-low.c: Include <sys/personality.h>.
715 Define ADDR_NO_RANDOMIZE if necessary.
716 (linux_create_inferior): Disable address space randomization when
717 forking inferior, if requested.
718 (linux_supports_disable_randomization): New function.
719 (linux_target_ops): Install it.
720 * server.h (disable_randomization): Declare.
721 * server.c (disable_randomization): New global variable.
722 (handle_general_set): Handle QDisableRandomization.
723 (handle_query): Likewise for qSupported.
724 (main): Support --disable-randomization and --no-disable-randomization
725 command line arguments.
726 * target.h (struct target_ops): Add supports_disable_randomization.
727 (target_supports_disable_randomization): New macro.
729 2011-09-29 Mike Frysinger <vapier@gentoo.org>
731 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
733 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
734 [!PT_GETDSBT] (target_loadmap): New definition.
735 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
736 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
737 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
738 and PT_GETDSBT to LINUX_LOADMAP.
739 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
740 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
742 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
744 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
745 (arm_linux_hwbp_cap): New static variable.
746 (arm_linux_get_hwbp_cap): Replace by ...
747 (arm_linux_init_hwbp_cap): ... this new function.
748 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
749 (arm_linux_get_hw_watchpoint_count): Likewise.
750 (arm_linux_get_hw_watchpoint_max_length): Likewise.
751 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
752 (arm_prepare_to_resume): Use perror_with_name instead of error.
754 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
756 * linux-arm-low.c: Include <signal.h>.
757 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
758 (struct arm_linux_hwbp_cap): New data type.
759 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
760 (struct arm_linux_hw_breakpoint): New data type.
761 (MAX_BPTS, MAX_WPTS): Define.
762 (struct arch_process_info, struct arch_lwp_info): New data types.
763 (arm_linux_get_hwbp_cap): New function.
764 (arm_linux_get_hw_breakpoint_count): Likewise.
765 (arm_linux_get_hw_watchpoint_count): Likewise.
766 (arm_linux_get_hw_watchpoint_max_length): Likewise.
767 (arm_hwbp_control_initialize): Likewise.
768 (arm_hwbp_control_is_enabled): Likewise.
769 (arm_hwbp_control_is_initialized): Likewise.
770 (arm_hwbp_control_disable): Likewise.
771 (arm_linux_hw_breakpoint_equal): Likewise.
772 (arm_linux_hw_point_initialize): Likewise.
773 (struct update_registers_data): New data structure.
774 (update_registers_callback: New function.
775 (arm_insert_point): Likewise.
776 (arm_remove_point): Likewise.
777 (arm_stopped_by_watchpoint): Likewise.
778 (arm_stopped_data_address): Likewise.
779 (arm_new_process): Likewise.
780 (arm_new_thread): Likewise.
781 (arm_prepare_to_resume): Likewise.
782 (the_low_target): Register arm_insert_point, arm_remove_point,
783 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
784 arm_new_thread, and arm_prepare_to_resume.
786 2011-09-15 Stan Shebs <stan@codesourcery.com>
788 * server.h (struct emit_ops): Add compare-goto fields.
789 * tracepoint.c (gdb_agent_op_sizes): New table.
790 (emit_eq_goto): New function.
791 (emit_ne_goto): New function.
792 (emit_lt_goto): New function.
793 (emit_le_goto): New function.
794 (emit_gt_goto): New function.
795 (emit_ge_goto): New function.
796 (is_goto_target): New function.
797 (compile_bytecodes): Recognize special cases of compare-goto
798 combinations and call specialized emitters for them.
799 * linux-x86-low.c (amd64_emit_eq_goto): New function.
800 (amd64_emit_ne_goto): New function.
801 (amd64_emit_lt_goto): New function.
802 (amd64_emit_le_goto): New function.
803 (amd64_emit_gt_goto): New function.
804 (amd64_emit_ge_goto): New function.
805 (amd64_emit_ops): Add the new functions.
806 (i386_emit_eq_goto): New function.
807 (i386_emit_ne_goto): New function.
808 (i386_emit_lt_goto): New function.
809 (i386_emit_le_goto): New function.
810 (i386_emit_gt_goto): New function.
811 (i386_emit_ge_goto): New function.
812 (i386_emit_ops): Add the new functions.
814 2011-09-08 Stan Shebs <stan@codesourcery.com>
816 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
817 (i386_emit_epilogue): Restore %ebx.
819 2011-08-31 Jie Zhang <jzhang918@gmail.com>
821 * server.c (step_thread): Remove definition.
822 (process_serial_event): Don't handle Hs.
823 * server.h (step_thread): Remove declaration.
824 * target.c (set_desired_inferior): Remove use of step_thread.
826 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
828 * linux-low.c: Include linux-procfs.h.
829 (linux_attach_lwp_1): Update comments.
830 (linux_attach): Scan for existing threads when attaching to a
831 process that is the tgid.
832 * Makefile.in: Update dependencies.
834 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
836 * configure.srv: Add linux-procfs.o dependencies.
838 2011-08-14 Yao Qi <yao@codesourcery.com>
840 * target.h (struct target_ops): Fix indent.
841 * win32-low.c (win32_target_ops): Fix comment.
843 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
844 Yao Qi <yao@codesourcery.com>
846 * Makefile.in (clean): Remove tic6x-*.c files.
847 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
848 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
849 (tic6x-c64xp-linux.c): Likewise.
850 * configure.srv: Add support for tic6x-*-uclinux.
851 * linux-tic6x-low.c: New.
852 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
854 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
855 Yao Qi <yao@codesourcery.com>
857 * target.h (struct target_ops): Add read_loadmap.
858 * linux-low.c (struct target_loadseg): New type.
859 (struct target_loadmap): New type.
860 (linux_read_loadmap): New function.
861 (linux_target_ops): Add linux_read_loadmap.
862 * server.c (handle_query): Support qXfer:fdpic:read packet.
863 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
865 2011-08-05 Eli Zaretskii <eliz@gnu.org>
867 * win32-low.c: Include <stdint.h>.
869 2011-07-22 Pedro Alves <pedro@codesourcery.com>
871 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
872 to the inferior here.
873 (i386_remove_aligned_watchpoint): Ditto.
874 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
875 fit part of the watchpoint in the debug registers.
876 (i386_update_inferior_debug_regs): New.
877 (i386_low_insert_watchpoint): Work on a local mirror of the debug
878 registers, and only update the inferior on success.
879 (i386_low_remove_watchpoint): Ditto.
881 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
883 * linux-low.c (compare_ints, unique, list_threads, show_process,
884 linux_core_of_thread): Delete.
885 (linux_target_ops): Change linux_core_of_thread to
886 linux_common_core_of_thread.
887 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
888 * utils.c (malloc_failure): Change type of argument.
889 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
890 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
891 common/linux-osdata.c, common/ptid.c and common/buffer.c.
892 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
893 (IPA_OBJS): Add common-utils-ipa.o.
894 (ptid_h, linux_osdata_h): New macros.
895 (server_h): Add common/common-utils.h, common/xml-utils.h,
896 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
898 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
899 ptid.o, buffer.o): New rules.
900 (linux-low.o): Add common/linux-osdata.h as a dependency.
901 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
902 * configure.ac: Add AC_HEADER_DIRENT check.
903 * config.in: Regenerate.
904 * configure: Regenerate.
905 * remote-utils.c (xml_escape_text): Delete.
906 (buffer_grow, buffer_free, buffer_init, buffer_finish,
907 buffer_xml_printf): Move to common/buffer.c.
908 * server.c (main): Remove call to initialize_inferiors.
909 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
910 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
911 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
912 internal_error, gdb_assert, gdb_assert_fail): Delete.
913 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
914 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
916 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
917 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
918 initialize_inferiors): Delete.
920 2011-07-20 Pedro Alves <pedro@codesourcery.com>
922 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
925 2011-05-31 Pedro Alves <pedro@codesourcery.com>
927 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
929 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
931 2011-05-26 Yao Qi <yao@codesourcery.com>
933 * Makefile.in (thread-db.o): Track dependence to
934 common/gdb_thread_db.h.
935 * thread-db.c: include gdb_thread_db.h from right place.
937 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
939 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
940 __FILE__ and __LINE__ to internal_error.
942 2011-05-13 Doug Evans <dje@google.com>
944 * thread-db.c (try_thread_db_load_from_sdir): New function.
945 (try_thread_db_load_from_dir): New function.
946 (thread_db_load_search): Handle $sdir, ignore $pdir.
947 Remove trying of system directories if search of
948 libthread-db-search-path fails, that is now done via $sdir.
950 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
952 * server.c (handle_query): Add EnableDisableTracepoints to the list
953 of supported features.
954 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
956 (cmd_qtenable_disable): New.
957 (cmd_qtstart): Install tracepoints even if disabled.
958 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
959 receiving a QTEnable or QTDisable packet.
960 (gdb_collect): Skip data collection if fast tracepoint is disabled.
961 (ust_marker_to_static_tracepoint): Do not ignore disabled static
963 (gdb_probe): Skip data collection if static tracepoint is disabled.
965 2011-05-10 Doug Evans <dje@google.com>
967 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
969 2011-05-04 Doug Evans <dje@google.com>
971 * linux-low.c (linux_join): Skip process lookup.
972 * spu-low.c (spu_join): Ditto.
973 * server.c (join_inferiors_callback): Delete.
974 (process_serial_event): For 'D' packet (detach) call join_inferior
977 2011-05-04 Joseph Myers <joseph@codesourcery.com>
979 * README: Don't mention xscale*-*-linux*.
980 * configure.srv (xscale*-*-linux*): Don't handle target.
982 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
984 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
986 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
987 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
988 (i386_emit_void_call_2): Likewise.
990 2011-04-26 Yao Qi <yao@codesourcery.com>
992 * linux-low.c: Move common macros to linux-ptrace.h.
993 Include linux-ptrace.h.
994 * Makefile.in (linux_ptrace_h): New.
995 (linux-low.o): Depends on linux-ptrace.h.
997 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
999 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1000 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1001 (remote_prepare): New function with most of the TCP code from ...
1002 (remote_open): ... here. Detect PORT here unconditionally. Move also
1003 setting transport_is_reliable.
1004 * server.c (run_once): New variable.
1005 (gdbserver_usage): Document it.
1006 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1007 the first run if RUN_ONCE.
1008 * server.h (run_once, remote_prepare): New declarations.
1010 2011-04-19 Tom Tromey <tromey@redhat.com>
1012 * win32-low.c (handle_load_dll): Remove duplicate "the".
1014 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1016 Remove support for old Cygwin 1.5 versions.
1017 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1018 function to avoid warning.
1019 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1022 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1024 * gdbserver/server.h (Macro _): Define it if not available.
1026 2011-03-14 Michael Snyder <msnyder@vmware.com>
1028 * hostio.c (handle_close): Remove unnecessary null test.
1030 2011-03-10 Joel Brobecker <brobecker@adacore.com>
1032 * Makefile.in (maintainer-clean realclean distclean): Remove
1033 "make ... subdir_do" command.
1035 2011-03-10 Michael Snyder <msnyder@vmware.com>
1037 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1039 * server.c (handle_v_run): Free alloced buffer on early return.
1041 2011-03-09 Yao Qi <yao@codesourcery.com>
1044 2011-03-04 Yao Qi <yao@codesourcery.com>
1046 * Makefile.in: Remove GNU make feature --directory.
1048 2011-03-05 Yao Qi <yao@codesourcery.com>
1050 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1051 (subdir_do): New make target. Copied from gdb/Makefile.
1052 (maintainer-clean, realclean, distclean, clean): Call corresponding
1053 make targets in common/Makefile.
1055 2011-02-11 Yao Qi <yao@codesourcery.com>
1057 * configure.ac: Call AC_PROG_RANLIB.
1058 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1059 * configure: Regenerate.
1061 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1063 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1065 2011-03-06 Yao Qi <yao@codesourcery.com>
1067 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1069 2011-03-05 Yao Qi <yao@codesourcery.com>
1071 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1072 (subdir_do): New make target. Copied from gdb/Makefile.
1073 (maintainer-clean, realclean, distclean, clean): Call corresponding
1074 make targets in common/Makefile.
1076 2011-03-04 Yao Qi <yao@codesourcery.com>
1078 * Makefile.in: Remove GNU make feature --directory.
1080 2011-03-04 Michael Snyder <msnyder@vmware.com>
1082 * server.c (queue_stop_reply): Call xmalloc not malloc.
1084 2011-03-02 Michael Snyder <msnyder@vmware.com>
1086 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1088 2011-02-28 Michael Snyder <msnyder@vmware.com>
1090 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1091 (cmd_qtframe): Ditto.
1092 (cmd_qtbuffer): Ditto.
1093 (cmd_bigqtbuffer): Ditto.
1095 * utils.c (decimal2str): Initialize 'width' to nine, then
1098 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1100 * hostio.c (require_data): Free *data, not data.
1102 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1104 * hostio.c (require_data): Use free, not xfree.
1106 2011-02-27 Michael Snyder <msnyder@vmware.com>
1108 * server.c (handle_query): Discard unused value.
1110 * hostio.c (require_data): Free malloc memory before returning
1113 2011-02-26 Michael Snyder <msnyder@vmware.com>
1115 * linux-low.c (list_threads): Call closedir for dirent.
1117 2011-02-27 Michael Snyder <msnyder@vmware.com>
1119 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1120 a case statement falls through.
1122 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1124 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1127 2011-02-26 Michael Snyder <msnyder@vmware.com>
1129 * utils.c (decimal2str): Eliminate dead code and dead param.
1130 (pulongest): Drop dead param from call to decimal2str.
1133 2011-02-24 Joel Brobecker <brobecker@adacore.com>
1135 Revert the following patch (not approved yet):
1136 2011-02-21 Hui Zhu <teawater@gmail.com>
1137 * tracepoint.c (tp_printf): New function.
1138 (eval_agent_expr): Handle gdb_agent_op_printf.
1140 2011-02-21 Hui Zhu <teawater@gmail.com>
1142 * tracepoint.c (tp_printf): New function.
1143 (eval_agent_expr): Handle gdb_agent_op_printf.
1145 2011-02-18 Tom Tromey <tromey@redhat.com>
1147 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1148 (tracepoint.o): Likewise.
1149 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1150 (gdb_agent_op_names): Likewise.
1152 2011-02-18 Tom Tromey <tromey@redhat.com>
1154 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1155 gdb_agent_op_rot>: New constants.
1156 (gdb_agent_op_names): Add pick and roll.
1157 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1160 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1162 * aclocal.m4: Regenerated with aclocal-1.11.1.
1164 2011-02-14 Pedro Alves <pedro@codesourcery.com>
1166 * server.c (handle_qxfer_traceframe_info): New.
1167 (qxfer_packets): Register "traceframe-info".
1168 (handle_query): Report support for qXfer:traceframe-info:read+.
1169 * tracepoint.c (match_blocktype): New.
1170 (traceframe_find_block_type): Rename to ...
1171 (traceframe_walk_blocks): ... this. Add callback filter argument,
1173 (traceframe_find_block_type): New, reimplemented on top of
1174 traceframe_walk_blocks.
1175 (build_traceframe_info_xml): New.
1176 (traceframe_read_info): New.
1177 * server.h (traceframe_read_info): Declare.
1179 2011-02-11 Yao Qi <yao@codesourcery.com>
1181 * configure.ac: Call AC_PROG_RANLIB.
1182 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1183 * configure: Regenerate.
1185 2011-02-07 Pedro Alves <pedro@codesourcery.com>
1187 * server.c (gdb_read_memory): Change return semantics to allow
1189 (handle_search_memory_1): Adjust.
1190 (process_serial_event) <'m' packet>: Handle partial transfers.
1191 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1193 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1195 * regcache.c (init_register_cache): Initialize
1196 regcache->register_status.
1197 (free_register_cache): Release regcache->register_status.
1198 (regcache_cpy): Copy register_status.
1199 (registers_to_string): Print 'x's for unavailable registers.
1200 (supply_register): Mark the register's status valid or
1201 unavailable, depending on whether a buffer was passed in or not.
1202 (supply_register_zeroed): New.
1203 (supply_regblock): Mark the registers' status valid or
1204 unavailable, depending on whether a buffer was passed in or not.
1205 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1206 (struct regcache): New `register_status' field.
1207 (supply_register_zeroed): Declare.
1208 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1209 supply_register_zeroed, rather than passing a NULL buffer to
1211 * tracepoint.c (fetch_traceframe_registers): Update comment.
1213 2011-01-28 Pedro Alves <pedro@codesourcery.com>
1215 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1218 2011-01-25 Pedro Alves <pedro@codesourcery.com>
1220 * server.h (decode_xfer_write): Change prototype.
1221 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1222 and don't extract the annex here.
1223 * server.c (decode_xfer_read): Remove `annex' parameter,
1224 and don't extract the annex here.
1226 (struct qxfer): New.
1227 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1228 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1229 (handle_qxfer_statictrace): New functions, abstracted out from
1230 handle_query, and made to use the struct qxfer interface.
1231 (handle_threads_qxfer_proper): Rename to ...
1232 (handle_qxfer_threads_proper): ... this.
1233 (handle_threads_qxfer): Rename to ...
1234 (handle_qxfer_threads): ... this. Adjust.
1235 (qxfer_packets): New array.
1236 (handle_qxfer): New function.
1237 (handle_query): Use handle_qxfer.
1239 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1241 * gdbreplay.c: Shorten lines of >= 80 columns.
1242 * linux-low.c: Ditto.
1243 * linux-ppc-low.c: Ditto.
1244 * linux-s390-low.c: Ditto.
1245 * linux-sparc-low.c: Ditto.
1246 * linux-x86-low.c: Ditto.
1247 * linux-xtensa-low.c: Ditto.
1248 * mem-break.c: Ditto.
1250 * regcache.h: Ditto.
1251 * remote-utils.c: Ditto.
1254 * thread-db.c: Ditto.
1255 * tracepoint.c: Ditto.
1257 * win32-low.h: Ditto.
1259 2011-01-05 Joel Brobecker <brobecker@adacore.com>
1261 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1264 2011-01-01 Joel Brobecker <brobecker@adacore.com>
1266 * server.c (gdbserver_version): Update copyright year in version
1268 * gdbreplay.c (gdbreplay_version): Ditto.
1270 2010-12-29 Jie Zhang <jie.zhang@analog.com>
1272 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1273 * linux-bfin-low.c: New file.
1274 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1275 PT_DATA_ADDR for BFIN targets.
1276 * Makefile.in (SFILES): Add linux-bfin-low.c.
1277 (clean): Remove reg-bfin.c.
1278 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1279 * README: Mention supported Blackfin targets.
1281 2010-12-23 Mike Frysinger <vapier@gentoo.org>
1283 * .gitignore: New file.
1285 2010-11-16 Mike Frysinger <vapier@gentoo.org>
1287 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1289 2010-10-22 Jie Zhang <jie@codesourcery.com>
1291 * Makefile.in: Add FLAGS_TO_PASS variable.
1292 (install): Remove dependency of install-only and recursively
1293 invoke make for install-only.
1295 2010-10-04 Doug Evans <dje@google.com>
1297 * Makefile.in (uninstall): Use $(DESTDIR).
1299 2010-09-24 Pedro Alves <pedro@codesourcery.com>
1303 * linux-x86-low.c (compat_siginfo_from_siginfo)
1304 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1305 si_code is < 0. Check for si_code == SI_TIMER before checking for
1308 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1310 * lynx-i386-low.c: New file.
1311 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1313 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1315 * lynx-low.c (ptrace_request_to_str): Remove handling for
1316 request values that have been removed in LynxOS 5.x.
1318 2010-09-13 Joel Brobecker <brobecker@adacore.com>
1320 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1323 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1325 * configure.ac: Add --enable-inprocess-agent option.
1326 * configure: Rebuilt.
1328 2010-09-06 Yao Qi <yao@codesourcery.com>
1330 * linux-low.c (linux_kill): Remove unused variable.
1331 (linux_stabilize_threads): Likewise.
1332 * server.c (start_inferior): Likewise.
1333 (queue_stop_reply_callback): Likewise.
1334 * tracepoint.c (do_action_at_tracepoint): Likewise.
1336 2010-09-06 Yao Qi <yao@codesourcery.com>
1338 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1341 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1343 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1345 2010-09-06 Pedro Alves <pedro@codesourcery.com>
1347 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1350 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1352 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1353 gdbserver/lynx-ppc-low.c: New files.
1354 * Makefile.in (lynx_low_h): New variable.
1355 (lynx-low.o, lynx-ppc-low.o): New rules.
1356 * configure.ac: On LynxOS, link with -lnetinet.
1357 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1358 * configure: regenerate.
1360 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1362 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1363 * configure.ac: Add check for vasprintf and vsnprintf.
1364 * configure, config.in: Regenerate.
1365 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1367 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1369 * gdbreplay.c: Move include of alloca.h up, next to include of
1371 * server.h: Add include of malloc.h.
1372 * mem-break.c: Remove include of malloc.h.
1373 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1375 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1377 * Makefile.in (memmem.o): Build with -Wno-error.
1379 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1381 * utils.c (xsnprintf): Make non-static.
1382 * server.h: Add xsnprintf declaration.
1383 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1384 replace calls to snprintf by calls to xsnprintf throughout.
1386 2010-09-01 Joel Brobecker <brobecker@adacore.com>
1388 * configure.ac: Add configure check for alloca.
1389 * configure, config.in: Regenerate.
1390 * server.h: Include alloca.h if it exists.
1391 * gdbreplay.c: Include alloca.h if it exists.
1393 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1395 * linux-low.c (__SIGRTMIN): Define if not already defined.
1396 (linux_create_inferior): Check for __ANDROID__ rather than
1398 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1399 are already deferred.
1400 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1401 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1402 stopped and already has a pending signal to report.
1403 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1404 a pending signal to report or is moving out of a jump pad.
1405 (linux_init_signals): Check for __ANDROID__ rather than
1408 2010-08-28 Pedro Alves <pedro@codesourcery.com>
1410 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1411 debug_threads check. Avoid a linear search when not doing debug
1414 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1416 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1417 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1418 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1419 (process_event): Change local fd's type to gdb_fildes_t.
1420 (create_file_handler): Adjust prototype.
1421 (delete_file_handler): Adjust prototype.
1422 (handle_file_event): Adjust prototype. Use pfildes.
1423 (create_file_event): Adjsut prototype.
1424 * remote-utils.c (remote_desc, listen_desc): Change type to
1426 * server.h: New gdb_fildes_t typedef.
1427 [USE_WIN32API]: Include winsock2.h.
1428 (delete_file_handler, add_file_handler): Adjust prototypes.
1430 * utils.c (pfildes): New.
1432 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1434 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1435 * configure: Regenerate.
1437 2010-08-27 Pedro Alves <pedro@codesourcery.com>
1439 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1440 (linux_done_accessing_memory): ... this.
1441 (linux_target_ops): Adjust.
1442 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1443 * nto-low.c (nto_target_ops): Adjust comment.
1444 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1445 * spu-low.c (spu_target_ops): Adjust comment.
1446 * target.h (target_ops): Rename unprepare_to_access_memory field
1447 to done_accessing_memory.
1448 (unprepare_to_access_memory): Rename to ...
1449 (done_accessing_memory): ... this.
1451 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1453 * linux-low.c (linux_prepare_to_access_memory): New.
1454 (linux_unprepare_to_access_memory): New.
1455 (linux_target_ops): Install them.
1456 * server.c (read_memory): Rename to ...
1457 (gdb_read_memory): ... this. Use
1458 prepare_to_access_memory/prepare_to_access_memory.
1459 (write_memory): Rename to ...
1460 (gdb_write_memory): ... this. Use
1461 prepare_to_access_memory/prepare_to_access_memory.
1462 (handle_search_memory_1): Adjust.
1463 (process_serial_event): Adjust.
1464 * target.h (struct target_ops): New fields
1465 prepare_to_access_memory and unprepare_to_access_memory.
1466 (prepare_to_access_memory, unprepare_to_access_memory): New.
1467 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1468 prepare_to_access_memory/prepare_to_access_memory.
1469 * nto-low.c (nto_target_ops): Adjust.
1470 * spu-low.c (spu_target_ops): Adjust.
1471 * win32-low.c (win32_target_ops): Adjust.
1473 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1475 * Makefile.in (WARN_CFLAGS): Get it from configure.
1476 (WERROR_CFLAGS): New.
1477 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1478 * configure.ac: Introduce --enable-werror, which adds -Werror to
1479 the compiler command line. Enabled by default. Disable with
1480 --disable-werror. Add -Wdeclaration-after-statement
1481 Wpointer-arith and -Wformat-nonliteral to warning flags.
1482 * configure: Regenerate.
1484 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1486 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1488 2010-08-26 Pedro Alves <pedro@codesourcery.com>
1490 * gdbreplay.c (remote_error): New.
1492 (expect): Use gdbchar. Check for error reading from GDB.
1493 Clarify sync error output.
1494 (play): Check for errors writing to GDB.
1495 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1496 * remote-utils.c (getpkt): Check for errors writing to the remote
1499 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1501 * linux-low.c (linux_wait_1): Move non-debugging code out of
1502 `debug_threads' control.
1504 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1506 * linux-low.c (linux_wait_1): Don't set last_status here.
1507 * server.c (push_event, queue_stop_reply_callback): Assert we're
1508 not pushing a TARGET_WAITKIND_IGNORE event.
1509 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1510 (myresume, handle_target_event): Set the thread's last_resume_kind
1511 and last_status from the target returned status.
1513 2010-08-25 Pedro Alves <pedro@codesourcery.com>
1517 * linux-x86-low.c (update_debug_registers_callback): New.
1518 (i386_dr_low_set_addr): Use it.
1519 (i386_dr_low_get_addr): New.
1520 (i386_dr_low_set_control): Use update_debug_registers_callback.
1521 (i386_dr_low_get_control): New.
1522 (i386_dr_low_get_status): Adjust.
1523 * linux-low.c (linux_stop_lwp): New.
1524 * linux-low.h (linux_stop_lwp): Declare.
1526 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1527 argument instead of a i386_debug_reg_state.
1528 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1529 a i386_debug_reg_state.
1530 (i386_insert_aligned_watchpoint): Adjust.
1531 (i386_remove_aligned_watchpoint): Adjust.
1532 (i386_low_stopped_data_address): Read the debug registers from the
1533 inferior instead of from the mirrors.
1534 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1535 (i386_dr_low_get_addr): Declare.
1536 (i386_dr_low_get_control): Declare.
1537 (i386_dr_low_get_status): Change prototype.
1539 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1540 (i386_dr_low_get_addr): New.
1541 (i386_dr_low_get_control): New.
1542 (i386_dr_low_get_status): Adjust prototype. Return
1544 (i386_initial_stuff): Clear dr_status_mirror and
1546 (i386_get_thread_context): Adjust.
1547 (i386_set_thread_context): Adjust.
1548 (i386_thread_added): Adjust.
1550 2010-08-24 Pedro Alves <pedro@codesourcery.com>
1552 * linux-low.h (linux_thread_area): Delete declaration.
1554 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1556 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1557 after its termination.
1559 2010-08-09 Pedro Alves <pedro@codesourcery.com>
1561 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1562 (gdb_wants_all_stopped): Delete.
1563 (linux_wait_1): Don't call them.
1564 * server.c (handle_v_cont): Tag all threads as want-stopped.
1565 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1566 stopped as "client-wants-stopped".
1568 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1570 * Makefile.in (signals_h): New.
1571 (server_h): Depend on it.
1572 (server.o): Don't depend on $(signals_def).
1573 (signals.o): Depend on $(signals_def).
1575 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1577 * Makefile.in (signals_def): New.
1578 (server_h): Append include/gdb/signals.h and signals_def.
1579 (server.o): Append signals_def.
1581 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1583 * server.c (handle_target_event): Use target_signal_to_host for
1584 resume_info.sig initialization.
1585 * target.h (struct thread_resume) <sig>: New comment.
1587 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1589 * server.c (handle_query): strcpy() the returned string from paddress()
1590 instead of sprintf().
1591 * utils.c (paddress): Return phex_nz().
1593 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1595 * server.c (handle_v_cont): Call mourn_inferior if process
1597 (myresume): Likewise.
1599 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1601 Static tracepoints, and integration with UST.
1603 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1604 * mem-break.c (uninsert_all_breakpoints)
1605 (reinsert_all_breakpoints): New.
1606 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1607 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1608 (gdb_agent_ust_loaded, helper_thread_id)
1609 (gdb_agent_helper_thread_id): New macros.
1610 (struct ipa_sym_addresses): Add addr_ust_loaded,
1611 addr_helper_thread_id, addr_cmd_buf.
1612 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1613 (in_process_agent_loaded_ust): New.
1614 (write_e_ust_not_loaded): New.
1615 (maybe_write_ipa_ust_not_loaded): New.
1616 (struct collect_static_trace_data_action): New.
1617 (enum tracepoint_type) <static_tracepoint>: New.
1618 (struct tracepoint) <handle>: Mention static tracepoints.
1619 (struct static_tracepoint_ctx): New.
1620 (CMD_BUF_SIZE): New.
1621 (add_tracepoint_action): Handle static tracepoint actions.
1622 (unprobe_marker_at): New.
1623 (clear_installed_tracepoints): Handle static tracepoints.
1624 (cmd_qtdp): Handle static tracepoints.
1625 (probe_marker_at): New.
1626 (cmd_qtstart): Handle static tracepoints.
1627 (response_tracepoint): Handle static tracepoints.
1628 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1629 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1630 (get_context_regcache): Handle static tracepoints.
1631 (do_action_at_tracepoint): Handle static tracepoint actions.
1632 (traceframe_find_block_type): Handle static trace data blocks.
1633 (traceframe_read_sdata): New.
1634 (download_tracepoints): Download static tracepoint actions.
1635 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1636 (GDB_PROBE_NAME): New.
1641 (ust_marker_to_static_tracepoint): New.
1643 (collect_ust_data_at_tracepoint): New.
1644 (gdb_ust_probe): New.
1645 (UNIX_PATH_MAX, SOCK_DIR): New.
1646 (gdb_ust_connect_sync_socket): New.
1647 (resume_thread, stop_thread): New.
1648 (run_inferior_command): New.
1649 (init_named_socket): New.
1650 (gdb_ust_socket_init): New.
1651 (cstr_to_hexstr): New.
1653 (first_marker, next_marker): New.
1654 (response_ust_marker): New.
1655 (cmd_qtfstm, cmd_qtsstm): New.
1656 (unprobe_marker_at, probe_marker_at): New.
1657 (cmd_qtstmat, gdb_ust_thread): New.
1658 (gdb_ust_init): New.
1659 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1660 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1662 (x86_64_st_collect_regmap): New.
1663 (X86_64_NUM_ST_COLLECT_GREGS): New.
1664 (AMD64_RIP_REGNUM): New.
1665 (supply_static_tracepoint_registers): New.
1666 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1668 (i386_st_collect_regmap): New.
1669 (i386_NUM_ST_COLLECT_GREGS): New.
1670 (supply_static_tracepoint_registers): New.
1671 * server.c (handle_query): Handle qXfer:statictrace:read.
1672 <qSupported>: Report support for StaticTracepoints, and
1673 qXfer:statictrace:read features.
1674 * server.h (traceframe_read_sdata)
1675 (supply_static_tracepoint_registers): Declare.
1676 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1677 (unpack_varlen_hex): Include in IPA build.
1678 * Makefile.in (ustlibs, ustinc): New.
1679 (IPA_OBJS): Add remote-utils-ipa.o.
1680 ($(IPA_LIB)): Link -ldl and -lpthread.
1682 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1683 * config.in, configure: Regenerate.
1685 2010-06-20 Ian Lance Taylor <iant@google.com>
1686 Pedro Alves <pedro@codesourcery.com>
1688 * linux-x86-low.c (always_true): Delete.
1689 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1690 trying to fool the compiler with always_true.
1692 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1694 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1695 conditions in gdbserver.
1697 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1699 * spu-low.c (spu_read_memory): Wrap around local store limit.
1700 (spu_write_memory): Likewise.
1702 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1704 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1705 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1707 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1709 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1710 uses with LONGEST uses.
1712 2010-06-14 Stan Shebs <stan@codesourcery.com>
1713 Pedro Alves <pedro@codesourcery.com>
1717 * linux-x86-low.c: Include limits.h.
1722 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1723 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1724 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1725 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1726 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1727 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1728 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1729 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1730 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1731 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1732 (amd64_emit_void_call_2): New.
1733 (amd64_emit_ops): New.
1734 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1735 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1736 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1737 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1738 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1739 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1740 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1741 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1742 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1743 (i386_emit_stack_adjust, i386_emit_int_call_1)
1744 (i386_emit_void_call_2): New.
1745 (i386_emit_ops): New.
1746 (x86_emit_ops): New.
1747 (the_low_target): Install x86_emit_ops.
1748 * server.h (struct emit_ops): New.
1749 (get_raw_reg_func_addr): Declare.
1750 (current_insn_ptr, emit_error): Declare.
1751 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1752 (set_trace_state_variable_value): New defines.
1753 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1754 addr_get_trace_state_variable_value and
1755 addr_set_trace_state_variable_value.
1756 (symbol_list): New fields for get_raw_reg,
1757 get_trace_state_variable_value and set_trace_state_variable_value.
1758 (condfn): New typedef.
1759 (struct tracepoint): New field `compiled_cond'.
1760 (do_action_at_tracepoint): Clear compiled_cond.
1761 (get_trace_state_variable_value, set_trace_state_variable_value):
1763 (condition_true_at_tracepoint): If there's a compiled condition,
1765 (current_insn_ptr, emit_error): New globals.
1766 (struct bytecode_address): New.
1767 (get_raw_reg_func_addr): New.
1768 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1769 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1770 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1771 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1772 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1773 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1774 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1775 (compile_tracepoint_condition, compile_bytecodes): New.
1776 * target.h (emit_ops): Forward declare.
1777 (struct target_ops): New field emit_ops.
1778 (target_emit_ops): New.
1779 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1780 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1781 * linux-low.c (linux_emit_ops): New.
1782 (linux_target_ops): Install it.
1783 * linux-low.h (struct linux_target_ops): New field emit_ops.
1785 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1787 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1788 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1790 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1791 Stan Shebs <stan@codesourcery.com>
1793 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1794 (all): Depend on $(extra_libraries).
1795 (install-only): Install the IPA.
1796 (IPA_OBJS, IPA_LIB): New.
1797 (clean): Remove the IPA lib.
1798 (IPAGENT_CFLAGS): New.
1799 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1800 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1801 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1802 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1803 * configure.ac: Check for atomic builtins support in the compiler.
1804 (IPA_DEPFILES, extra_libraries): Define.
1805 * configure.srv (ipa_obj): Add description.
1806 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1807 (i[34567]86-*-linux*): Set ipa_obj.
1808 (x86_64-*-linux*): Set ipa_obj.
1809 * linux-low.c (stabilizing_threads): New.
1810 (supports_fast_tracepoints): New.
1811 (linux_detach): Stabilize threads before detaching.
1812 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1813 the lwp is either not stabilizing, or is moving out of a jump pad.
1814 (linux_fast_tracepoint_collecting): New.
1815 (maybe_move_out_of_jump_pad): New.
1816 (enqueue_one_deferred_signal): New.
1817 (dequeue_one_deferred_signal): New.
1818 (linux_wait_for_event_1): If moving out of a jump pad, defer
1819 pending signals to later.
1820 (linux_stabilize_threads): New.
1821 (linux_wait_1): Check if threads need moving out of jump pads, and
1823 (stuck_in_jump_pad_callback): New.
1824 (move_out_of_jump_pad_callback): New.
1826 (linux_resume_one_lwp): Handle moving out of jump pads.
1827 (linux_set_resume_request): Dequeue deferred signals.
1828 (need_step_over_p): Also step over fast tracepoint jumps.
1829 (start_step_over): Also uninsert fast tracepoint jumps.
1830 (finish_step_over): Also reinsert fast tracepoint jumps.
1831 (linux_install_fast_tracepoint_jump): New.
1832 (linux_target_ops): Install linux_stabilize_threads and
1833 linux_install_fast_tracepoint_jump_pad.
1834 * linux-low.h (linux_target_ops) <get_thread_area,
1835 install_fast_tracepoint_jump_pad>: New fields.
1836 (struct lwp_info) <collecting_fast_tracepoint,
1837 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1838 (linux_get_thread_area): Declare.
1839 * linux-x86-low.c (jump_insn): New.
1840 (x86_get_thread_area): New.
1841 (append_insns): New.
1843 (amd64_install_fast_tracepoint_jump_pad): New.
1844 (i386_install_fast_tracepoint_jump_pad): New.
1845 (x86_install_fast_tracepoint_jump_pad): New.
1846 (the_low_target): Install x86_get_thread_area and
1847 x86_install_fast_tracepoint_jump_pad.
1848 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1849 (struct fast_tracepoint_jump): New.
1850 (fast_tracepoint_jump_insn): New.
1851 (fast_tracepoint_jump_shadow): New.
1852 (find_fast_tracepoint_jump_at): New.
1853 (fast_tracepoint_jump_here): New.
1854 (delete_fast_tracepoint_jump): New.
1855 (set_fast_tracepoint_jump): New.
1856 (uninsert_fast_tracepoint_jumps_at): New.
1857 (reinsert_fast_tracepoint_jumps_at): New.
1858 (set_breakpoint_at): Use write_inferior_memory.
1859 (uninsert_raw_breakpoint): Use write_inferior_memory.
1860 (check_mem_read): Mask out fast tracepoint jumps.
1861 (check_mem_write): Mask out fast tracepoint jumps.
1862 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1863 (set_fast_tracepoint_jump): Declare.
1864 (delete_fast_tracepoint_jump)
1865 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1866 (reinsert_fast_tracepoint_jumps_at): Declare.
1867 * regcache.c: Don't compile many functions when building the
1868 in-process agent library.
1869 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1870 the register buffer in the heap.
1871 (free_register_cache): If the register buffer isn't owned by the
1872 regcache, don't free it.
1873 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1874 pre-existing register caches.
1875 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1877 (convert_ascii_to_int): : Constify `from' parameter type.
1878 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1879 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1880 the needed buffer in-place.
1881 (relocate_instruction): New.
1882 * server.c (handle_query) <qSymbols>: If the target supports
1883 tracepoints, give it a chance of looking up symbols. Report
1884 support for fast tracepoints.
1885 (handle_status): Stabilize threads.
1886 (process_serial_event): Adjust.
1887 * server.h (struct fast_tracepoint_jump): Forward declare.
1888 (struct process_info) <fast_tracepoint_jumps>: New field.
1889 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1890 (decode_X_packet, decode_M_packet): Adjust.
1891 (relocate_instruction): Declare.
1892 (in_process_agent_loaded): Declare.
1893 (tracepoint_look_up_symbols): Declare.
1894 (struct fast_tpoint_collect_status): Declare.
1895 (fast_tracepoint_collecting): Declare.
1896 (force_unlock_trace_buffer): Declare.
1897 (handle_tracepoint_bkpts): Declare.
1898 (initialize_low_tracepoint)
1899 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1900 * target.h (struct target_ops) <stabilize_threads,
1901 install_fast_tracepoint_jump_pad>: New fields.
1902 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1903 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1904 [HAVE_STDINT_H]: Include stdint.h.
1905 (trace_debug_1): Rename to ...
1906 (trace_vdebug): ... this.
1907 (trace_debug): Rename to ...
1908 (trace_debug_1): ... this. Add `level' parameter.
1910 (ATTR_USED, ATTR_NOINLINE): New.
1911 (IP_AGENT_EXPORT): New.
1912 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1913 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1914 (about_to_request_buffer_space, trace_buffer_is_full)
1915 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1916 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1917 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1918 (traceframe_write_count, traceframes_created)
1919 (trace_state_variables)
1920 New renaming defines.
1921 (struct ipa_sym_addresses): New.
1922 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1924 (ipa_sym_addrs): New.
1925 (all_tracepoint_symbols_looked_up): New.
1926 (in_process_agent_loaded): New.
1927 (write_e_ipa_not_loaded): New.
1928 (maybe_write_ipa_not_loaded): New.
1929 (tracepoint_look_up_symbols): New.
1930 (debug_threads) [IN_PROCESS_AGENT]: New.
1931 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1932 (UNKNOWN_SIDE_EFFECTS): New.
1933 (stop_tracing): New.
1934 (flush_trace_buffer): New.
1935 (stop_tracing_bkpt): New.
1936 (flush_trace_buffer_bkpt): New.
1937 (read_inferior_integer): New.
1938 (read_inferior_uinteger): New.
1939 (read_inferior_data_pointer): New.
1940 (write_inferior_data_pointer): New.
1941 (write_inferior_integer): New.
1942 (write_inferior_uinteger): New.
1943 (struct collect_static_trace_data_action): Delete.
1944 (enum tracepoint_type): New.
1945 (struct tracepoint) <type>: New field `type'.
1946 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1947 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1948 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1949 (tracepoints): Use IP_AGENT_EXPORT.
1950 (last_tracepoint): Don't include in the IPA.
1951 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1952 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1953 (alloced_trace_state_variables): New.
1954 (trace_state_variables): Use IP_AGENT_EXPORT.
1955 (traceframe_t): Delete unused variable.
1956 (circular_trace_buffer): Don't include in the IPA.
1957 (trace_buffer_start): Delete.
1958 (struct trace_buffer_control): New.
1959 (trace_buffer_free): Delete.
1960 (struct ipa_trace_buffer_control): New.
1961 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1962 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1964 (trace_buffer_ctrl): New.
1965 (TRACE_BUFFER_CTRL_CURR): New.
1966 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1967 Reimplement as macros.
1968 (trace_buffer_wrap): Delete.
1969 (traceframe_write_count, traceframe_read_count)
1970 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1971 (struct tracepoint_hit_ctx) <type>: New field.
1972 (struct fast_tracepoint_ctx): New.
1973 (memory_barrier): New.
1975 (record_tracepoint_error): Update atomically in the IPA.
1976 (clear_inferior_trace_buffer): New.
1977 (about_to_request_buffer_space): New.
1978 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1979 updating the same buffer.
1980 (add_tracepoint): Default the tracepoint's type to trap
1981 tracepoint, and orig_size to -1.
1982 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1984 (create_trace_state_variable): New parameter `gdb'. Handle it.
1985 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1986 (cmd_qtdp): Handle fast tracepoints.
1988 (max_jump_pad_size): New.
1989 (gdb_jump_pad_head): New.
1990 (get_jump_space_head): New.
1991 (claim_jump_space): New.
1992 (sort_tracepoints): New.
1993 (MAX_JUMP_SIZE): New.
1994 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1996 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1997 support. Upload fast traceframes, and delete internal IPA
1999 (stop_tracing_handler): New.
2000 (flush_trace_buffer_handler): New.
2001 (cmd_qtstop): Upload fast tracepoints.
2002 (response_tracepoint): Handle fast tracepoints.
2003 (tracepoint_finished_step): Upload fast traceframes. Set the
2004 tracepoint hit context's tracepoint type.
2005 (handle_tracepoint_bkpts): New.
2006 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2007 type. Add comment about fast tracepoints.
2008 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2009 non-existing action_str field.
2010 (get_context_regcache): Handle fast tracepoints.
2011 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2013 (fast_tracepoint_from_jump_pad_address): New.
2014 (fast_tracepoint_from_ipa_tpoint_address): New.
2015 (collecting_t): New.
2016 (force_unlock_trace_buffer): New.
2017 (fast_tracepoint_collecting): New.
2020 (write_inferior_data_ptr): New.
2021 (target_tp_heap): New.
2022 (target_malloc): New.
2023 (download_agent_expr): New.
2025 (download_tracepoints): New.
2026 (download_trace_state_variables): New.
2027 (upload_fast_traceframes): New.
2028 (IPA_FIRST_TRACEFRAME): New.
2029 (IPA_NEXT_TRACEFRAME_1): New.
2030 (IPA_NEXT_TRACEFRAME): New.
2031 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2032 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2033 (gdb_jump_pad_buffer_end): New.
2034 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2035 (initialize_tracepoint): Adjust.
2036 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2037 buffer. Initialize the low module.
2038 * utils.c (PREFIX, TOOLNAME): New.
2039 (malloc_failure): Use PREFIX.
2040 (error): In the IPA, an error causes an exit.
2041 (fatal, warning): Use PREFIX.
2042 (internal_error): Use TOOLNAME.
2043 (NUMCELLS): Increase to 10.
2044 * configure, config.in: Regenerate.
2046 2010-06-01 Pedro Alves <pedro@codesourcery.com>
2048 * server.c (handle_query) <qSupported>: Do two passes over the
2049 qSupported string to avoid nesting strtok.
2051 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2053 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2055 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2057 * configure: Regenerate.
2058 * proc-service.list: New.
2060 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2062 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2065 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2067 * gdbreplay.c (remote_open): Check error return from socket() call by
2068 its equality to -1 not by it being negative.
2069 * remote-utils.c (remote_open): Likewise.
2071 2010-05-23 Pedro Alves <pedro@codesourcery.com>
2073 * config.h: Regenerate.
2075 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2077 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2078 doesn't provide PTRACE_GET_THREAD_AREA.
2080 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2082 * linux-m68k-low.c: Include <asm/ptrace.h>
2083 (ps_get_thread_area): Implement.
2085 2010-05-03 Doug Evans <dje@google.com>
2087 * event-loop.c (struct callback_event): New struct.
2088 (callback_list): New global.
2089 (append_callback_event, delete_callback_event): New functions.
2090 (process_callback): New function.
2091 (start_event_loop): Call it.
2092 * remote-utils.c (NOT_SCHEDULED): Define.
2093 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2094 moved out of readchar.
2095 (readchar): Rewrite. Call reschedule before returning.
2096 (reset_readchar): New function.
2097 (remote_close): Call it.
2098 (process_remaining, reschedule): New functions.
2099 * server.h (callback_handler_func): New typedef.
2100 (append_callback_event, delete_callback_event): Declare.
2102 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2104 * proc-service.c (ps_pglobal_lookup): Use
2105 thread_db_look_up_one_symbol.
2106 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2107 parameter. Use it instead of all_symbols_looked_up.
2108 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2110 (all_symbols_looked_up): Don't declare.
2111 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2112 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2114 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2115 Set all_symbols_looked_up here.
2116 (thread_db_look_up_one_symbol): New.
2117 (thread_db_get_tls_address): Adjust.
2118 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2119 thread_db object on the heap, and tentatively set it in the
2121 (thread_db_init): Don't set all_symbols_looked_up here.
2122 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2124 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2126 * linux-low.c (linux_kill, linux_detach): Adjust.
2127 (status_pending_p_callback): Remove redundant statement. Check
2128 for !TARGET_WAITIKIND_IGNORE, instead of
2129 TARGET_WAITKIND_STOPPED.
2130 (handle_tracepoints): Make sure LWP is locked. Adjust.
2131 (linux_wait_for_event_1): Adjust.
2132 (linux_cancel_breakpoints): New.
2133 (unsuspend_one_lwp): New.
2134 (unsuspend_all_lwps): New.
2135 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2136 (send_sigstop_callback): Change return type to int, add new
2137 `except' parameter and handle it.
2138 (suspend_and_send_sigstop_callback): New.
2139 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2140 pass them down. If SUSPEND, also increment the lwp's suspend
2142 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2143 (need_step_over_p): Don't consider suspended LWPs.
2144 (start_step_over): Adjust.
2145 (proceed_one_lwp): Change return type to int, add new `except'
2146 parameter and handle it.
2147 (unsuspend_and_proceed_one_lwp): New.
2148 (proceed_all_lwps): Use find_inferior instead of
2150 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2151 also decrement the suspend count of LWPs. Pass `except' down,
2152 instead of hacking its suspend count.
2153 (linux_pause_all): Add `freeze' parameter. Adjust.
2154 (linux_unpause_all): New.
2155 (linux_target_ops): Install linux_unpause_all.
2156 * server.c (handle_status): Adjust.
2157 * target.h (struct target_ops): New fields `unpause_all' and
2158 `cancel_breakpoints'. Add new parameter to `pause_all'.
2159 (pause_all): Add new `freeze' parameter.
2161 (cancel_breakpoints): New.
2162 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2164 (cmd_qtstart): Pause threads.
2165 (stop_tracing): Pause threads, and cancel breakpoints.
2166 * win32-low.c (win32_target_ops): Adjust.
2168 2010-05-03 Pedro Alves <pedro@codesourcery.com>
2170 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2171 the inferior right away from here...
2172 (linux_wait_1): ... to here, and adjust to check the thread's
2173 last_resume_kind instead of the lwp's step or stop_expected flags.
2175 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2177 * README: Use consistent `GDB' and `GDBserver' spellings.
2179 2010-05-02 Pedro Alves <pedro@codesourcery.com>
2181 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2182 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2183 (linux_detach_one_lwp): Assume the lwp is stopped.
2184 (any_thread_of): Delete.
2185 (linux_detach): Stop all lwps here. Don't blindly delete all
2187 (delete_lwp_callback): New.
2188 (linux_mourn): Delete all lwps of the process that is gone.
2189 (linux_wait_1): Don't delete the last lwp of the process here.
2190 * mem-break.h (mark_breakpoints_out): Declare.
2191 * mem-break.c (mark_breakpoints_out): New.
2192 (free_all_breakpoints): Use it.
2193 * server.c (handle_target_event): If the process is gone, mark
2195 * thread-db.c (struct thread_db) <create_bp>: New field.
2196 (thread_db_enable_reporting): Fix prototype. Store a thread event
2197 breakpoint reference in the thread_db struct.
2198 (thread_db_load_search): Clear the thread_db object.
2199 (try_thread_db_load_1): Ditto.
2200 (switch_to_process): New.
2201 (disable_thread_event_reporting): Use it.
2202 (remove_thread_event_breakpoints): New.
2203 (thread_db_detach, thread_db_mourn): Use it.
2205 2010-05-01 Pedro Alves <pedro@codesourcery.com>
2207 * linux-low.c (linux_enable_event_reporting): New.
2208 (linux_wait_for_event_1, handle_extended_wait): Use it.
2210 2010-04-30 Pedro Alves <pedro@codesourcery.com>
2212 * linux-low.c (linux_kill_one_lwp, linux_kill)
2213 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2214 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2215 SIGSTOP even if the LWP is stopped.
2216 (send_sigstop_callback): New.
2217 (stop_all_lwps): Use send_sigstop_callback instead.
2218 (linux_resume_one_thread): Adjust.
2219 (proceed_one_lwp): Still proceed an LWP that the client has
2220 requested to stop, if we haven't reported it as stopped yet. Make
2221 sure that LWPs the client want stopped, have a pending SIGSTOP.
2223 2010-04-26 Doug Evans <dje@google.com>
2225 * server.c (handle_general_set): Make static.
2227 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2228 Print received char after testing for error/eof instead of before.
2229 (input_interrupt): Tweak comment.
2231 2010-04-23 Doug Evans <dje@google.com>
2233 * server.c (start_inferior): Print inferior argv if --debug.
2235 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2237 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2238 * nto-x86-low.c: Include server.h
2240 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2242 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2243 be consistent with other sources of this directory.
2244 (init_registers_amd64): Correct name of source file of this function
2247 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2249 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2252 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2254 * win32-i386-low.c: Add 64-bit support.
2255 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2256 (init_registers_amd64): Declare.
2257 (mappings): Add 64-bit version of array.
2258 (init_windows_x86): New function.
2259 (the_low_target): Change init_arch field to init_windows_x86.
2261 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2263 * win32-low.c: Adapt to support also 64-bit architecture.
2264 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2265 (get_image_name): Use SIZE_T type for local variable `done'.
2266 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2267 (toolhelp_get_dll_name): Idem.
2268 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2269 Use uintptr_t typecast to avoid warning.
2270 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2271 (handle_exception): Use phex_nz to avoid warning.
2272 (win32_wait): Remove unused local variable `process'.
2274 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2276 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2279 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2281 * configure.ac: Use `ws2_32' library for srv_mingw.
2282 * configure: Regenerate.
2283 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2284 * remote-utils.c: Likewise.
2286 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2288 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2289 if __x86_64__ is defined.
2291 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2293 * configure: Regenerate.
2295 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2297 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2298 * target.h (target_ops): New get_tib_address field.
2299 * win32-low.h (win32_thread_info): Add thread_local_base field.
2300 * win32-low.c (child_add_thread): Add tlb argument.
2301 Set thread_local_base field to TLB.
2302 (get_child_debug_event): Adapt to child_add_thread change.
2303 (win32_get_tib_address): New function.
2304 (win32_target_ops): Set get_tib_address field to
2305 win32_get_tib_address.
2306 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2308 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2310 * linux-low.c (linux_mourn): Also remove the process.
2311 * server.c (handle_target_event): Don't remove the process here.
2312 * nto-low.c (nto_mourn): New.
2313 (nto_target_ops): Install it.
2314 * spu-low.c (spu_mourn): New.
2315 (spu_target_ops): Install it.
2316 * win32-low.c (win32_mourn): New.
2317 (win32_target_ops): Install it.
2319 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2321 * server.h (buffer_xml_printf): Remove redundant `;'.
2323 2010-04-12 Pedro Alves <pedro@codesourcery.com>
2325 * regcache.c (set_register_cache): Invalidate regcaches before
2326 changing the register cache layout.
2327 (regcache_invalidate_one): Allow a NULL regcache.
2328 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2329 regcaches before changing the register cache layout or the target
2332 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2334 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2335 variable warning on Linux/x86-64.
2337 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2339 GDBserver disconnected tracing support.
2341 * linux-low.c (linux_remove_process): Delete.
2342 (add_lwp): Don't set last_resume_kind here.
2343 (linux_kill): Use `mourn'.
2344 (linux_detach): Use `thread_db_detach', and `mourn'.
2346 (linux_attach_lwp_1): Adjust comment.
2347 (linux_attach): last_resume_kind moved the thread_info; adjust.
2348 (status_pending_p_callback): Adjust.
2349 (linux_wait_for_event_1): Adjust.
2350 (count_events_callback, select_singlestep_lwp_callback)
2351 (select_event_lwp_callback, cancel_breakpoints_callback)
2352 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2353 (proceed_one_lwp): Adjust.
2354 (linux_async): Add debug output.
2355 (linux_thread_stopped): New.
2356 (linux_pause_all): New.
2357 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2359 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2360 (thread_db_free): Delete declaration.
2361 (thread_db_detach, thread_db_mourn): Declare.
2362 * thread-db.c (thread_db_init): Use thread_db_mourn.
2363 (thread_db_free): Delete, split in two.
2364 (disable_thread_event_reporting): New.
2365 (thread_db_detach): New.
2366 (thread_db_mourn): New.
2368 * server.h (struct thread_info) <last_resume_kind>: New field.
2369 <attached>: Add comment.
2370 <gdb_detached>: New field.
2371 (handler_func): Change return type to int.
2372 (handle_serial_event, handle_target_event): Ditto.
2373 (gdb_connected): Declare.
2375 (disconnected_tracing): Declare.
2376 (stop_tracing): Declare.
2378 * server.c (handle_query) <qSupported>: Report support for
2379 disconnected tracing.
2380 (queue_stop_reply_callback): Account for running threads.
2381 (gdb_wants_thread_stopped): New.
2382 (gdb_wants_all_threads_stopped): New.
2383 (gdb_reattached_process): New.
2384 (handle_status): Clear the `gdb_detached' flag of all processes.
2385 In all-stop, stop all threads.
2386 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2387 (process_serial_event): If the remote connection breaks, or if an
2388 exit was forced with "monitor exit", force an event loop exit.
2389 Handle disconnected tracing on detach.
2390 (handle_serial_event): Adjust.
2391 (handle_target_event): If GDB isn't connected, forward events back
2392 to the inferior, unless the last process exited, in which case,
2393 exit gdbserver. Adjust interface.
2395 * remote-utils.c (remote_open): Don't block in accept. Instead
2396 register an event loop source on the listen socket file
2397 descriptor. Refactor bits into ...
2398 (listen_desc): ... this new global.
2399 (gdb_connected): ... this new function.
2400 (enable_async_notification): ... this new function.
2401 (handle_accept_event): ... this new function.
2402 (remote_close): Clear remote_desc.
2404 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2406 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2408 (mourn_inferior): Define.
2409 (target_process_qsupported): Avoid the dangling else problem.
2410 (thread_stopped): Define.
2411 (pause_all): Define.
2412 (target_waitstatus_to_string): Declare.
2413 * target.c (target_waitstatus_to_string): New.
2415 * tracepoint.c (tracing): Make extern.
2416 (disconnected_tracing): New.
2417 (stop_tracing): Make extern. Handle tracing stops due to GDB
2419 (cmd_qtdisconnected): New.
2420 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2421 (handle_tracepoint_general_set): Handle QTDisconnected.
2423 * event-loop.c (event_handler_func): Change return type to int.
2424 (process_event): Bail out if the event handler wants the event
2426 (handle_file_event): Ditto.
2427 (start_event_loop): Bail out if the event handler wants the event
2430 * nto-low.c (nto_target_ops): Adjust.
2431 * spu-low.c (spu_wait): Don't remove the process here.
2432 (spu_target_ops): Adjust.
2433 * win32-low.c (win32_wait): Don't remove the process here.
2434 (win32_target_ops): Adjust.
2436 2010-04-11 Pedro Alves <pedro@codesourcery.com>
2438 * regcache.c (realloc_register_cache): Invalidate inferior's
2439 regcache before recreating it.
2441 2010-04-09 Pedro Alves <pedro@codesourcery.com>
2443 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2445 2010-04-09 Stan Shebs <stan@codesourcery.com>
2446 Pedro Alves <pedro@codesourcery.com>
2448 * server.h (LONGEST): New.
2449 (struct thread_info) <while_stepping>: New field.
2450 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2452 (initialize_tracepoint, handle_tracepoint_general_set)
2453 (handle_tracepoint_query, tracepoint_finished_step)
2454 (tracepoint_was_hit, release_while_stepping_state_list):
2455 (current_traceframe): Declare.
2456 * server.c (handle_general_set): Handle tracepoint packets.
2458 (write_memory): New.
2459 (handle_search_memory_1): Use read_memory.
2460 (handle_query): Report support for conditional tracepoints, trace
2461 state variables, and tracepoint sources. Handle tracepoint
2463 (main): Initialize the tracepoints module.
2464 (process_serial_event): Handle traceframe reads/writes.
2466 * linux-low.c (handle_tracepoints): New.
2467 (linux_wait_1): Call it.
2468 (linux_resume_one_lwp): Handle while-stepping.
2469 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2470 (linux_target_ops): Install them.
2471 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2473 * linux-x86-low.c (x86_supports_tracepoints): New.
2474 (the_low_target). Install it.
2476 * mem-break.h (delete_breakpoint): Declare.
2477 * mem-break.c (delete_breakpoint): Make external.
2479 * target.h (struct target_ops): Add `supports_tracepoints',
2480 `read_pc', and `write_pc' fields.
2481 (target_supports_tracepoints): Define.
2482 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2485 * regcache.h (struct regcache) <registers_owned>: New field.
2486 (init_register_cache, regcache_cpy): Declare.
2487 (regcache_read_pc, regcache_write_pc): Declare.
2488 (register_cache_size): Declare.
2489 (supply_regblock): Declare.
2490 * regcache.c (init_register_cache): New.
2491 (new_register_cache): Use it.
2492 (regcache_cpy): New.
2493 (register_cache_size): New.
2494 (supply_regblock): New.
2495 (regcache_read_pc, regcache_write_pc): New.
2497 * tracepoint.c: New.
2499 * Makefile.in (OBS): Add tracepoint.o.
2500 (tracepoint.o): New rule.
2502 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2504 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2506 (i386-mmx.c): Likewise.
2507 (i386-mmx-linux.o): Likewise.
2508 (i386-mmx-linux.c): Likewise.
2510 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2511 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2512 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2513 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2515 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2516 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2517 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2519 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2521 * Makefile.in (clean): Updated.
2523 (i386-avx.c): Likewise.
2524 (i386-avx-linux.o): Likewise.
2525 (i386-avx-linux.c): Likewise.
2526 (amd64-avx.o): Likewise.
2527 (amd64-avx.c): Likewise.
2528 (amd64-avx-linux.o): Likewise.
2529 (amd64-avx-linux.c): Likewise.
2531 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2532 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2533 (srv_amd64_regobj): Add amd64-avx.o.
2534 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2535 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2536 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2537 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2538 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2539 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2540 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2542 * i387-fp.c: Include "i386-xstate.h".
2544 (i387_cache_to_xsave): Likewise.
2545 (i387_xsave_to_cache): Likewise.
2546 (x86_xcr0): Likewise.
2548 * i387-fp.h (i387_cache_to_xsave): Likewise.
2549 (i387_xsave_to_cache): Likewise.
2550 (x86_xcr0): Likewise.
2552 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2553 * linux-crisv32-low.c (target_regsets): Likewise.
2554 * linux-m68k-low.c (target_regsets): Likewise.
2555 * linux-mips-low.c (target_regsets): Likewise.
2556 * linux-ppc-low.c (target_regsets): Likewise.
2557 * linux-s390-low.c (target_regsets): Likewise.
2558 * linux-sh-low.c (target_regsets): Likewise.
2559 * linux-sparc-low.c (target_regsets): Likewise.
2560 * linux-xtensa-low.c (target_regsets): Likewise.
2562 * linux-low.c: Include <sys/uio.h>.
2563 (regsets_fetch_inferior_registers): Support nt_type.
2564 (regsets_store_inferior_registers): Likewise.
2565 (linux_process_qsupported): New.
2566 (linux_target_ops): Add linux_process_qsupported.
2568 * linux-low.h (regset_info): Add nt_type.
2569 (linux_target_ops): Add process_qsupported.
2571 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2573 (init_registers_i386_avx_linux): New.
2574 (init_registers_amd64_avx_linux): Likewise.
2575 (xmltarget_i386_linux_no_xml): Likewise.
2576 (xmltarget_amd64_linux_no_xml): Likewise.
2577 (PTRACE_GETREGSET): Likewise.
2578 (PTRACE_SETREGSET): Likewise.
2579 (x86_fill_xstateregset): Likewise.
2580 (x86_store_xstateregset): Likewise.
2581 (use_xml): Likewise.
2582 (x86_linux_update_xmltarget): Likewise.
2583 (x86_linux_process_qsupported): Likewise.
2584 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2585 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2586 init_registers_i386_linux here. Call
2587 x86_linux_update_xmltarget.
2588 (the_low_target): Add x86_linux_process_qsupported.
2590 * server.c (handle_query): Call target_process_qsupported.
2592 * target.h (target_ops): Add process_qsupported.
2593 (target_process_qsupported): New.
2595 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2597 * inferiors.c (add_thread): Set last_status kind to
2598 TARGET_WAITKIND_IGNORE.
2599 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2600 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2601 (linux_wait_1): Move `thread' local definition to block that uses
2602 it. Don't NULL initialize `event_child'.
2603 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2604 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2605 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2607 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2609 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2610 an extended waitstatus, or by a watchpoint.
2611 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2612 thread was stepping or has been stopped by a watchpoint.
2614 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2616 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2617 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2618 of another, then delete the previous, and validate all
2620 (validate_inserted_breakpoint): New.
2621 (delete_disabled_breakpoints): New.
2622 (validate_breakpoints): New.
2623 (check_mem_read): Validate breakpoints before trusting their
2624 shadow. Delete disabled breakpoints.
2625 (check_mem_write): Validate breakpoints before trusting they
2626 should be inserted. Delete disabled breakpoints.
2627 * mem-break.h (validate_breakpoints):
2628 * server.c (handle_query): Validate breakpoints when we see a
2631 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2633 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2634 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2635 if we could tell there's a GDB breakpoint at stop_pc.
2636 (need_step_over_p): Don't do a step over if we find a GDB
2637 breakpoint at the resume PC.
2639 * mem-break.c (struct raw_breakpoint): New.
2640 (enum bkpt_type): New type `gdb_breakpoint'.
2641 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2642 fields. New field `raw'.
2643 (find_raw_breakpoint_at): New.
2644 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2646 (set_breakpoint_at): Adjust.
2647 (delete_raw_breakpoint): New.
2648 (release_breakpoint): New.
2649 (delete_breakpoint): Rename to...
2650 (delete_breakpoint_1): ... this. Add proc parameter. Use
2651 release_breakpoint. Return ENOENT.
2652 (delete_breakpoint): Reimplement.
2653 (find_breakpoint_at): Delete.
2654 (find_gdb_breakpoint_at): New.
2655 (delete_breakpoint_at): Delete.
2656 (set_gdb_breakpoint_at): New.
2657 (delete_gdb_breakpoint_at): New.
2658 (gdb_breakpoint_here): New.
2659 (set_reinsert_breakpoint): Use release_breakpoint.
2660 (uninsert_breakpoint): Rename to ...
2661 (uninsert_raw_breakpoint): ... this.
2662 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2663 (reinsert_raw_breakpoint): Change parameter type to
2665 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2667 (check_breakpoints): Adjust. Use release_breakpoint.
2668 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2669 (breakpoint_inserted_here): Ditto.
2670 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2671 Don't trust the breakpoint's shadow if it is not inserted.
2672 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2673 (delete_all_breakpoints): Adjust.
2674 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2675 use delete_breakpoint_1.
2677 * mem-break.h (breakpoints_supported): Delete declaration.
2678 (set_gdb_breakpoint_at): Declare.
2679 (gdb_breakpoint_here): Declare.
2680 (delete_breakpoint_at): Delete.
2681 (delete_gdb_breakpoint_at): Declare.
2683 * server.h (struct raw_breakpoint): Forward declare.
2684 (struct process_info): New field `raw_breakpoints'.
2686 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2689 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2691 * linux-low.c (status_pending_p_callback): Fix comment.
2692 (linux_wait_for_event_1): Move most of the internal breakpoint
2693 handling from here...
2694 (linux_wait_1): ... to here.
2695 (count_events_callback): New.
2696 (select_singlestep_lwp_callback): New.
2697 (select_event_lwp_callback): New.
2698 (cancel_breakpoints_callback): New.
2699 (select_event_lwp): New.
2700 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2701 priority to all LWPs that have had events that should be reported
2702 to the client. Cancel breakpoints when about to reporting the
2703 event to the client, not while stopping lwps. No longer cancel
2704 finished single-steps here.
2705 (cancel_finished_single_step): Delete.
2706 (cancel_finished_single_steps): Delete.
2708 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2710 * mem-break.c (enum bkpt_type): New.
2711 (struct breakpoint): New field `type'.
2712 (set_breakpoint_at): Change return type to struct breakpoint
2713 pointer. Set type to `other_breakpoint' by default.
2714 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2715 in the breakpoint list.
2716 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2717 (reinsert_breakpoint): Rename to ...
2718 (reinsert_raw_breakpoint): ... this.
2719 (reinsert_breakpoints_at): Adjust.
2720 * mem-break.h (struct breakpoint): Declare.
2721 (set_breakpoint_at): Change return type to struct breakpoint
2724 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2726 * server.c (handle_query): Assign, not compare.
2728 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2730 Teach linux gdbserver to step-over-breakpoints.
2732 * linux-low.c (can_hardware_single_step): New.
2733 (supports_breakpoints): New.
2734 (handle_extended_wait): If stopping threads, read the stop pc of
2737 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2738 low target doesn't support retrieving the PC.
2739 (add_lwp): Set last_resume_kind to resume_continue.
2740 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2741 (linux_attach): Don't clear stop_expected. Set the lwp's
2742 last_resume_kind to resume_stop.
2743 (linux_detach_one_lwp): Don't check for removed breakpoints.
2744 (check_removed_breakpoint): Delete.
2745 (status_pending_p): Rename to ...
2746 (status_pending_p_callback): ... this. Don't check for removed
2747 breakpoints. Don't consider threads that are stopped from GDB's
2749 (linux_wait_for_lwp): Always read the stop_pc here.
2750 (cancel_breakpoint): New.
2751 (step_over_bkpt): New global.
2752 (linux_wait_for_event_1): Implement stepping over breakpoints.
2753 (gdb_wants_lwp_stopped): New.
2754 (gdb_wants_all_stopped): New.
2755 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2756 single-step traps here. Store the thread's last reported target
2758 (send_sigstop): Don't clear stop_expected. Always set it,
2760 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2761 (cancel_finished_single_step): New.
2762 (cancel_finished_single_steps): New.
2763 (wait_for_sigstop): Don't cancel finished single-step traps here.
2764 (linux_resume_one_lwp): Don't check for removed breakpoints.
2765 Don't set `step' on non-hardware step archs.
2766 (linux_set_resume_request): Ignore resume_stop requests if already
2767 stopping or stopped. Set the lwp's last_resume_kind.
2768 (resume_status_pending_p): Don't check for removed breakpoints.
2769 (need_step_over_p): New.
2770 (start_step_over): New.
2771 (finish_step_over): New.
2772 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2773 requests. Clear the thread's last reported target waitstatus.
2774 Don't use the `suspended' flag. Don't consider pending breakpoints.
2775 (linux_resume): Start a step-over if necessary.
2776 (proceed_one_lwp): New.
2777 (proceed_all_lwps): New.
2778 (unstop_all_lwps): New.
2779 * linux-low.h (struct lwp_info): Rewrite comment for the
2780 `suspended' flag. Add the `stop_pc' field. Delete the
2781 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2782 Add `'last_resume_kind' and `need_step_over' fields.
2783 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2784 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2785 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2786 (set_raw_breakpoint_at): New.
2787 (set_breakpoint_at): Rewrite to use it.
2788 (reinsert_breakpoint_handler): Delete.
2789 (set_reinsert_breakpoint): New.
2790 (reinsert_breakpoint_by_bp): Delete.
2791 (delete_reinsert_breakpoints): New.
2792 (uninsert_breakpoint): Rewrite.
2793 (uninsert_breakpoints_at): New.
2794 (reinsert_breakpoint): Rewrite.
2795 (reinsert_breakpoints_at): New.
2796 (check_breakpoints): Rewrite.
2797 (breakpoint_here): New.
2798 (breakpoint_inserted_here): New.
2799 (check_mem_read): Adjust.
2800 * mem-break.h (breakpoints_supported, breakpoint_here)
2801 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2802 (reinsert_breakpoint_by_bp): Delete declaration.
2803 (delete_reinsert_breakpoints): Declare.
2804 (reinsert_breakpoint): Delete declaration.
2805 (reinsert_breakpoints_at): Declare.
2806 (uninsert_breakpoint): Delete declaration.
2807 (uninsert_breakpoints_at): Declare.
2808 (check_breakpoints): Adjust prototype.
2809 * server.h: Adjust include order.
2810 (struct thread_info): Declare here. Add a `last_status' field.
2812 2010-03-23 Michael Snyder <msnyder@vmware.com>
2814 * server.c (crc32): New function.
2815 (handle_query): Add handling for 'qCRC:' request.
2817 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2819 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2820 lwp had been stopped by a watchpoint.
2822 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2824 * server.h (internal_error): Declare.
2825 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2826 * utils.c (internal_error): New function.
2828 2010-03-15 Andreas Schwab <schwab@redhat.com>
2830 * configure.srv: Fix typo setting srv_regobj.
2832 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2834 * linux-low.c (fetch_register): Avoid passing a non string literal
2836 (usr_store_inferior_registers): Ditto.
2838 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2840 * linux-low.c (linux_write_memory): Bail out early if peeking
2843 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2845 * linux-low.h (struct lwp_info): New fields
2846 `stopped_by_watchpoint' and `stopped_data_address'.
2847 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2848 here, and cache them in the lwp object.
2849 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2851 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2853 (linux_stopped_by_watchpoint): Rewrite.
2854 (linux_stopped_data_address): Rewrite.
2856 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
2858 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2859 switching the current inferior, not before.
2861 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2863 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2864 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2865 i386-linux.c and amd64-linux.c.
2866 (reg-i386.o): Removed.
2867 (reg-i386.c): Likewise.
2868 (reg-i386-linux.o): Likewise.
2869 (reg-i386-linux.c): Likewise.
2870 (reg-x86-64.o): Likewise.
2871 (reg-x86-64.c): Likewise.
2872 (reg-x86-64-linux.o): Likewise.
2873 (reg-x86-64-linux.c): Likewise.
2876 (i386-linux.o): Likewise.
2877 (i386-linux.c): Likewise.
2878 (amd64.o): Likewise.
2879 (amd64.c): Likewise.
2880 (amd64-linux.o): Likewise.
2881 (amd64-linux.c): Likewise.
2883 * configure.srv (srv_i386_regobj): New.
2884 (srv_i386_linux_regobj): Likewise.
2885 (srv_amd64_regobj): Likewise.
2886 (srv_amd64_linux_regobj): Likewise.
2887 (srv_i386_32bit_xmlfiles): Likewise.
2888 (srv_i386_64bit_xmlfiles): Likewise.
2889 (srv_i386_xmlfiles): Likewise.
2890 (srv_amd64_xmlfiles): Likewise.
2891 (srv_i386_linux_xmlfiles): Likewise.
2892 (srv_amd64_linux_xmlfiles): Likewise.
2893 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2894 srv_xmlfiles to $srv_i386_xmlfiles.
2895 (i[34567]86-*-mingw32ce*): Likewise.
2896 (i[34567]86-*-mingw*): Likewise.
2897 (i[34567]86-*-nto*): Likewise.
2898 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2899 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2900 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2901 (x86_64-*-linux*): Likewise.
2903 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2904 (init_registers_amd64_linux): New.
2905 (x86_arch_setup): Replace init_registers_x86_64_linux with
2906 init_registers_amd64_linux.
2908 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2910 * configure.ac: Check for libdl. If it is not available link against
2911 static libthread_db.
2912 * configure: Regenerate.
2914 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2918 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2919 handing a read watchpoint.
2920 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2922 2010-02-12 Doug Evans <dje@google.com>
2924 * linux-low.c (linux_supports_tracefork_flag): Document.
2925 (linux_look_up_symbols): Add comment.
2927 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2929 * regcache.c (supply_register): Clear regcache if buf is NULL.
2931 2010-02-02 Nicolas Roche <roche@sourceware.org>
2932 Joel Brobecker <brobecker@adacore.com>
2934 * inferiors.c (find_inferior): Add function documentation.
2935 (unloaded_dll): Handle the case where the unloaded dll has not
2936 been previously registered in the dll list.
2938 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2940 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2941 (thumb2_breakpoint): New.
2942 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2944 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2946 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2947 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2950 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2952 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2954 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2956 * linux-s390-low.c (s390_collect_ptrace_register)
2957 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2959 2010-01-21 Doug Evans <dje@google.com>
2961 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2962 (PTRACE_ARG4_TYPE): New macro.
2963 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2964 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2965 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2966 (usr_store_inferior_registers): Ditto.
2967 (linux_read_memory, linux_write_memory): Ditto.
2968 (linux_test_for_tracefork): Ditto.
2970 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2971 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2973 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2975 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2978 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2980 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2981 prototype to take a regcache. Adjust.
2983 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2985 * regcache.h (struct thread_info): Forward declare.
2986 (struct regcache): New.
2987 (new_register_cache): Adjust prototype.
2988 (get_thread_regcache): Declare.
2989 (free_register_cache): Adjust prototype.
2990 (registers_to_string, registers_from_string): Ditto.
2991 (supply_register, supply_register_by_name, collect_register)
2992 (collect_register_as_string, collect_register_by_name): Ditto.
2993 * regcache.c (struct inferior_regcache_data): Delete.
2994 (get_regcache): Rename to ...
2995 (get_thread_regcache): ... this. Adjust. Switch inferior before
2997 (regcache_invalidate_one): Adjust.
2998 (regcache_invalidate): Fix prototype.
2999 (new_register_cache): Return the new register cache.
3000 (free_register_cache): Change prototype.
3001 (realloc_register_cache): Adjust.
3002 (registers_to_string): Change prototype to take a regcache. Adjust.
3003 (registers_from_string): Ditto.
3004 (register_data): Ditto.
3005 (supply_register): Ditto.
3006 (supply_register_by_name): Ditto.
3007 (collect_register): Ditto.
3008 (collect_register_as_string): Ditto.
3009 (collect_register_by_name): Ditto.
3010 * server.c (process_serial_event): Adjust.
3011 * linux-low.h (regset_fill_func, regset_store_func): Change
3013 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3015 * linux-low.c (get_stop_pc): Adjust.
3016 (check_removed_breakpoint): Adjust.
3017 (linux_wait_for_event): Adjust.
3018 (linux_resume_one_lwp): Adjust.
3019 (fetch_register): Add regcache parameter. Adjust.
3020 (usr_store_inferior_registers): Ditto.
3021 (regsets_fetch_inferior_registers): Ditto.
3022 (regsets_store_inferior_registers): Ditto.
3023 (linux_fetch_registers, linux_store_registers): Ditto.
3024 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3026 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3027 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3028 prototype to take a regcache.
3029 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3030 * remote-utils.c (convert_ascii_to_int, outreg)
3031 (prepare_resume_reply): Change prototype to take a regcache.
3033 * target.h (struct target_ops) <fetch_registers, store_registers>:
3034 Change prototype to take a regcache.
3035 (fetch_inferior_registers, store_inferior_registers): Change
3036 prototype to take a regcache. Adjust.
3037 * proc-service.c (ps_lgetregs): Adjust.
3038 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3039 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3040 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3041 take a regcache. Adjust.
3042 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3043 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3044 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3045 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3046 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3047 (cris_cannot_fetch_register):
3048 (cris_breakpoint_at): Change prototype to take a regcache.
3050 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3051 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3052 to take a regcache. Adjust.
3053 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3055 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3056 take a regcache. Adjust.
3057 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3058 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3059 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3060 * linux-mips-low.c (mips_get_pc):
3061 (mips_set_pc): Change prototype to take a regcache. Adjust.
3062 (mips_reinsert_addr): Adjust.
3063 (mips_collect_register): Change prototype to take a regcache.
3065 (mips_supply_register):
3066 (mips_collect_register_32bit, mips_supply_register_32bit)
3067 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3068 (mips_store_fpregset): Ditto.
3069 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3071 (parse_spufs_run): Adjust.
3072 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3073 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3074 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3075 take a regcache. Adjust.
3076 * linux-s390-low.c (s390_collect_ptrace_register)
3077 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3078 (s390_set_pc): Change prototype to take a regcache. Adjust.
3079 (s390_arch_setup): Adjust.
3080 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3081 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3082 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3083 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3084 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3086 (sparc_breakpoint_at): Adjust.
3087 * linux-xtensa-low.c (xtensa_fill_gregset):
3088 (xtensa_store_gregset):
3089 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3090 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3091 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3092 prototype to take a regcache. Adjust.
3093 * win32-arm-low.c (arm_fetch_inferior_register)
3094 (arm_store_inferior_register): Change prototype to take a
3096 * win32-i386-low.c (i386_fetch_inferior_register)
3097 (i386_store_inferior_register): Change prototype to take a
3099 * win32-low.c (child_fetch_inferior_registers)
3100 (child_store_inferior_registers): Change prototype to take a
3102 (win32_wait): Adjust.
3103 (win32_fetch_inferior_registers): Change prototype to take a
3105 (win32_store_inferior_registers): Adjust.
3106 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3107 store_inferior_register>: Change prototype to take a regcache.
3109 2010-01-20 Doug Evans <dje@google.com>
3111 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3113 (linux_wait_for_event1, linux_init_signals): Ditto.
3114 (W_STOPCODE): Provide definition if missing.
3116 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3118 * linux-low.c (linux_core_of_thread): New.
3119 (compare_ints, show_process, list_threads): New.
3120 (linux_qxfer_osdata): Report threads and cores.
3121 (linux_target_op): Register linux_core_of_thread.
3122 * remote-utils.c (prepare_resume_reply): Report the core.
3123 (buffer_xml_printf): Support %d specifier.
3124 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3126 (handle_query): Handle qXfer:threads. Announce availability
3128 * target.h (struct target_ops): New field core_of_thread.
3130 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3132 * Makefile.in (clean): Remove new generated files.
3133 (reg-s390.o, reg-s390.c): Remove rules.
3134 (reg-s390x.o, reg-s390x.c): Likewise.
3135 (s390-linux32.o, s390-linux32.c): Add rules.
3136 (s390-linux64.o, s390-linux64.c): Likewise.
3137 (s390x-linux64.o, s390x-linux64.c): Likewise.
3138 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3139 * linux-s390-low.c: Include <elf.h>.
3140 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3141 (init_registers_s390): Remove prototype.
3142 (init_registers_s390x): Likewise.
3143 (init_registers_s390_linux32): Add prototype.
3144 (init_registers_s390_linux64): Likewise.
3145 (init_registers_s390x_linux64): Likewise.
3146 (s390_num_regs_3264): New define.
3147 (s390_regmap_3264): New global variable.
3148 (s390_cannot_fetch_register): Remove obsolete check.
3149 (s390_cannot_store_register): Likewise.
3150 (s390_collect_ptrace_register): Handle upper/lower register halves.
3151 (s390_supply_ptrace_register): Likewise.
3152 (s390_fill_gregset): Update to register number changes.
3153 (s390_get_hwcap): New routine.
3154 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3155 Install appropriate regmap and register set.
3157 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3159 * server.c (gdbserver_version): Update copyright year to 2010.
3160 * gdbreplay.c (gdbreplay_version): Likewise.
3162 2009-12-28 Doug Evans <dje@google.com>
3164 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3165 elf/external.h. Include <elf.h> instead but only if necessary.
3167 2009-12-28 Pedro Alves <pedro@codesourcery.com>
3169 * linux-low.c (linux_remove_process): Remove `detaching'
3170 parameter. Don't release/detach from thread_db here.
3171 (linux_kill): Release/detach from thread_db here, ...
3172 (linux_detach): ... and here, before actually detaching.
3173 (linux_wait_1): ... and here, when a process exits.
3174 * thread-db.c (any_thread_of): New.
3175 (thread_db_free): Switch the current inferior to a thread of the
3178 2009-12-21 Doug Evans <dje@google.com>
3180 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3182 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3183 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3184 warning ifndef __NR_tkill. Move setting of errno there too.
3185 Delete unnecessary resetting of errno after syscall.
3186 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3188 * configure.ac: Check for dladdr.
3189 * config.in: Regenerate.
3190 * configure: Regenerate.
3191 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3192 (try_thread_db_load): Update.
3194 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3196 2009-12-18 Doug Evans <dje@google.com>
3198 * event-loop.c: Include unistd.h if it exists.
3200 * linux-low.c (my_waitpid): Move definition away from being in
3201 between linux_tracefork_child/linux_test_for_tracefork.
3203 * gdb_proc_service.h (psaddr_t): Fix type.
3204 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3205 signature to match glibc.
3207 2009-12-16 Doug Evans <dje@google.com>
3209 * linux-low.c (linux_read_memory): Fix argument to read.
3211 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3213 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3214 events, don't leave current_inferior pointing at null.
3216 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3218 * win32-low.c (LOG): Delete.
3219 (OUTMSG): Output to stderr.
3220 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3221 on compile time LOG macro.
3222 (win32_wait): Fix debug output.
3224 2009-11-26 Pedro Alves <pedro@codesourcery.com>
3226 * win32-low.c (win32_add_one_solib): If the dll name is
3227 "ntdll.dll", prepend the system directory to the dll path.
3229 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3231 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3233 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
3234 Vladimir Prus <vladimir@codesourcery.com>
3236 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3237 * configure.ac: Check for __mcoldfire__ and set
3238 gdb_cv_m68k_is_coldfire.
3239 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3240 reg-cf.o and reg-m68k.o.
3241 * configure: Regenerated.
3243 2009-11-16 Pedro Alves <pedro@codesourcery.com>
3245 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3246 Pass it to thread_db_free.
3247 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3248 proper `detaching' argument to linux_remove_process.
3249 * linux-low.h (thread_db_free): Add `detaching' parameter.
3250 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3252 (thread_db_free): Add `detaching' parameter. Only
3253 call td_ta_clear_event if detaching from process.
3255 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3257 * thread-db.c (thread_db_free): Fix typo.
3259 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3262 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3264 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3266 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3267 with an i686 compiler.
3268 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3270 * configure: Rebuilt.
3272 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3276 * server.c (handle_search_memory_1): Correct read_addr initialization
3277 in loop for searching subsequent chunks.
3279 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3281 * configure.ac: New --with-libthread-db option.
3282 * thread-db.c: Allow direct dependence on libthread_db.
3283 (thread_db_free): Adjust.
3284 * config.in: Regenerate.
3285 * configure: Likewise.
3287 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3290 * thread-db.c (attach_thread): New function.
3291 (maybe_attach_thread): Return success/failure.
3292 (find_new_threads_callback): Adjust.
3293 (thread_db_find_new_threads): Loop until no new threads.
3295 2009-10-13 Pedro Alves <pedro@codesourcery.com>
3297 * proc-service.c (ps_lgetregs): Formatting.
3299 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3301 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3302 * configure.ac: Adjust.
3303 * linux-low.h (struct process_info_private): Move members to struct
3305 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3306 * linux-low.c (linux_remove_process): Adjust.
3307 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3308 * server.c (handle_query): Move code ...
3309 (handle_monitor_command): ... here. New function.
3310 * target.h (struct target_ops): New member.
3311 * thread-db.c (struct thread_db): New.
3312 (libthread_db_search_path): New variable.
3313 (thread_db_create_event, thread_db_enable_reporting)
3314 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3315 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3316 (try_thread_db_load_1, dladdr_to_soname): New functions.
3317 (try_thread_db_load, thread_db_load_search): New functions.
3318 (thread_db_init): Search for libthread_db.
3319 (thread_db_free): New function.
3320 (thread_db_handle_monitor_command): Likewise.
3321 * config.in: Regenerate.
3322 * configure: Regenerate.
3324 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3326 * spu-low.c (spu_kill): Wait for inferior to terminate.
3327 Call clear_inferiors.
3328 (spu_detach): Call clear_inferiors.
3330 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3332 * aclocal.m4: Regenerate.
3333 * config.in: Likewise.
3334 * configure: Likewise.
3336 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3338 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3339 (parse_spufs_run): New function.
3340 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3341 (ppc_breakpoint_at): Handle SPU breakpoints.
3343 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3345 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3346 (SPUFS_MAGIC): Define.
3347 (spu_enumerate_spu_ids): New function.
3348 (linux_qxfer_spu): New function.
3349 (linux_target_ops): Install linux_qxfer_spu.
3351 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3353 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3354 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3355 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3356 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3357 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3358 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3359 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3360 (init_registers_powerpc_cell32l): Add prototype.
3361 (init_registers_powerpc_cell64l): Likewise.
3362 (ppc_arch_setup): Detect Cell/B.E. architecture.
3364 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3366 * Makefile.in (datarootdir): New variable.
3368 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3370 * linux-low.c (linux_write_memory): Update debugging output.
3371 * Makefile.in (clean): Add new descriptions.
3372 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3373 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3374 * configure.srv: Add new files for arm*-*-linux*.
3375 * linux-arm-low.c: Add new declarations.
3376 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3377 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3378 (HWCAP_VFPv3D16): New.
3379 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3380 instead of __IWMMXT__.
3381 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3382 (arm_arch_setup): New.
3383 (target_regsets): Remove #ifdef. Add VFP regset.
3384 (the_low_target): Use arm_arch_setup.
3386 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3388 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3389 the main thread again.
3391 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3393 Adding Neutrino gdbserver.
3394 * configure: Regenerated.
3395 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3396 * configure.srv (i[34567]86-*-nto*): New target.
3397 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3398 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3399 (nto_comctrl) [__QNX__]: New function.
3400 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3402 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
3404 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3407 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3408 Pedro Alves <pedro@codesourcery.com>
3410 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3411 don't support CONTEXT_EXTENDED_REGISTERS.
3412 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3413 (the_low_target): Install them.
3414 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3415 failing with ERROR_PIPE_NOT_CONNECTED.
3417 2009-06-30 Doug Evans <dje@google.com>
3418 Pierre Muller <muller@ics.u-strasbg.fr>
3420 Add h/w watchpoint support to x86-linux, win32-i386.
3421 * Makefile.in (SFILES): Add i386-low.c
3422 (i386_low_h): Define.
3423 (i386-low.o): Add dependencies.
3424 (linux-x86-low.o): Add i386-low.h dependency.
3425 (win32-i386-low.o): Ditto.
3426 * i386-low.c: New file.
3427 * i386-low.h: New file.
3428 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3429 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3430 * linux-low.c (linux_add_process): Initialize arch_private.
3431 (linux_remove_process): Free arch_private.
3432 (add_lwp): Initialize arch_private.
3433 (delete_lwp): Free arch_private.
3434 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3436 * linux-low.h (process_info_private): New member arch_private.
3437 (lwp_info): New member arch_private.
3438 (linux_target_ops): New members new_process, new_thread,
3440 (ptid_of): New macro.
3441 * linux-x86-low.c: Include stddef.h, i386-low.h.
3442 (arch_process_info): New struct.
3443 (arch_lwp_info): New struct.
3444 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3445 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3446 (i386_dr_low_get_status): New function.
3447 (x86_insert_point, x86_remove_point): New functions.
3448 (x86_stopped_by_watchpoint): New function.
3449 (x86_stopped_data_address): New function.
3450 (x86_linux_new_process, x86_linux_new_thread): New functions.
3451 (x86_linux_prepare_to_resume): New function.
3452 (the_low_target): Add entries for insert_point, remove_point,
3453 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3455 * server.c (debug_hw_points): New global.
3456 (monitor_show_help): Document set debug-hw-points.
3457 (handle_query): Process "set debug-hw-points".
3458 * server.h (debug_hw_points): Declare.
3459 (paddress): Declare.
3460 * utils.c (NUMCELLS, CELLSIZE): New macros.
3461 (get_sell, xsnprintf, paddress): New functions.
3462 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3463 remove_point, stopped_by_watchpoint, stopped_data_address.
3464 * win32-i386-low.c: Include i386-low.h.
3465 (debug_reg_state): Replaces dr.
3466 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3467 (i386_dr_low_get_status): New function.
3468 (i386_insert_point, i386_remove_point): New functions.
3469 (i386_stopped_by_watchpoint): New function.
3470 (i386_stopped_data_address): New function.
3471 (i386_initial_stuff): Update.
3472 (get_thread_context,set_thread_context,i386_thread_added): Update.
3473 (the_low_target): Add entries for insert_point,
3474 remove_point, stopped_by_watchpoint, stopped_data_address.
3475 * win32-low.c (win32_insert_watchpoint): New function.
3476 (win32_remove_watchpoint): New function.
3477 (win32_stopped_by_watchpoint): New function.
3478 (win32_stopped_data_address): New function.
3479 (win32_target_ops): Add entries for insert_watchpoint,
3480 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3481 * win32-low.h (win32_target_ops): New members insert_point,
3482 remove_point, stopped_by_watchpoint, stopped_data_address.
3484 2009-06-25 Pedro Alves <pedro@codesourcery.com>
3486 * server.c (process_serial_event): Re-return unsupported, not
3487 error, if the type isn't recognized. Re-allow supporting only
3488 insert or remove packets. Also call require_running for
3489 breakpoints. Add missing break statement to default case. Tidy.
3490 * target.h (struct target_ops): Rename insert_watchpoint to
3491 insert_point, and remove_watchpoint to remove_point.
3493 * linux-low.h (struct linux_target_ops): Likewise.
3494 * linux-low.c (linux_insert_watchpoint): Rename to ...
3495 (linux_insert_point): ... this. Adjust.
3496 (linux_remove_watchpoint): Rename to ...
3497 (linux_remove_point): ... this. Adjust.
3498 (linux_target_ops): Adjust.
3499 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3500 (cris_insert_point): ... this.
3501 (cris_remove_watchpoint): Rename to ...
3502 (cris_remove_point): ... this.
3503 (the_low_target): Adjust.
3505 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3507 * server.c (handle_v_kill): Pass signal_pid to
3508 kill_inferior if multi_process is zero.
3510 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3512 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3513 * target.h (target_ops): Comment for *_watchpoint to make it clear
3514 the functions can get types '0' and '1'.
3516 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3518 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3519 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3520 * regcache.c (get_regcache): Likewise.
3521 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3522 * win32-low.c (child_fetch_inferior_registers): Remove check for
3525 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3526 Pedro Alves <pedro@codesourcery.com>
3528 * target.h (struct target_ops) <supports_multi_process>: New
3530 (target_supports_multi_process): New.
3531 * server.c (handle_query): Even if GDB reports support, only
3532 enable multi-process if the target also supports it. Report
3533 multi-process support only if the target backend supports it.
3534 * linux-low.c (linux_supports_multi_process): New function.
3535 (linux_target_ops): Install it as target_supports_multi_process
3538 2009-05-24 Doug Evans <dje@google.com>
3540 Global renaming of find_thread_pid to find_thread_ptid.
3541 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3542 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3543 All callers updated.
3545 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3546 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3549 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3550 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3551 (linux_resume_one_lwp): Ditto.
3553 2009-05-23 Doug Evans <dje@google.com>
3555 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3556 from struct inferior_list_entry * to struct lwp_info *.
3557 All callers updated.
3559 2009-05-13 Doug Evans <dje@google.com>
3561 * linux-x86-low.c: Don't include assert.h.
3562 (x86_siginfo_fixup): Use fatal, not assert.
3563 (x86_arch_setup): Fix comment.
3565 2009-05-12 Doug Evans <dje@google.com>
3567 Biarch support for i386/amd64 gdbserver.
3568 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3569 Add linux-x86-low.c.
3570 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3571 (linux-x86-low.o): Add.
3572 * linux-x86-64-low.c: Delete.
3573 * linux-i386-low.c: Delete.
3574 * linux-x86-low.c: New file.
3575 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3577 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3579 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3580 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3581 (linux_child_pid_to_exec_file): New function.
3582 (elf_64_header_p, elf_64_file_p): New functions.
3583 (siginfo_fixup): New function.
3584 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3585 give target a chance to convert layout.
3586 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3587 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3589 2009-05-07 Doug Evans <dje@google.com>
3591 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3592 (regsets_store_inferior_registers): Ditto.
3594 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3598 * linux-low.c (must_set_ptrace_flags): Delete.
3599 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3601 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3602 `lwp->must_set_ptrace_flags' instead.
3603 (linux_wait_for_event_1): Set ptrace options here.
3604 (linux_wait_1): ... not here.
3606 2009-04-30 Doug Evans <dje@google.com>
3608 * inferiors.c (started_inferior_callback): New function.
3609 (attached_inferior_callback): New function.
3610 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3611 * server.c (print_started_pid, print_attached_pid): New functions.
3612 (detach_or_kill_for_exit): New function.
3613 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3614 * server.h (have_started_inferiors_p): Declare.
3615 (have_attached_inferiors_p): Declare.
3617 * inferiors.c (remove_process): Fix memory leak, free process.
3618 * linux-low.c (linux_remove_process): New function.
3619 (linux_kill): Call it instead of remove_process.
3620 (linux_detach, linux_wait_1): Ditto.
3622 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3624 * configure.srv: Add x86 Windows CE target.
3626 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3628 * inferiors.c (get_thread_process): Make global.
3629 * server.h (get_thread_process): Add prototype.
3630 * thread-db.c (find_one_thread): Use get_thread_process
3631 instead of current_process.
3632 (thread_db_get_tls_address): Do not crash if called when
3633 thread layer is not yet initialized.
3635 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3637 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3638 * spu-low.c (current_tid): Rename to ...
3639 (current_ptid): ... this.
3640 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3641 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3642 ptid_get_lwp (current_ptid) instead of current_tid.
3643 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3644 instead of current_tid. Use find_process_pid to verify pid
3645 argument is valid. Pass proper argument to remove_process.
3646 (spu_thread_alive): Compare current_ptid instead of current_tid.
3647 (spu_resume): Likewise.
3649 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3651 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3654 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3656 Implement the multiprocess extensions, and add linux multiprocess
3659 * server.h (ULONGEST): Declare.
3660 (struct ptid, ptid_t): New.
3661 (minus_one_ptid, null_ptid): Declare.
3662 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3663 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3664 (struct inferior_list_entry): Change `id' type from unsigned from
3666 (struct sym_cache, struct breakpoint, struct
3667 process_info_private): Forward declare.
3668 (struct process_info): Declare.
3669 (current_process): Declare.
3670 (all_processes): Declare.
3671 (initialize_inferiors): Declare.
3672 (add_thread): Adjust to use ptid_t.
3673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3674 (add_process, remove_process, find_thread_pid): Declare.
3675 (find_inferior_id): Adjust to use ptid_t.
3676 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3677 (multi_process): Declare.
3678 (push_event): Adjust to use ptid_t.
3679 (read_ptid, write_ptid): Declare.
3680 (prepare_resume_reply): Adjust to use ptid_t.
3681 (clear_symbol_cache): Declare.
3682 * inferiors.c (all_processes): New.
3683 (null_ptid, minus_one_ptid): New.
3684 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3685 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3686 (add_thread): Change unsigned long to ptid. Remove gdb_id
3688 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3689 (gdb_id_to_thread): Rename to ...
3690 (find_thread_pid): ... this. Change unsigned long to ptid.
3691 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3692 (loaded_dll, pull_pid_from_list): Adjust.
3693 (add_process, remove_process, find_process_pid)
3694 (get_thread_process, current_process, initialize_inferiors): New.
3695 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3696 (struct target_waitstatus) <related_pid>: Ditto.
3697 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3699 (struct target_ops) <join>: Add `pid' argument.
3700 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3701 (struct target_ops) <wait>: Add `ptid' field. Change return type
3703 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3704 (mywait): Add `ptid' argument. Change return type to ptid_t.
3705 (target_pid_to_str): Declare.
3706 * target.c (set_desired_inferior): Adjust to use ptids.
3707 (mywait): Add new `ptid' argument. Adjust.
3708 (target_pid_to_str): New.
3709 * mem-break.h (free_all_breakpoints): Declare.
3710 * mem-break.c (breakpoints): Delelete.
3711 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3712 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3713 to use per-process breakpoint list.
3714 (free_all_breakpoints): New.
3715 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3716 (symbol_cache, all_symbols_looked_up): Delete.
3718 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3720 (prepare_resume_reply): Change ptid argument's type from unsigned
3721 long to ptid_t. Adjust. Implement W;process and X;process.
3722 (free_sym_cache, clear_symbol_cache): New.
3723 (look_up_one_symbol): Adjust to per-process symbol cache. *
3724 * server.c (cont_thread, general_thread, step_thread): Change type
3727 (multi_process): New.
3728 (last_ptid): Change type to ptid_t.
3729 (struct vstop_notif) <ptid>: Change type to ptid_t.
3730 (queue_stop_reply, push_event): Change `ptid' argument's type to
3732 (discard_queued_stop_replies): Add `pid' argument.
3733 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3734 changes. Don't reference the `attached' global.
3735 (attach_inferior): Adjust to mywait interface changes.
3736 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3737 features. Handle and report "multiprocess+". Handle
3739 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3741 (handle_v_kill): New.
3742 (handle_v_stopped): Adjust to use target_pid_to_str.
3743 (handle_v_requests): Allow multiple attaches and runs when
3744 multiprocess extensions are in effect. Handle "vKill".
3745 (myresume): Adjust to use ptids.
3746 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3747 (handle_status): Adjust to discard_queued_stop_replies interface
3749 (first_thread_of, kill_inferior_callback)
3750 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3751 (main): Call initialize_inferiors. Adjust to use ptids, killing
3752 and detaching from all inferiors. Handle multiprocess packet
3754 * linux-low.h: Include gdb_proc_service.h.
3755 (struct process_info_private): New.
3756 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3757 <lwpid_of>: Use ptid_get_lwp.
3758 (get_lwp_thread): Adjust.
3759 (struct lwp_info): Add `dead' member.
3760 (find_lwp_pid): Declare.
3761 * linux-low.c (thread_db_active): Delete.
3762 (new_inferior): Adjust comment.
3763 (inferior_pid): Delete.
3764 (linux_add_process): New.
3765 (handle_extended_wait): Adjust.
3766 (add_lwp): Change unsigned long to ptid.
3767 (linux_create_inferior): Add process to processes table. Adjust
3768 to use ptids. Don't set new_inferior here.
3769 (linux_attach_lwp): Rename to ...
3770 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3771 it. Adjust to use ptids.
3772 (linux_attach_lwp): New.
3773 (linux_attach): Add process to processes table. Don't set
3775 (struct counter): New.
3776 (second_thread_of_pid_p, last_thread_of_process_p): New.
3777 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3779 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3780 processes. Remove process from process table.
3781 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3782 to multiple processes.
3783 (any_thread_of): New.
3784 (linux_detach): Add `pid' argument, and handle it. Remove process
3785 from processes table.
3786 (linux_join): Add `pid' argument. Handle it.
3787 (linux_thread_alive): Change unsighed long argument to ptid_t.
3788 Consider dead lwps as not being alive.
3789 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3790 threads we're not interested in.
3791 (same_lwp, find_lwp_pid): New.
3792 (linux_wait_for_lwp): Change `pid' argument's type from int to
3794 (linux_wait_for_event): Rename to ...
3795 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3796 from int to ptid_t. Adjust.
3797 (linux_wait_for_event): New.
3798 (linux_wait_1): Add `ptid' argument. Change return type to
3799 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3800 that exit from the process table.
3801 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3803 (mark_lwp_dead): New.
3804 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3805 stopping all threads, mark its main lwp as dead.
3806 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3808 (fetch_register, usr_store_inferior_registers)
3809 (regsets_fetch_inferior_registers)
3810 (regsets_store_inferior_registers, linux_read_memory)
3811 (linux_write_memory): Inline `inferior_pid'.
3812 (linux_look_up_symbols): Adjust to use per-process
3814 (linux_request_interrupt): Adjust to use ptids.
3815 (linux_read_auxv): Inline `inferior_pid'.
3816 (initialize_low): Don't reference thread_db_active.
3817 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3818 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3819 (ps_getpid): Return the pid of the current inferior.
3820 * thread-db.c (proc_handle, thread_agent): Delete.
3821 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3823 (find_one_thread): Change argument type to ptid_t. Adjust to
3825 (maybe_attach_thread): Adjust to per-process data and ptids.
3826 (thread_db_find_new_threads): Ditto.
3827 (thread_db_init): Ditto.
3828 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3829 processes table. Adjust to use ptids.
3830 (spu_kill, spu_detach): Adjust interface. Remove process from
3832 (spu_join, spu_thread_alive): Adjust interface.
3833 (spu_wait): Adjust interface. Remove process from processes
3834 table. Adjust to use ptids.
3835 * win32-low.c (current_inferior_tid): Delete.
3836 (current_inferior_ptid): New.
3837 (debug_event_ptid): New.
3838 (thread_rec): Take a ptid. Adjust.
3839 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3840 (child_delete_thread): Ditto.
3841 (do_initial_child_stuff): Add `attached' argument. Add process to
3843 (child_fetch_inferior_registers, child_store_inferior_registers):
3845 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3846 (win32_attach): Pass 1 to do_initial_child_stuff.
3847 (win32_kill): Adjust interface. Remove process from processes
3849 (win32_detach): Ditto.
3850 (win32_join): Adjust interface.
3851 (win32_thread_alive): Take a ptid.
3852 (win32_resume): Adjust to use ptids.
3853 (get_child_debug_event): Ditto.
3854 (win32_wait): Adjust interface. Remove exiting process from
3857 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3859 Non-stop mode support.
3861 * server.h (non_stop): Declare.
3862 (gdb_client_data, handler_func): Declare.
3863 (delete_file_handler, add_file_handler, start_event_loop):
3865 (handle_serial_event, handle_target_event, push_event)
3866 (putpkt_notif): Declare.
3867 * target.h (enum resume_kind): New.
3868 (struct thread_resume): Replace `step' field by `kind' field.
3869 (TARGET_WNOHANG): Define.
3870 (struct target_ops) <wait>: Add `options' argument.
3871 <supports_non_stop, async, start_non_stop>: New fields.
3872 (target_supports_non_stop, target_async): New.
3873 (start_non_stop): Declare.
3874 (mywait): Add `options' argument.
3875 * target.c (mywait): Add `options' argument. Print child exit
3877 (start_non_stop): New.
3878 * server.c (non_stop, own_buf, mem_buf): New globals.
3879 (struct vstop_notif): New.
3880 (notif_queue): New global.
3881 (queue_stop_reply, push_event, discard_queued_stop_replies)
3882 (send_next_stop_reply): New.
3883 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3885 (attach_inferior): In non-stop mode, don't wait for the target
3887 (handle_general_set): Handle QNonStop.
3888 (handle_query): When handling qC, return the current general
3889 thread, instead of the first thread of the list.
3890 (handle_query): If the backend supports non-stop mode, include
3891 QNonStop+ in the qSupported query response.
3892 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3894 (handle_v_attach, handle_v_run): Handle non-stop mode.
3895 (handle_v_stopped): New.
3896 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3897 (myresume): Adjust to use resume_kind. Handle non-stop.
3898 (queue_stop_reply_callback): New.
3899 (handle_status): Handle non-stop mode.
3900 (main): Clear non_stop flag on reconnection. Use the event-loop.
3901 Refactor serial protocol handling from here ...
3902 (process_serial_event): ... to this new function. When GDB
3903 selects any thread, select one here. In non-stop mode, wait until
3904 GDB acks all pending events before exiting.
3905 (handle_serial_event, handle_target_event): New.
3906 * remote-utils.c (remote_open): Install remote_desc in the event
3908 (remote_close): Remove remote_desc from the event loop.
3909 (putpkt_binary): Rename to...
3910 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3911 (putpkt_binary): New as wrapper around putpkt_binary_1.
3912 (putpkt_notif): New.
3913 (prepare_resume_reply): In non-stop mode, don't change the
3915 * event-loop.c: New.
3916 * Makefile.in (OBJ): Add event-loop.o.
3917 (event-loop.o): New rule.
3919 * linux-low.h (pid_of): Moved here.
3921 (get_lwp_thread): Use lwpid_of.
3922 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3923 * linux-low.c (pid_of): Delete.
3924 (inferior_pid): Use lwpid_of.
3925 (linux_event_pipe): New.
3926 (target_is_async_p): New.
3928 (handle_extended_wait): Use lwpid_of.
3929 (add_lwp): Don't set lwpid field.
3930 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3931 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3932 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3933 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3934 first. Adjust to linux_wait_for_event interface changes. Use
3936 (linux_detach): Don't delete the main lwp here.
3937 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3938 (status_pending_p): Don't consider explicitly suspended lwps.
3939 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3940 pointer. Add OPTIONS argument. Change return type to int. Use
3941 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3942 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3943 pointer. Add status pointer argument. Return a pid instead of a
3944 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3945 changes. In non-stop mode, don't switch to a random thread.
3946 (linux_wait): Rename to...
3947 (linux_wait_1): ... this. Add target_options argument, and handle
3948 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3949 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3950 clean exit and signal exit code. Don't stop all threads in
3951 non-stop mode. In all-stop mode, only stop all threads when
3952 reporting a stop to GDB. Handle explicit thread stop requests.
3953 (async_file_flush, async_file_mark): New.
3955 (send_sigstop): Use lwpid_of.
3956 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3957 interface changes. In non-stop mode, don't switch to a random
3959 (linux_resume_one_lwp): Use lwpid_of.
3960 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3961 (linux_resume_one_thread): ... this. Handle resume_stop. In
3962 non-stop mode, don't look for pending flag in all threads.
3963 (resume_status_pending_p): Don't consider explicitly suspended
3965 (my_waitpid): Reimplement. Emulate __WALL.
3966 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3968 (sigchld_handler, linux_supports_non_stop, linux_async)
3969 (linux_start_non_stop): New.
3970 (linux_target_ops): Register linux_supports_non_stop, linux_async
3971 and linux_start_non_stop.
3972 (initialize_low): Install SIGCHLD handler.
3973 * thread-db.c (thread_db_create_event, find_one_thread)
3974 (thread_db_get_tls_address): Use lwpid_of.
3975 * win32-low.c (win32_detach): Adjust to use resume_kind.
3976 (win32_wait): Add `options' argument.
3977 * spu-low.c (spu_resume): Adjust to use resume_kind.
3978 (spu_wait): Add `options' argument.
3980 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3982 Decouple target code from remote protocol.
3984 * target.h (enum target_waitkind): New.
3985 (struct target_waitstatus): New.
3986 (struct target_ops) <wait>: Return an unsigned long. Take a
3987 target_waitstatus pointer instead of a char pointer.
3989 * target.c (mywait): Change prototype to return an unsigned long.
3990 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3991 * server.h (thread_from_wait, old_thread_from_wait): Delete
3993 (prepare_resume_reply): Change prototype to take a
3995 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3996 (last_status, last_ptid): New.
3997 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3998 pid instead of a signal.
3999 (attach_inferior): Remove "status" and "signal" parameters.
4001 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4003 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4004 (handle_v_requests, myresume): Remove "status" and "signal"
4006 (handle_status): New.
4007 (main): Delete local `status'. Adjust.
4008 * remote-utils.c: Include target.h.
4009 (prepare_resume_reply): Change prototype to take a
4010 target_waitstatus. Adjust.
4012 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4014 * spu-low.c (spu_wait): Adjust.
4015 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4017 (win32_wait): Adjust.
4019 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4021 * target.h (struct thread_resume): Delete leave_stopped member.
4022 (struct target_ops): Add a `n' argument to the `resume' callback.
4023 * server.c (start_inferior): Adjust.
4024 (handle_v_cont, myresume): Adjust.
4025 * linux-low.c (check_removed_breakpoint): Adjust to resume
4026 interface change, and to removed leave_stopped field.
4027 (resume_ptr): Delete.
4028 (struct thread_resume_array): New.
4029 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4030 resume interface change.
4031 (linux_continue_one_thread, linux_queue_one_thread)
4032 (resume_status_pending_p): Check if the resume field is NULL
4033 instead of checking the leave_stopped member.
4034 (linux_resume): Adjust to the target resume interface change.
4035 * spu-low.c (spu_resume): Adjust to the target resume interface
4037 * win32-low.c (win32_detach, win32_resume): Ditto.
4039 2009-04-01 Pedro Alves <pedro@codesourcery.com>
4041 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4043 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4045 (linux_continue_one_thread): Only preserve the stepping flag if
4046 there's a pending breakpoint.
4048 2009-03-31 Pedro Alves <pedro@codesourcery.com>
4050 * server.c (main): After the inferior having exited, call
4051 remote_close before exiting gdbserver.
4053 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4055 Fix size of FPSCR in Power 7 processors.
4056 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4057 (PPC_FEATURE_HAS_DFP): New #define.
4058 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4061 2009-03-23 Pedro Alves <pedro@codesourcery.com>
4063 * server.c (handle_query) Whitespace and formatting.
4065 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4067 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4068 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4069 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4070 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4071 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4072 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4073 Makefile.in, configure.ac: Fix whitespace throughout.
4074 * configure: Regenerate.
4076 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4078 * inferiors.c (find_inferior): Make it safe for the callback
4079 function to delete the currently iterated inferior.
4081 2009-03-22 Pedro Alves <pedro@codesourcery.com>
4083 * Makefile.in (linuw_low_h): Move higher.
4084 (thread-db.o): Depend on $(linux_low_h).
4086 2009-03-17 Pedro Alves <pedro@codesourcery.com>
4088 Rename "process" to "lwp" throughout.
4090 * linux-low.c (all_processes): Rename to...
4091 (all_lwps): ... this.
4092 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4093 (add_process): Rename to ...
4094 (add_lwp): ... this. Adjust.
4095 (linux_create_inferior): Adjust.
4096 (linux_attach_lwp): Adjust.
4097 (linux_attach): Adjust.
4098 (linux_kill_one_process): Rename to ...
4099 (linux_kill_one_lwp): ... this. Adjust.
4100 (linux_kill): Adjust.
4101 (linux_detach_one_process): Rename to ...
4102 (linux_detach_one_lwp): ... this. Adjust.
4103 (linux_detach): Adjust.
4104 (check_removed_breakpoint): Adjust.
4105 (status_pending_p): Adjust.
4106 (linux_wait_for_process): Rename to ...
4107 (linux_wait_for_lwp): ... this. Adjust.
4108 (linux_wait_for_event): Adjust.
4109 (send_sigstop): Adjust.
4110 (wait_for_sigstop): Adjust.
4111 (stop_all_processes): Rename to ...
4112 (stop_all_lwps): ... this.
4113 (linux_resume_one_process): Rename to ...
4114 (linux_resume_one_lwp): ... this. Adjust.
4115 (linux_set_resume_request, linux_continue_one_thread)
4116 (linux_queue_one_thread, resume_status_pending_p)
4117 (usr_store_inferior_registers, regsets_store_inferior_registers)
4118 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4120 * linux-low.h (get_process): Rename to ...
4121 (get_lwp): ... this. Adjust.
4122 (get_thread_process): Rename to ...
4123 (get_thread_lwp): ... this. Adjust.
4124 (get_process_thread): Rename to ...
4125 (get_lwp_thread): ... this. Adjust.
4126 (struct process_info): Rename to ...
4127 (struct lwp_info): ... this.
4128 (all_processes): Rename to ...
4129 (all_lwps): ... this.
4130 * proc-service.c (ps_lgetregs): Adjust.
4131 * thread-db.c (thread_db_create_event, find_one_thread)
4132 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4134 2009-03-14 Pedro Alves <pedro@codesourcery.com>
4136 * server.c (handle_query): Handle "qAttached".
4138 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4140 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4141 GPLv3, update license URL.
4143 2009-03-01 Doug Evans <dje@google.com>
4145 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
4146 (server_h): Add gdb_signals.h.
4147 (signals.o): Update.
4148 * server.h (target_signal_from_host,target_signal_to_host_p)
4149 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4151 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4153 * remote-utils.c (getpkt): Also generate remote-debug
4154 information if noack_mode is set.
4156 2009-02-06 Pedro Alves <pedro@codesourcery.com>
4158 * server.c (handle_query): Report qXfer:siginfo:read and
4159 qXfer:siginfo:write as supported and handle them.
4160 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4161 * linux-low.c (linux_xfer_siginfo): New.
4162 (linux_target_ops): Set it.
4164 2009-01-26 Pedro Alves <pedro@codesourcery.com>
4166 * server.c (gdbserver_usage): Mention --remote-debug.
4167 (main): Accept '--remote-debug' switch.
4169 2009-01-18 Doug Evans <dje@google.com>
4171 * regcache.c (new_register_cache): No need to check result of xcalloc.
4172 * server.c (handle_search_memory): Back out calls to xmalloc,
4173 result is checked and error is returned to user upon failure.
4174 (handle_query): Ditto. Add more checks for result of malloc.
4175 (handle_v_cont): Check result of malloc, report error back to
4177 (handle_v_run): Ditto. Call freeargv.
4178 * server.h (freeargv): Declare.
4179 * utils.c (freeargv): New fn.
4181 2009-01-15 Doug Evans <dje@google.com>
4183 * gdbreplay.c (perror_with_name): Make arg const char *.
4184 * server.h (target_signal_to_name): Make return type const char *.
4185 * thread-db.c (thread_db_err_str): Make return type const char *.
4186 * utils.c (perror_with_name): Make arg const char *.
4188 2009-01-14 Pedro Alves <pedro@codesourcery.com>
4190 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4191 when handling a EXIT_PROCESS_DEBUG_EVENT.
4193 2009-01-06 Joel Brobecker <brobecker@adacore.com>
4195 * gdbreplay.c (gdbreplay_version): Update copyright year.
4196 * server.c (gdbserver_version): Likewise.
4198 2009-01-05 Doug Evans <dje@google.com>
4200 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
4201 (handle_extended_wait): Improve comment.
4203 2008-12-13 Doug Evans <dje@google.com>
4205 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4206 * server.h (ATTR_MALLOC): New macro.
4207 (xmalloc,xcalloc,xstrdup): Declare.
4208 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4209 * inferiors.c: Ditto.
4210 * linux-low.c: Ditto.
4211 * mem-break.c: Ditto.
4212 * regcache.c: Ditto.
4213 * remote-utils.c: Ditto.
4216 * win32-low.c: Ditto.
4218 2008-12-12 Doug Evans <dje@google.com>
4220 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4221 in debugging printf.
4223 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4225 2008-12-09 Doug Evans <dje@google.com>
4227 * linux-low.h (struct process_info): Delete member tid, unused.
4228 * thread-db.c (find_one_thread): Update.
4229 (maybe_attach_thread): Update.
4231 2008-12-02 Pedro Alves <pedro@codesourcery.com>
4233 * target.h (struct target_ops): Add qxfer_osdata member.
4234 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4236 (linux_qxfer_osdata): New functions.
4237 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4239 * server.c (handle_query): Handle "qXfer:osdata:read:".
4240 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4241 (buffer_xml_printf): New functions.
4242 * server.h (struct buffer): New.
4243 (buffer_grow_str, buffer_grow_str0): New macros.
4244 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4245 (buffer_xml_printf): Declare.
4247 2008-11-24 Doug Evans <dje@google.com>
4249 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4251 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4253 * server.c (handle_v_run): Always use the supplied argument list.
4255 2008-11-19 Bob Wilson <bob.wilson@acm.org>
4257 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4258 (xtensa_regmap_table): Add entry for scompare1.
4260 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4262 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4263 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4264 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4265 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4266 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4267 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4268 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4269 XML target descriptions.
4270 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4271 when inferior is running on an ISA 2.05 or later processor. Add
4272 special case to return offset for full 64-bit slot of FPSCR when
4275 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4277 * Makefile.in (SFILES, clean): Added sparc64 files.
4278 (reg-sparc64.o, reg-sparc64.c): New.
4279 * configure.srv (sparc*-*-linux*): New configuration.
4280 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4281 syscall arguments for SPARC.
4282 (regsets_store_inferior_registers): Likewise.
4283 * linux-sparc-low.c: New file.
4285 2008-10-21 Doug Evans <dje@google.com>
4287 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4288 (READLINE_DIR,READLINE_DEP): Delete.
4289 (INTERNAL_CFLAGS): Update.
4290 (LINTFLAGS): Update.
4292 2008-10-10 Pedro Alves <pedro@codesourcery.com>
4294 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4295 whole argv from the last run, not just argv[0].
4297 2008-09-08 Pedro Alves <pedro@codesourcery.com>
4299 * regcache.c (new_register_cache): Return NULL if the register
4300 cache size isn't known yet.
4301 (free_register_cache): Avoid dereferencing a NULL regcache.
4303 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4305 * configure.srv: Merge MIPS and MIPS64.
4307 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4309 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4311 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
4313 * Makefile.in: Add required vsx dependencies.
4315 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4316 Declare init_registers_powerpc_vsx32l.
4317 Declare init_registers_powerpc_vsx64l.
4318 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4319 (ppc_arch_setup): Check for VSX in hwcap.
4320 (ppc_fill_vsxregset): New function.
4321 (ppc_store_vsxregset): New function.
4322 Add new VSX entry in regset_info target_regsets.
4324 * configure.srv: Add new VSX dependencies.
4326 2008-08-12 Pedro Alves <pedro@codesourcery.com>
4328 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4329 (remote_open): Set or clear transport_is_reliable.
4330 (putpkt_binary): Don't expect acks in noack mode.
4331 (getpkt): Don't send ack/nac in noack mode.
4332 * server.c (handle_general_set): Handle QStartNoAckMode.
4333 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4335 (main): Reset noack_mode on every connection.
4336 * server.h (noack_mode): Declare.
4338 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4340 * Makefile.in (GDBREPLAY_OBS): New variable.
4341 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4343 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4344 Daniel Jacobowitz <dan@codesourcery.com>
4346 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4347 (usr_store_inferior_registers): Likewise.
4348 (regsets_store_inferior_registers): Likewise.
4350 2008-07-31 Rolf Jansen <rj@surtec.com>
4351 Pedro Alves <pedro@codesourcery.com>
4353 * configure.ac: Check for memmem declaration.
4354 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4355 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4356 (disable_packet_qfThreadInfo): Unconditionally compile.
4357 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4358 * configure, config.in: Regenerate.
4360 2008-07-28 Doug Kwan <dougkwan@google.com>
4362 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4363 (linux_write_memory): Remove declaration of errno.
4365 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4367 * linux-low.c (handle_extended_wait): Do not use "status"
4368 variable uninitialized.
4370 2008-07-07 Pedro Alves <pedro@codesourcery.com>
4372 * server.c (handle_v_attach): Inhibit reporting dll changes.
4374 2008-06-27 Pedro Alves <pedro@codesourcery.com>
4376 * remote-utils.c (prepare_resume_reply): If requested, don't
4377 output "thread:TID" in the T stop reply.
4379 * server.c (disable_packet_vCont, disable_packet_Tthread)
4380 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4381 (handle_query): If requested, disable support for qC, qfThreadInfo
4383 (handle_v_requests): If requested, disable support for vCont.
4384 (gdbserver_show_disableable): New.
4385 (main): Handle --disable-packet and --disable-packet=LIST.
4387 * server.h (disable_packet_vCont, disable_packet_Tthread)
4388 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4390 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4392 * server.c (gdbserver_usage): Mention --version.
4394 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4396 * Makefile.in (gdbreplay.o): New rule.
4398 2008-06-06 Joseph Myers <joseph@codesourcery.com>
4400 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4401 message, not gdbserver.
4403 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
4404 Nathan Sidwell <nathan@codesourcery.com>
4405 Joseph Myers <joseph@codesourcery.com>
4407 * acinclude.m4: Include ../../config/acx.m4.
4408 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4409 * configure, config.in: Regenerate.
4410 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4411 * server.c (gdbserver_version): Print PKGVERSION.
4412 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4413 (main): Adjust gdbserver_usage calls.
4414 * gdbreplay.c (version, host_name): Add declarations.
4415 (gdbreplay_version, gdbreplay_usage): New.
4416 (main): Accept --version and --help options.
4418 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4420 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4421 (arm_breakpoint_at): Handle Thumb.
4422 (the_low_target): Add comment.
4424 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4426 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4428 2008-05-09 Doug Evans <dje@google.com>
4430 * server.h (decode_search_memory_packet): Declare.
4431 * remote-utils.c (decode_search_memory_packet): New fn.
4432 * server.c (handle_search_memory_1): New fn.
4433 (handle_search_memory): New fn.
4434 (handle_query): Process qSearch:memory packets.
4436 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4438 * regcache.c (registers_length): Remove.
4439 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4440 full register packet.
4441 * regcache.h (registers_length): Remove prototype.
4442 * server.h (PBUFSIZ): Define to 16384.
4444 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4446 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4447 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4448 powerpc-64l.o, and powerpc-altivec64l.o.
4449 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4450 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4451 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4452 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4453 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4456 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4457 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4458 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4459 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4460 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4461 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4462 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4463 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4464 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4465 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4468 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4469 (init_registers_powerpc_32l): ... this new prototype.
4470 (init_registers_powerpc_32): Remove, replace by ...
4471 (init_registers_powerpc_altivec32l): ... this new prototype.
4472 (init_registers_powerpc_e500): Remove, replace by ...
4473 (init_registers_powerpc_e500l): ... this new prototype.
4474 (init_registers_ppc64): Remove, replace by ...
4475 (init_registers_powerpc_64l): ... this new prototype.
4476 (init_registers_powerpc_64): Remove, replace by ...
4477 (init_registers_powerpc_altivec64l): ... this new prototype.
4478 (ppc_num_regs): Set to 73.
4479 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4480 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4481 (ppc_cannot_store_register): Handle orig_r3 and trap.
4482 (ppc_arch_setup): Update init_registers_... calls.
4483 (ppc_fill_gregset): Handle orig_r3 and trap.
4485 * inferiors.c (clear_inferiors): Reset current_inferior.
4487 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
4489 * acinclude.m4: Add override.m4.
4490 * configure: Regenerate.
4492 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4494 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4495 initial call to init_register_ppc64.
4497 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4499 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4500 powerpc*-*-linux* case.
4501 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4503 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4505 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
4506 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
4508 * linux-ppc-low.c: Include <elf.h>.
4509 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4510 (ppc_hwcap): New global variable.
4511 (ppc_regmap): Remove __SPE__ #ifdef sections.
4512 (ppc_regmap_e500): New global variable.
4513 (ppc_cannot_store_register): Update __SPE__ special case.
4514 (ppc_get_hwcap): New function.
4515 (ppc_arch_setup): Use it to determine whether inferior supports
4516 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4517 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4518 Do not access registers if target does not support AltiVec.
4519 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4520 Do not access registers if target does not support SPE.
4521 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4523 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4525 * linux-low.c (disabled_regsets, num_regsets): New.
4526 (use_regsets_p): Delete.
4527 (linux_wait_for_process): Clear disabled_regsets.
4528 (regsets_fetch_inferior_registers): Check and set it.
4529 (regsets_store_inferior_registers): Likewise.
4530 (linux_fetch_registers, linux_store_registers): Do not use
4532 (initialize_low): Allocate disabled_regsets.
4534 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4536 * Makefile.in (LIBOBJS): New.
4538 (memmem.o): New rule.
4539 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4540 * configure: Regenerated.
4542 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4544 * server.c (handle_query): Never return "unsupported" for
4545 qXfer:features:read queries.
4547 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4549 * server.c (get_features_xml): Fix inverted condition.
4550 (handle_query): Always support qXfer:feature:read.
4552 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4554 * server.c (wrapper_argv): New.
4555 (start_inferior): Handle wrapper_argv. If set, expect an extra
4557 (gdbserver_usage): Document --wrapper.
4558 (main): Parse --wrapper.
4560 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4562 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4563 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4564 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4565 (ppc_set_pc): Likewise.
4566 (ppc_arch_setup): New function.
4567 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4568 of collect_register.
4569 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4571 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4573 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4574 instead of linux-ppc64-low.o.
4575 * linux-ppc64-low.c: Remove file.
4576 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4577 (linux-ppc64-low.o): Remove rule.
4579 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4580 (init_registers_powerpc_64): Likewise.
4581 (ppc_regmap): Conditionally define depending on __powerpc64__.
4582 (ppc_cannot_store_register): Do not special-case "fpscr" when
4583 compiled on __powerpc64__.
4584 (ppc_collect_ptrace_register): New function.
4585 (ppc_supply_ptrace_register): New function.
4586 (ppc_breakpoint): Change type to "unsigned int".
4587 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4588 (the_low_target): Conditionally provide initializers for the
4589 arch_setup member depending on __powerpc64__. Install
4590 collect_ptrace_register and supply_ptrace_register members.
4592 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4594 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4595 * server.c (gdbserver_xmltarget): Define.
4596 (get_features_xml): Use it to replace "target.xml" and arch_string.
4598 * configure.srv: Remove srv_xmltarget. Add XML files that were
4599 mentioned there to srv_xmlfiles instead. Remove conditional tests
4600 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4601 srv_xmlfiles and srv_regobj to include all possible choices.
4602 * configure.ac (srv_xmltarget): Remove.
4603 (srv_xmlfiles): Do not add "target.xml".
4604 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4605 checks for supplementary target information.
4606 * configure: Regenerate.
4607 * Makefile.in (XML_TARGET): Remove.
4608 (target.xml): Remove rule.
4609 (clean): Do not clean up target.xml.
4610 (.PRECIOUS): Do not mention target.xml.
4612 * target.h (struct target_ops): Remove arch_string member.
4613 * linux-low.c (linux_arch_string): Remove.
4614 (linux_target_ops): Remove arch_string initializer.
4615 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4616 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4617 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4618 * spu-low.c (spu_arch_string): Remove.
4619 (spu_target_ops): Remove arch_string initializer.
4620 * win32-low.c (win32_arch_string): Remove.
4621 (win32_target_ops): Remove arch_string initializer.
4622 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4623 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4624 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4626 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4628 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4629 by collect_ptrace_register and supply_ptrace_register hooks.
4630 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4631 instead of checking for the_low_target.left_pad_xfer.
4632 (usr_store_inferior_registers): Use collect_ptrace_register callback
4633 instead of checking for the_low_target.left_pad_xfer.
4635 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4636 (s390_supply_ptrace_register): Likewise.
4637 (s390_fill_gregset): Call s390_collect_ptrace_register.
4638 (the_low_target): Update.
4640 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4641 (ppc_supply_ptrace_register): Likewise.
4642 (the_low_target): Update.
4644 * linux-i386-low.c (the_low_target): Update.
4645 * linux-x86-64-low.c (the_low_target): Update.
4647 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4649 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4650 reg-s390.o and reg-s390x.o.
4652 * linux-low.c (new_inferior): New global variable.
4653 (linux_create_inferior, linux_attach): Set it.
4654 (linux_wait_for_process): Call the_low_target.arch_setup after the
4655 target has stopped for the first time.
4656 (initialize_low): Do not call the_low_target.arch_setup.
4658 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4659 (s390_set_pc): Likewise.
4660 (s390_arch_setup): New function.
4661 (the_low_target): Use s390_arch_setup as arch_setup routine.
4663 * regcache.c (realloc_register_cache): New function.
4664 (set_register_cache): Call it for each existing regcache.
4666 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4668 * server.h (init_registers): Remove prototype.
4670 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4671 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4672 instead of init_registers ().
4673 * linux-arm-low.c (init_registers_arm): Add prototype.
4674 (init_registers_arm_with_iwmmxt): Likewise.
4675 (the_low_target): Add initializer for arch_setup field.
4676 * linux-cris-low.c (init_registers_cris): Add prototype.
4677 (the_low_target): Add initializer for arch_setup field.
4678 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4679 (the_low_target): Add initializer for arch_setup field.
4680 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4681 (the_low_target): Add initializer for arch_setup field.
4682 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4683 (the_low_target): Add initializer for arch_setup field.
4684 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4685 (the_low_target): Add initializer for arch_setup field.
4686 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4687 (the_low_target): Add initializer for arch_setup field.
4688 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4689 (init_registers_mips64_linux): Likewise.
4690 (the_low_target): Add initializer for arch_setup field.
4691 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4692 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4693 (the_low_target): Add initializer for arch_setup field.
4694 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4695 (init_registers_powerpc_64): Likewise.
4696 (the_low_target): Add initializer for arch_setup field.
4697 * linux-s390-low.c (init_registers_s390): Add prototype.
4698 (init_registers_s390x): Likewise.
4699 (the_low_target): Add initializer for arch_setup field.
4700 * linux-sh-low.c (init_registers_sh): Add prototype.
4701 (the_low_target): Add initializer for arch_setup field.
4702 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4703 (the_low_target): Add initializer for arch_setup field.
4704 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4705 (the_low_target): Add initializer for arch_setup field.
4707 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4708 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4709 instead of init_registers ().
4710 * win32-arm-low.c (init_registers_arm): Add prototype.
4711 (the_low_target): Add initializer for arch_setup field.
4712 * win32-i386-low.c (init_registers_i386): Add prototype.
4713 (the_low_target): Add initializer for arch_setup field.
4715 * spu-low.c (init_registers_spu): Add prototype.
4716 (initialize_low): Call initialie_registers_spu () instead of
4717 initialize_registers ().
4719 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4721 * server.c (handle_v_requests): When handling the vRun and vAttach
4722 packets, if already debugging a process, don't kill it. Return an
4725 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4727 * server.c (handle_query): Correct length check.
4729 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4731 * win32-low.c (do_initial_child_stuff): Add process handle
4732 parameter. Set current_process_handle and current_process_id from the
4733 parameters. Clear globals.
4734 (win32_create_inferior): Don't set current_process_handle and
4735 current_process_id here. Instead pass them on the call to
4736 do_initial_child_stuff.
4737 (win32_attach): Likewise.
4738 (win32_clear_inferiors): New.
4739 (win32_kill): Don't close the current process handle or the
4740 current thread handle here. Instead call win32_clear_inferiors.
4741 (win32_detach): Don't open a new handle to the process. Call
4742 win32_clear_inferiors.
4743 (win32_join): Don't rely on current_process_handle; open a new
4744 handle using the process id.
4745 (win32_wait): Call win32_clear_inferiors when the inferior process
4748 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4750 * server.c (monitor_show_help): Add "exit".
4752 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4754 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4755 (clean): Add reg-xtensa.c.
4756 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4757 * configure.srv (xtensa*-*-linux*) New target.
4758 * linux-xtensa-low.c: New.
4759 * xtensa-xtregs.c: New.
4761 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4763 * hostio.c: Don't include errno.h.
4764 (errno_to_fileio_errno): Move to hostio-errno.
4765 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4766 error number outputting to the target->hostio_last_error callback.
4767 (hostio_packet_error): Use FILEIO_EINVAL directly.
4768 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4769 calls to hostio_error.
4770 * hostio-errno.c: New.
4771 * server.h (hostio_last_error_from_errno): Declare.
4772 * target.h (target_ops): Add hostio_last_error member.
4773 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4774 as hostio_last_error handler.
4775 * spu-low.c (spu_target_ops): Likewise.
4776 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4777 (wince_hostio_last_error): New functions.
4778 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4779 as hostio_last_error handler.
4780 (win32_target_ops) [!_WIN32_WCE]: Register
4781 hostio_last_error_from_errno as hostio_last_error handler.
4782 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4783 (hostio-errno.o): New rule.
4784 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4785 * configure.srv (srv_hostio_err_objs): New variable. Default to
4787 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4788 * configure: Regenerate.
4790 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4792 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4793 (linux_kill, linux_detach): Clean up the process list.
4794 * remote-utils.c (remote_open): Improve port number parsing.
4795 (putpkt_binary, input_interrupt): Only send interrupts if the target
4797 * server.c (extended_protocol): Make static.
4798 (attached): Define earlier.
4799 (exit_requested, response_needed, program_argv): New variables.
4800 (target_running): New.
4801 (start_inferior): Clear attached here.
4802 (attach_inferior): Set attached here.
4803 (require_running): Define.
4804 (handle_query): Use require_running and target_running. Implement
4806 (handle_v_attach, handle_v_run): New.
4807 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4808 (gdbserver_usage): Update.
4809 (main): Redo argument parsing. Handle --debug and --multi. Handle
4810 --attach along with other options or after the port. Save
4811 program_argv. Support no initial program. Resynchronize
4812 communication with GDB after an error. Handle "monitor exit".
4813 Use require_running and target_running. Always allow the extended
4814 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4815 restart in extended mode.
4816 * README: Refer to the GDB manual. Update --attach usage.
4818 2007-12-20 Andreas Schwab <schwab@suse.de>
4820 * linux-low.c (STACK_SIZE): Define.
4821 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4822 (linux_test_for_tracefork): Likewise.
4824 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4826 * linux-low.c (linux_wait_for_event): Update messages. Do not
4827 reinsert auto-delete breakpoints.
4828 * mem-break.c (struct breakpoint): Change return type of handler to
4830 (set_breakpoint_at): Update handler type.
4831 (reinsert_breakpoint_handler): Return 1 instead of calling
4833 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4835 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4836 * mem-break.h (set_breakpoint_at): Update handler type.
4837 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4838 * win32-low.c (auto_delete_breakpoint): New.
4839 (get_child_debug_event): Use it.
4841 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4843 * configure.ac: Check for pread and pwrite.
4844 * hostio.c (handle_pread): Fall back to lseek and read.
4845 (handle_pwrite): Fall back to lseek and write.
4846 * config.in, configure: Regenerated.
4848 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4850 * server.c (myresume): Add own_buf argument.
4851 (main): Update calls.
4853 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4855 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4856 * remote-utils.c (remote_open): Do not call disable_async_io.
4857 (block_async_io): Delete.
4858 (unblock_async_io): Make static.
4859 (initialize_async_io): New.
4860 * server.c (handle_v_cont): Handle async I/O here.
4861 (myresume): Likewise. Move other common resume tasks here...
4862 (main): ... from here. Call initialize_async_io. Disable async
4863 I/O before the main loop.
4864 * server.h (initialize_async_io): Declare.
4865 (block_async_io, unblock_async_io): Delete prototypes.
4866 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4868 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4870 * remote-utils.c (readchar): Allow binary data in received messages.
4872 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4874 * win32-low.c (attaching): New global.
4875 (win32_create_inferior): Clear the `attaching' global.
4876 (win32_attach): Set the `attaching' global.
4877 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4878 attaching. Only set a breakpoint at the entry point if not
4881 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4883 * server.c (main): Don't report dll events on the initial
4884 connection on attaches.
4886 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4888 * server.c (main): Relax numerical bases supported for the pid of
4889 the --attach command line argument.
4891 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4893 * win32-low.c (win32_attach): Call OpenProcess before
4894 DebugActiveProcess, not after. Add last error output to error
4897 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4899 * win32-low.c (win32_get_thread_context)
4900 (win32_set_thread_context): New functions.
4901 (thread_rec): Use win32_get_thread_context.
4902 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4903 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4906 2007-12-03 Leo Zayas
4907 Pedro Alves <pedro_alves@portugalmail.pt>
4909 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4911 (child_add_thread): Minor cleanup.
4912 (child_continue): Resume artificially suspended threads before
4913 calling ContinueDebugEvent.
4914 (suspend_one_thread): New.
4915 (fake_breakpoint_event): New.
4916 (get_child_debug_event): Change return type to int. Check here if
4917 gdb sent an interrupt request. If a soft interrupt was requested,
4918 fake a breakpoint event. Return 0 if there is no event to handle,
4920 (win32_wait): Don't check here if gdb sent an interrupt request.
4921 Ensure there is a valid event to handle.
4922 (win32_request_interrupt): Add soft interruption method as last
4925 2007-12-03 Leo Zayas
4926 Pedro Alves <pedro_alves@portugalmail.pt>
4928 * win32-low.h (win32_thread_info): Add descriptions to the
4929 structure members. Replace `suspend_count' counter by a
4931 * win32-low.c (thread_rec): Update condition of when to get the
4932 context from the inferior. Rely on ContextFlags being set if it
4933 has already been retrieved. Only suspend the inferior thread if
4934 we haven't already. Warn if that fails.
4935 (continue_one_thread): s/suspend_count/suspended/. Only call
4936 ResumeThread once. Warn if that fails.
4938 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4940 * win32-low.c (win32_wait): Don't read from the inferior when it
4943 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4945 * Makefile.in (win32_low_h): New variable.
4946 (win32-low.o): Add dependency on $(win32_low_h).
4947 (win32-arm-low.o, win32-i386-low.o): New rules.
4949 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4951 * hostio.c: Correct copyright year.
4953 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4955 * Makefile.in (OBS): Add hostio.o.
4956 (hostio.o): New rule.
4957 * server.h (handle_vFile): Declare.
4958 * hostio.c: New file.
4959 * server.c (handle_v_requests): Take packet_len and new_packet_len
4960 for binary packets. Call handle_vFile.
4961 (main): Update call to handle_v_requests.
4963 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4965 * linux-low.c: Include <sched.h>.
4967 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4969 * linux-low.c (linux_tracefork_grandchild): New.
4970 (linux_tracefork_child): Use clone.
4971 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4973 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4975 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4977 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4979 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4981 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4983 * inferiors.c (change_inferior_id): Delete.
4984 (add_pid_to_list, pull_pid_from_list): New.
4985 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4986 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4987 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4988 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4989 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4990 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4991 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4992 (using_threads): Always set to 1.
4993 (handle_extended_wait): New.
4994 (add_process): Do not set TID.
4995 (linux_create_inferior): Set must_set_ptrace_flags.
4996 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4997 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4998 (linux_thread_alive): Rename TID argument to LWPID.
4999 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5000 (linux_wait_for_event): Do not use TID or check using_threads. Update
5001 call to dead_thread_notify. Call handle_extended_wait.
5002 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5003 (send_sigstop): Delete sigstop_sent.
5004 (wait_for_sigstop): Avoid TID.
5005 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5006 (linux_test_for_tracefork): New.
5007 (linux_lookup_signals): Use thread_db_active and
5008 linux_supports_tracefork_flag.
5009 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5010 * linux-low.h (get_process_thread): Avoid TID.
5011 (struct process_ifo): Move thread_known and tid to the end. Remove
5013 (linux_attach_lwp, thread_db_init): Update prototypes.
5014 * server.h (change_inferior_id): Delete prototype.
5015 (add_pid_to_list, pull_pid_from_list): New prototypes.
5016 * thread-db.c (thread_db_use_events): New.
5017 (find_first_thread): Rename to...
5018 (find_one_thread): ...this. Update callers and messages. Do not
5019 call fatal. Check thread_db_use_events. Do not call
5020 change_inferior_id or new_thread_notify.
5021 (maybe_attach_thread): Update. Do not call new_thread_notify.
5022 (thread_db_init): Set thread_db_use_events. Check use_events.
5023 * utils.c (fatal, warning): Correct message prefix.
5025 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5027 * Makefile.in (clean): Remove new files.
5028 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5029 (powerpc-64.o, powerpc-64.c): New rules.
5030 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5031 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5033 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5035 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5036 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5037 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5038 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5039 (target_regsets): Add AltiVec and SPE register sets.
5040 * configure.ac: Check for AltiVec and SPE.
5041 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5042 (ppc_fill_vrregset, ppc_store_vrregset): New.
5043 (target_regsets): Add AltiVec register set.
5044 * configure: Regenerated.
5046 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5048 * linux-low.c (O_LARGEFILE): Define.
5049 (linux_read_memory): Use /proc/PID/mem.
5050 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5051 * configure, config.in: Regenerated.
5053 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5055 * linux-low.c (linux_wait_for_event): Do not pass signals while
5058 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5060 * win32-low.c (create_process): New.
5061 (win32_create_inferior): Use create_process instead of
5062 CreateProcess. If create_process failed retry appending an ".exe"
5063 suffix. Store the GetLastError result immediatelly after
5064 create_process calls and use it on the call to error.
5066 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5068 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5070 2007-08-23 Joel Brobecker <brobecker@adacore.com>
5072 * configure.ac: Switch license to GPLv3.
5074 2007-08-01 Michael Snyder <msnyder@access-company.com>
5076 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5078 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5080 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5082 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5083 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5084 CloseToolhelp32Snapshot.
5085 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5086 CloseToolhelp32Snapshot.
5088 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
5090 * server.c (main): Check for inferior exit before main loop.
5092 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5094 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5095 instead of on tmp_desc.
5097 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5098 Daniel Jacobowitz <dan@codesourcery.com>
5100 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5101 (add_thread): Minor cleanups.
5102 (clear_inferiors): Move lower in the file. Clear the DLL
5104 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5105 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5106 (xml_escape_text): New.
5107 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5109 (handle_v_cont): Report errors.
5110 (gdbserver_version): Update.
5111 (main): Correct size of own_buf. Do not report initial DLL events.
5112 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5113 (unloaded_dll, xml_escape_text): New.
5114 * win32-low.c (enum target_waitkind): Update comments.
5115 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5116 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5117 (win32_EnumProcessModules, win32_GetModuleInformation)
5118 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5119 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5120 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5121 (win32_Module32First, win32_Module32Next, load_toolhelp)
5122 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5123 (get_child_debug_event): Handle DLL events.
5124 (win32_wait): Likewise.
5126 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5128 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5129 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5131 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5133 * win32-low.c (handle_output_debug_string): Ignore event if not
5136 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5138 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5140 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5142 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5144 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5146 * inferiors.c (change_inferior_id): Add comment.
5147 * linux-low.c (check_removed_breakpoint): Add an early
5148 prototype. Improve debug output.
5149 (linux_attach): Doc update.
5150 (linux_detach_one_process, linux_detach): Clean up before releasing
5152 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5153 * linux-low.h (struct process_info): Doc improvement.
5154 * mem-break.c (delete_all_breakpoints): New.
5155 * mem-break.h (delete_all_breakpoints): New prototype.
5156 * thread-db.c (find_first_thread): New.
5157 (thread_db_create_event): Call it instead of
5158 thread_db_find_new_threads. Clean up unused variables.
5159 (maybe_attach_thread): Remove first thread handling.
5160 (thread_db_find_new_threads): Use find_first_thread.
5161 (thread_db_get_tls_address): Likewise.
5163 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5165 * thread-db.c (thread_db_find_new_threads): Add prototype.
5166 (thread_db_create_event): Check for the main thread before adding
5168 (maybe_attach_thread): Only enable event reporting if TID == 0.
5169 (thread_db_get_tls_address): Check for new threads.
5171 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5173 * linux-low.c (linux_create_inferior): Try execv before execvp.
5174 * spu-low.c (spu_create_inferior): Likewise.
5176 2007-06-13 Mike Frysinger <vapier@gentoo.org>
5178 * linux-low.c (linux_create_inferior): Change execv to execvp.
5179 * spu-low.c (spu_create_inferior): Likewies.
5181 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5183 * Makefile.in (clean): Clean new files instead of deleted ones.
5184 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5185 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5187 * configure.srv: Specify XML files and new regformats for MIPS and
5189 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5190 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5191 an entry for the restart register.
5192 (mips_cannot_fetch_register, mips_cannot_store_register)
5193 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5194 register names to match the XML descriptions.
5195 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5196 restart register instead of $0.
5198 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5199 Markus Deuling <deuling@de.ibm.com>
5201 * remote-utils.c (decode_xfer_write): New function.
5202 * server.h (decode_xfer_write): Add prototype.
5203 * server.c (handle_query): Add PACKET_LEN argument. Support
5204 qXfer:spu:read and qXfer:spu:write packets.
5205 (main): Pass packet_len to handle_query.
5206 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5207 * target.h (target_ops): Add qxfer_spu.
5209 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5211 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5212 accessing non-seekable spufs files.
5214 2007-05-16 Markus Deuling <deuling@de.ibm.com>
5216 * server.c (handle_query): Add reply for qC packet.
5218 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5219 Leo Zayas <lerele@champenstudios@com>
5221 * server.h (check_remote_input_interrupt_request): New function.
5222 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5223 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5224 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5225 (check_remote_input_interrupt_request): New function.
5226 * server.h (check_remote_input_interrupt_request): Declare.
5227 * win32-low.c (winapi_DebugBreakProcess,
5228 winapi_GenerateConsoleCtrlEvent): New typedefs.
5229 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5231 (win32_wait): Check for remote interrupt request
5232 with check_remote_input_interrupt_request.
5233 (win32_request_interrupt): New function.
5234 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5236 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5238 * win32-low.c (debug_registers_changed,
5239 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5240 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5241 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5242 (thread_rec): Get context using the low target.
5243 (child_add_thread): Call thread_added on the low target,
5244 which does the same thing.
5246 (do_initial_child_stuff): Remove debug registers references.
5247 Set context using the low target. Resume threads after
5248 setting the contexts.
5249 (child_continue): Remove dead variable. Remove debug
5250 registers references.
5251 (child_fetch_inferior_registers): Go through the low target.
5252 (do_child_store_inferior_registers): Remove.
5253 (child_store_inferior_registers): Go through the low target.
5254 (win32_resume): Remove debug registers references.
5255 Set context using the low target.
5256 (handle_exception): Change return type to void. Don't record
5257 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5258 first chance exception.
5259 (get_child_debug_event): Change return type to void. Remove
5260 goto loop. Always return after waiting for debug event.
5261 (win32_wait): Convert to switch statement. Handle spurious
5264 * win32-i386-low.c (debug_registers_changed,
5265 debug_registers_used): New.
5266 (initial_stuff): Rename to ...
5267 (i386_initial_stuff): ... this. Clear debug registers
5269 (store_debug_registers): Delete.
5270 (i386_get_thread_context): New.
5271 (load_debug_registers): Delete.
5272 (i386_set_thread_context): New.
5273 (i386_thread_added): New.
5274 (single_step): Rename to ...
5275 (i386_single_step): ... this.
5276 (do_fetch_inferior_registers): Rename to ...
5277 (i386_fetch_inferior_register): ... this.
5278 (i386_store_inferior_register): New.
5279 (the_low_target): Adapt to new interface.
5281 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5282 (arm_get_thread_context): New.
5283 (arm_set_thread_context): New.
5285 (do_fetch_inferior_registers): Rename to ...
5286 (arm_fetch_inferior_register): ... this.
5287 (arm_store_inferior_register): New.
5288 (arm_wince_breakpoint): Reimplement as unsigned long.
5289 (arm_wince_breakpoint_len): Define.
5290 (the_low_target): Adapt to new interface.
5292 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5293 load_debug_registers. Add get_thread_context, set_thread_context,
5294 thread_added and store_inferior_register. Rename
5295 fetch_inferior_registers to fetch_inferior_register.
5296 (regptr): Remove declaration.
5298 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5300 * linux-low.c (linux_detach): Change return type to int. Return 0.
5301 * spu-low.c (spu_detach): Likewise.
5303 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5305 * target.h (target_ops): Change return type of detach to int.
5307 (join_inferior): New.
5308 * server.c (main): Don't skip detach support on mingw32.
5309 If the inferior doesn't support detaching return error.
5310 Call join_inferior instead of using waitpid.
5311 * linux-low.c (linux_join): New.
5312 (linux_target_op): Add linux_join.
5313 * spu-low.c (spu_join): New.
5314 (spu_target_ops): Add spu_join.
5315 * win32-low.c (win32_detach): Adapt to new interface.
5316 Reopen current_process_handle before detaching. Issue a child
5317 resume before detaching.
5319 (win32_target_op): Add win32_join.
5321 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5323 * win32-low.c (win32-attach): Fix return value.
5324 * target.h (target_ops): Describe ATTACH return values.
5326 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5328 * win32-low.c (GETPROCADDRESS): Define.
5329 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5330 (winapi_DebugSetProcessKillOnExit): Likewise.
5331 (win32_create_inferior): Force usage of ansi CreateProcessA.
5332 (win32_attach): Use GETPROCADDRESS.
5333 (win32_detach): Likewise.
5335 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5337 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5339 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5341 * win32-low.c: Commit leftover changes from 2007-03-29.
5343 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5345 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5346 fields short instead of int. Add explicit padding.
5347 (i387_cache_to_fsave): Remove unnecessary casts.
5348 (i387_fsave_to_cache): Doc fix.
5349 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5351 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5353 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5354 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5356 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5358 * configure.srv (arm*-*-mingw32ce*): Move near the other
5361 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5363 * configure.ac: Add errno checking.
5364 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5365 sys/file.h and malloc.h.
5366 (AC_CHECK_DECLS): Add perror.
5367 (srv_mingwce): Handle.
5368 * configure.srv (i[34567]86-*-cygwin*): Add
5369 win32-i386-low.o to srv_tgtobj.
5370 (i[34567]86-*-mingw*): Likewise.
5371 (arm*-*-mingw32ce*): Add case.
5372 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5373 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5374 [__MINGW32CE__] (strerror): New function.
5375 [__MINGW32CE__] (errno): Define to GetLastError.
5376 [__MINGW32CE__] (COUNTOF): New macro.
5377 (remote_open): Remove extra close call.
5378 * mem-break.c (delete_breakpoint_at): New function.
5379 * mem-break.h (delete_breakpoint_at): Declare.
5380 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5381 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5382 [USE_WIN32API] (read, write): Add char* casts.
5383 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5384 * server.h: Include wincecompat.h on Windows CE.
5385 [HAVE_ERRNO_H]: Check.
5386 (perror): Declare if not declared.
5387 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5388 (perror_with_name): Remove errno declaration.
5389 * wincecompat.h: New.
5390 * wincecompat.c: New.
5392 * win32-arm-low.c: New.
5393 * win32-i386-low.c: New.
5394 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5395 (OUTMSG2): Make it safe.
5397 (COUNTOF): New macro.
5398 (NUM_REGS): Get it from the low target.
5399 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5400 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5401 (thread_rec): Let low target handle debug registers.
5402 (child_add_thread): Likewise.
5403 (child_init_thread_list): Likewise.
5404 (continue_one_thread): Likewise.
5406 (do_child_fetch_inferior_registers): Move to ...
5407 * win32-i386-low.c: ... here, and rename to ...
5408 (do_fetch_inferior_registers): ... this.
5409 * win32-low.c (child_fetch_inferior_registers):
5410 Go through the low target.
5411 (do_child_store_inferior_registers): Use regptr.
5412 (strwinerror): New function.
5413 (win32_create_inferior): Handle Windows CE.
5414 Use strwinerror instead of strerror on Windows error
5415 codes. Add program to the error output.
5416 Don't close the main thread handle on Windows CE.
5417 (win32_attach): Use coredll.dll on Windows CE.
5418 (win32_kill): Close current process and current
5420 (win32_detach): Use coredll.dll on Windows CE.
5421 (win32_resume): Let low target handle debug registers, and
5423 (handle_exception): Add/Remove initial breakpoint. Avoid
5424 non-existant WSTOPSIG on Windows CE.
5425 (win32_read_inferior_memory): Cast to remove warning.
5426 (win32_arch_string): Go through the low target.
5427 (initialize_low): Call set_breakpoint_data with the low
5428 target's breakpoint.
5429 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5430 FOP_REGNUM, mappings): Move to ...
5431 * win32-i386-low.c: ... here.
5432 * win32-low.c (win32_thread_info): Move to ...
5433 * win32-low.h: ... here.
5434 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5435 win32-arm-low.c and wincecompat.c.
5436 (all:): Add $EXEEXT.
5437 (install-only:): Likewise.
5438 (gdbserver:): Likewise.
5439 (gdbreplay:): Likewise.
5440 * config.in: Regenerate.
5441 * configure: Regenerate.
5443 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5445 * win32-low.c: Rename typedef thread_info to
5446 win32_thread_info throughout.
5448 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5450 * win32-i386-low.c: Rename to ...
5451 * win32-low.c: ... this.
5452 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5453 * Makefile.in: Likewise.
5455 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5457 * remote-utils.c (monitor_output): Constify msg parameter.
5458 * server.h (monitor_output): Likewise.
5459 * win32-i386-low.c (handle_output_debug_string): New.
5460 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5461 handle_output_debug_string.
5462 (get_child_debug_event): Likewise.
5464 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5466 * server.c (main): Correct strtoul check.
5468 2007-03-27 Jon Ringle <jon@ringle.org>
5470 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5472 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5474 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5476 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5478 * terminal.h: Check HAVE_SGTTY_H.
5480 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
5482 * remote-utils.c (remote_open): Print out the assigned port number.
5484 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5486 * remote-utils.c (monitor_output): New function.
5487 * server.c (debug_threads): Define here.
5488 (monitor_show_help): New function.
5489 (handle_query): Handle qRcmd.
5490 (main): Do not handle 'd' packet.
5491 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5492 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5495 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5497 * Makefile.in (EXEEXT): New.
5498 (clean): Use $(EXEEXT).
5500 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5502 * target.h (target_ops): Rename send_signal to request_interrupt,
5503 and remove enum target_signal parameter.
5504 * linux-low.c (linux_request_interrupt): Rename from
5505 linux_send_signal, and always send SIGINT.
5506 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5507 and always send SIGINT.
5508 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5510 (input_interrupt): Likewise.
5512 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5514 * server.c (get_features_xml): Check if target implemented
5516 * win32-i386-low.c (win32_arch_string): New.
5517 (win32_target_ops): Add win32_arch_string as arch_string member.
5519 2007-02-22 Markus Deuling <deuling@de.ibm.com>
5521 * spu-low.c (spu_arch_string): New.
5522 (spu_target_ops): Add spu_arch_string.
5524 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5526 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5527 * configure.ac: Do not check for terminal.h.
5528 * configure, config.in: Regenerated.
5530 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5532 * Makefile.in (OBS): Add $(XML_BUILTIN).
5533 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5535 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5536 (arm-with-iwmmxt.c): New.
5537 * config.in, configure: Regenerate.
5538 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5539 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5540 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5541 (arm*-*-linux*): Add iWMMXt and regset support.
5542 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5543 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5544 (arm_store_wmmxregset, target_regsets): New.
5545 * server.c (get_features_xml): Take annex argument. Check builtin
5547 (handle_query): Handle multiple annexes.
5549 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5551 * remote-utils.c [USE_WIN32API] (read, write): Define.
5552 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5555 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5557 * linux-i386-low.c (the_low_target): Set arch_string.
5558 * linux-x86-64-low.c (the_low_target): Likewise.
5559 * linux-low.c (linux_arch_string): New.
5560 (linux_target_ops): Add it.
5561 * linux-low.h (struct linux_target_ops): Add arch_string.
5562 * server.c (write_qxfer_response): Use const void * for DATA.
5563 (get_features_xml): New.
5564 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5565 * target.h (struct target_ops): Add arch_string method.
5567 2007-01-03 Denis Pilat <denis.pilat@st.com>
5568 Daniel Jacobowitz <dan@codesourcery.com>
5570 * linux-low.c (linux_kill): Handle being called with no threads.
5571 * win32-i386-low.c (win32_kill): Likewise.
5572 (get_child_debug_event): Clear current_process_handle.
5574 2006-12-30 Denis PILAT <denis.pilat@st.com>
5575 Daniel Jacobowitz <dan@codesourcery.com>
5577 * remote-utils.c (remote_open): Check the type of specified
5578 serial port devices before opening them.
5579 * server.c (main): Kill the inferior if an error occurs during
5580 the first remote_open.
5582 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5584 * README: Update supported targets.
5586 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5588 * Makefile.in (clean): Remove reg-mips64.c.
5589 (reg-mips64.c, reg-mips64.o): New rules.
5590 * configure.srv: Handle mips64. Include regset support for mips.
5591 * linux-mips-low.c (union mips_register): New.
5592 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5593 (mips_breakpoint, mips_breakpoint_at): Use int.
5594 (mips_collect_register, mips_supply_register)
5595 (mips_collect_register_32bit, mips_supply_register_32bit)
5596 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5597 (mips_store_fpregset, target_regsets): New.
5598 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5600 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5602 * configure.srv: Add target "spu*-*-*".
5603 * Makefile.in (clean): Remove reg-spu.c.
5604 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5605 * spu-low.c: New file.
5607 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5609 * configure.ac: Correct td_thr_tls_get_addr test.
5610 * configure: Regenerated.
5612 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5614 * linux-low.c (linux_wait_for_event): Reformat. Use the
5616 * remote-utils.c (decode_address_to_semicolon): New.
5617 * server.c (pass_signals, handle_general_set): New.
5618 (handle_query): Mention QPassSignals for qSupported.
5619 (main): Call handle_general_set.
5620 * server.h (pass_signals, decode_address_to_semicolon): New.
5622 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5624 * server.c (handle_query): Correct error handling for read_auxv.
5626 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5628 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5629 and srv_linux_thread_db to yes.
5630 * linux-s390-low.c (s390_fill_gregset): New function.
5631 (target_regsets): Define data structure.
5633 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5635 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5636 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5637 * config.in, configure: Regenerated.
5638 * inferiors.c (gdb_id_to_thread): New function.
5639 (gdb_id_to_thread_id): Use it.
5640 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5641 * linux-low.h (struct process_info): Add th member.
5642 (thread_db_get_tls_address): New prototype.
5643 * remote-utils.c (decode_address): Make non-static.
5644 * server.c (handle_query): Handle qGetTLSAddr.
5645 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5646 * target.h (struct target_ops): Add get_tls_address.
5647 * thread-db.c (maybe_attach_thread): Save the thread handle.
5648 (thread_db_get_tls_address): New.
5650 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5652 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5653 (linux_resume_one_process): Take a siginfo_t *. Update all
5654 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5655 (struct pending_signals): Add a siginfo_t.
5656 (linux_wait_for_process): Always set last_status.
5657 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5658 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5659 * linux-low.h (struct process_info): Add last_status.
5661 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5663 * remote-utils.c (try_rle): New function.
5664 (putpkt_binary): Use it.
5666 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5668 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5669 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5670 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5671 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5672 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5675 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5677 * server.c (terminal_fd): New variable.
5678 (old_foreground_pgrp): Likewise.
5679 (restore_old_foreground_pgrp): New function.
5680 (start_inferior): Record the terminal file descriptor in terminal_fd
5681 and its original foreground group in old_foreground_pgrp. Register
5682 restore_old_foreground_pgrp with atexit().
5684 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5686 * server.c (handle_query): Correct qPart to qXfer.
5688 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5690 * configure.ac: Check for more headers which are missing on
5691 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5692 * configure.srv: Add Cygwin and mingw32.
5693 * remote-utils.c: Don't include headers unconditionally which
5694 are missing on mingw32. Include <winsock.h> for mingw32.
5695 (remote_open): Adjust for mingw32 support. Flush
5696 standard error after writing to it.
5697 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5698 (unblock_async_io, enable_async_io, disable_async_io)
5699 (readchar, getpkt): Update for Winsock support.
5700 (prepare_resume_reply): Expect a protocol signal number.
5701 * server.c: Disable <sys/wait.h> on mingw32.
5702 (start_inferior): Adjust for mingw32 support. Flush
5703 standard error after writing to it.
5704 (attach_inferior): Likewise. Use protocol signal
5706 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5708 * win32-i386-low.c: New file.
5709 * Makefile.in (XM_CLIBS): Set.
5710 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5711 (win32-i386-low.o): New dependency rule.
5712 * linux-low.c (linux_wait): Use target signal numbers.
5713 * target.h (struct target_ops): Doc fix.
5714 * server.h (target_signal_to_name): New prototype.
5715 * gdbreplay.c: Don't include headers unconditionally which
5716 are missing on mingw32. Include <winsock.h> for mingw32.
5717 (remote_close, remote_open): Adjust for Winsock support.
5718 * configure, config.in: Regenerated.
5720 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5722 * server.c (decode_xfer_read, write_qxfer_response): New.
5723 (handle_query): Take a packet length argument. Handle
5724 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5725 the qSupported response.
5726 (main): Update call to handle_query.
5728 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5730 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5731 (putpkt_binary): Renamed from putpkt and adjusted for binary
5733 (putpkt): New wrapper for putpkt_binary.
5734 (readchar): Don't mask off the high bit.
5735 (decode_X_packet): New function.
5736 * server.c (main): Call putpkt_binary if a handler sets the packet
5737 length. Save the length of the incoming packet. Handle 'X'.
5738 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5740 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5742 * server.c (handle_query): Handle qSupported.
5744 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5746 * remote-utils.c (all_symbols_looked_up): New variable.
5747 (look_up_one_symbol): Check it.
5748 * server.h (look_up_one_symbol): New declaration.
5749 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5751 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5753 * Makefile.in (linux-arm-low.o): Update dependencies.
5754 * linux-arm-low.c: Include "gdb_proc_service.h".
5755 (PTRACE_GET_THREAD_AREA): Define.
5756 (ps_get_thread_area): New function.
5758 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5760 * configure.srv (m68k*-*-uclinux*): New target.
5761 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5762 (linux_resume_one_process): Remove extraneous cast.
5763 (linux_read_offsets): New.
5764 (linux_target_op): Add linux_read_offsets on mmuless systems.
5765 * server.c (handle_query): Add qOffsets logic.
5766 * target.h (struct target_ops): Add read_offsets.
5768 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5770 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5771 (PTRACE_GET_THREAD_AREA): Define.
5772 (ps_get_thread_area): New function.
5773 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5774 (linux-x86-64-low.o): Update.
5776 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5778 * configure.ac: Remove checks for prfpregset_t.
5779 * gdb_proc_service.h: New file.
5780 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5781 new "gdb_proc_service.h".
5782 * proc-service.c: Likewise.
5783 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5784 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5785 * Makefile.in (gdb_proc_service_h): Updated.
5786 * configure, config.in: Regenerated.
5788 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5790 * remote-utils.c (prepare_resume_reply): Move declaration
5791 of gdb_id_from_wait to the top of the block.
5793 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5795 * linux-low.c (regsets_store_inferior_registers): Read the regset
5796 from the target before filling it.
5798 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5800 * server.c (attach_inferior): Return SIGTRAP for a successful
5803 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5805 * Makefile.in (OBS): Add version.o.
5806 (STAGESTUFF): Delete.
5807 (version.o): Add dependencies.
5808 (version.c): Replace rule.
5809 (clean): Remove version.c.
5810 * server.c (gdbserver_version): New.
5811 (gdbserver_usage): Use printf.
5812 (main): Handle --version and --help.
5813 * server.h (version, host_name): Add declarations.
5815 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5827 * linux-x86-64-low.c:
5830 * linux-ppc64-low.c:
5839 * linux-crisv32-low.c:
5851 * gdbserver.1: Add (C) after Copyright. Update the FSF
5854 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5856 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5857 (arm_breakpoint_at): Recognize both breakpoints.
5858 (the_low_target): Use the correct breakpoint instruction.
5860 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5862 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5863 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5864 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5865 (the_low_target): Update.
5867 2005-10-25 Andreas Schwab <schwab@suse.de>
5869 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5871 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5872 (ia64_num_regs): Reduce to 462.
5874 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5876 * acinclude.m4: Correct quoting.
5877 * aclocal.m4: Regenerated.
5879 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5880 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5881 (thread_db_init): Call thread_db_err_str.
5882 * configure.ac: Check for TD_VERSION.
5883 * config.in, configure: Regenerated.
5885 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5887 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5889 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5891 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5892 is not available. Define HAVE_PTRACE_GETREGS if it is.
5893 * config.in, configure: Regenerated.
5894 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5895 * linux-i386-low.c, linux-m68k-low.c: Update to use
5896 HAVE_PTRACE_GETREGS.
5897 * linux-low.c (regsets_fetch_inferior_registers)
5898 (regsets_store_inferior_registers): Only return 0 if we processed
5900 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5901 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5903 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5905 * inferiors.c (struct thread_info): Add gdb_id.
5906 (add_thread): Add gdb_id argument.
5907 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5908 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5909 calls to add_thread.
5910 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5911 * server.c (handle_query): Use thread_to_gdb_id.
5912 (handle_v_cont, main): Use gdb_id_to_thread_id.
5913 * server.h (add_thread): Update prototype.
5914 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5917 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5919 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5920 left-padded registers.
5921 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5922 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5924 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5926 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5927 * configure: Regenerate.
5928 * config.in: Regenerate.
5929 * server.h (NEED_DECLARATION_STRERROR):
5930 Replace with !HAVE_DECL_STRERROR.
5932 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5934 * linux-low.c (linux_wait, linux_send_signal): Don't test
5935 an unsigned long variable for > 0 if it could be MAX_ULONG.
5936 * server.c (myresume): Likewise.
5937 * target.c (set_desired_inferior): Likewise.
5939 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5941 * configure.ac: Simplify and improve check for socklen_t.
5942 * configure, config.in: Regenerate.
5944 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5946 * acconfig.h: Remove.
5947 * configure.ac: Add a test for socklen_t. Use three-argument
5948 AC_DEFINE throughout.
5949 * config.in: Regenerated using autoheader 2.59.
5950 * configure: Regenerated.
5952 * gdbreplay.c (socklen_t): Provide a default.
5953 (remote_open): Use socklen_t.
5954 * remote-utils.c (socklen_t): Provide a default.
5955 (remote_open): Use socklen_t.
5956 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5959 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5961 * linux-low.c (linux_read_memory, linux_write_memory)
5962 (linux_read_auxv): Likewise.
5963 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5964 (check_mem_write): Likewise.
5965 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5967 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5968 (registers_from_string, register_data): Likewise.
5969 * server.c (handle_query, main): Likewise.
5970 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5971 (decode_M_packet): Likewise.
5972 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5973 * target.h (struct target_ops): Update read_memory, write_memory,
5975 (read_inferior_memory, write_inferior_memory): Update.
5976 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5978 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5979 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5980 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5981 linux-s390-low.c, linux-sh-low.c: Update for changes in
5982 read_inferior_memory and the_low_target->breakpoint.
5984 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5986 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5987 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5988 * configure.srv: Add powerpc64-*-linux*.
5989 * linux-ppc64-low.c: New file.
5991 2005-05-23 Orjan Friberg <orjanf@axis.com>
5993 * linux-cris-low.c: New file with support for CRIS.
5994 * linux-crisv32-low.c: Ditto for CRISv32.
5995 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5996 (clean): Add reg-cris.c and reg-crisv32.c.
5997 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5998 reg-crisv32.o, and reg-crisv32.c to make rules.
5999 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6002 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6004 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6005 of sizeof (PTRACE_XFER_TYPE).
6006 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6008 2005-05-12 Orjan Friberg <orjanf@axis.com>
6010 * target.h (struct target_ops): Add insert_watchpoint,
6011 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6012 pointers for hardware watchpoint support.
6013 * linux-low.h (struct linux_target_ops): Ditto.
6014 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6015 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6016 to linux_target_ops.
6017 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6019 * server.c (main): Recognize 'Z' and 'z' packets.
6021 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6023 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6024 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6025 (the_low_target): Add new members.
6027 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6029 * proc-service.c (ps_lgetregs): Search all_processes instead of
6032 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6034 * server.c (start_inferior): Change return type to int.
6035 (attach_inferior): Change sigptr to int *.
6036 (handle_v_cont, handle_v_requests): Change signal to int *.
6037 (main): Change signal to int.
6039 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
6041 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6042 * configure.srv: Add m32r*-*-linux*.
6043 * linux-m32r-low.c: New file.
6045 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6047 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6049 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6051 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6052 Take unsigned long arguments for PIDs.
6053 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6054 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6055 (wait_for_sigstop, linux_resume_one_process)
6056 (regsets_fetch_inferior_registers, linux_send_signal)
6057 (linux_read_auxv): Likewise. Update the types of variables holding
6058 PIDs. Update format string specifiers.
6059 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6060 * remote-utils.c (prepare_resume_reply): Likewise.
6061 * server.c (cont_thread, general_thread, step_thread)
6062 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6064 (handle_query): Update format specifiers.
6065 (handle_v_cont, main): Use strtoul for thread IDs.
6066 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6067 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6068 (general_thread, step_thread, thread_from_wait)
6069 (old_thread_from_wait): Update.
6070 * target.h (struct thread_resume): Use unsigned long for THREAD.
6071 (struct target_ops): Use unsigned long for arguments to attach and
6074 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6076 * acinclude.m4: Include bfd/bfd.m4 directly.
6077 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6078 <agriffis@toolchain.org>.
6079 * aclocal.m4, configure: Regenerated.
6081 2005-01-07 Andrew Cagney <cagney@gnu.org>
6083 * configure.ac: Rename configure.in, require autoconf 2.59.
6084 * configure: Re-generate.
6086 2004-12-08 Daniel Jacobowitz <dan@debian.org>
6088 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6090 * aclocal.m4: Regenerated.
6091 * configure: Regenerated.
6093 2004-11-21 Andreas Schwab <schwab@suse.de>
6095 * linux-m68k-low.c (m68k_num_gregs): Define.
6096 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6097 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6098 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6099 (m68k_breakpoint_at): New. Add to the_low_target.
6101 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6102 srv_linux_thread_db to yes.
6104 2004-10-20 Joel Brobecker <brobecker@gnat.com>
6106 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6107 (ARCH_SET_FS): Likewise.
6108 (ARCH_GET_FS): Likewise.
6109 (ARCH_GET_GS): Likewise.
6111 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6113 * linux-i386-low.c (ps_get_thread_area): New.
6114 * linux-x86-64-low.c (ps_get_thread_area): New.
6115 * linux-low.c: Include <sys/syscall.h>.
6116 (linux_kill_one_process): Don't kill the first thread here.
6117 (linux_kill): Kill the first thread here.
6118 (kill_lwp): New function.
6119 (send_sigstop, linux_send_signal): Use it.
6120 * proc-service.c: Clean up #ifdefs.
6121 (fpregset_info): Delete.
6122 (ps_lgetregs): Update and enable implementation.
6123 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6125 * remote-utils.c (struct sym_cache, symbol_cache): New.
6126 (input_interrupt): Print a clearer message.
6127 (async_io_enabled): New variable.
6128 (enable_async_io, disable_async_io): Use it. Update comments.
6129 (look_up_one_symbol): Use the symbol cache.
6130 * thread-db.c (thread_db_look_up_symbols): New function.
6131 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6133 2004-10-16 Daniel Jacobowitz <dan@debian.org>
6135 * configure.in: Test for -rdynamic.
6136 * configure: Regenerated.
6137 * Makefile (INTERNAL_LDFLAGS): New.
6138 (gdbserver, gdbreplay): Use it.
6140 2004-09-02 Andrew Cagney <cagney@gnu.org>
6142 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6144 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
6146 * linux-low.c (linux_wait): Clear all_processes list also.
6148 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6150 * linux-low.c: Include <errno.h>. Remove extern declaration of
6153 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
6155 * gdbreplay.c, server.h, utils.c: Update copyright years.
6157 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6159 * server.c (main): Print child status or termination signal from
6160 variable 'signal', not 'sig'.
6162 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6164 * linux-low.c (linux_read_memory): Change return type to
6165 int. Check for and return error from ptrace().
6166 * target.c (read_inferior_memory): Change return type to int. Pass
6167 back return status from the_target->read_memory().
6168 * target.h (struct target_ops): Adapt *read_memory() prototype.
6170 (read_inferior_memory): Adapt prototype.
6171 * server.c (main): Return an error packet if
6172 read_inferior_memory() returns an error.
6174 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
6176 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6177 Unify with other clean targets.
6179 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6181 * server.c (handle_v_cont): Call set_desired_inferior.
6183 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6185 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6187 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6189 * linux-low.c (linux_wait): Unblock async I/O.
6190 (linux_resume): Block and enable async I/O.
6191 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6192 * server.h (block_async_io, unblock_async_io): Add prototypes.
6194 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6196 * remote-utils.c (remote_open): Print a status notice after
6198 * server.c (attach_inferior): Print a status notice after
6201 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
6203 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6205 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
6207 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6209 * server.c, target.h: Update copyright years.
6211 2004-02-25 Roland McGrath <roland@redhat.com>
6213 * target.h (struct target_ops): New member `read_auxv'.
6214 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6215 * linux-low.c (linux_read_auxv): New function.
6216 (linux_target_ops): Initialize `read_auxv' member to that.
6218 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6220 Committed by Jim Blandy <jimb@redhat.com>.
6222 * linux-s390-low.c (s390_num_regs): Update.
6223 (s390_regmap): Remove control registers. Use __s390x__ predefine
6224 instead of GPR_SIZE to distiguish s390 and s390x targets.
6226 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
6228 * linux-low.c: Update copyright year.
6229 (check_removed_breakpoint): Clear pending_is_breakpoint.
6230 (linux_set_resume_request, linux_queue_one_thread)
6231 (resume_status_pending_p): New functions.
6232 (linux_continue_one_thread): Use process->resume.
6233 (linux_resume): Only resume threads if there are no pending events.
6234 * linux-low.h (struct process_info): Add resume request
6237 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
6239 * regcache.c (new_register_cache): Clear the allocated register
6240 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6242 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
6244 * linux-low.c (linux_resume): Take a struct thread_resume *
6246 (linux_wait): Update call.
6247 (resume_ptr): New static variable.
6248 (linux_continue_one_thread): Renamed from
6249 linux_continue_one_process. Use resume_ptr.
6250 (linux_resume): Use linux_continue_one_thread.
6251 * server.c (handle_v_cont, handle_v_requests): New functions.
6252 (myresume): New function.
6253 (main): Handle 'v' case.
6254 * target.h (struct thread_resume): New type.
6255 (struct target_ops): Change argument of "resume" to struct
6257 (myresume): Delete macro.
6259 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6261 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6262 (uninstall): Support DESTDIR.
6264 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6266 * configure.srv: Add xscale*linux copy of arm*linux entry.
6268 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
6270 * linux-arm-low.c (arm_reinsert_addr): New function.
6271 (the_low_target): Add arm_reinsert_addr.
6273 2003-07-08 Mark Kettenis <kettenis@gnu.org>
6275 * mem-break.c: Remove whitespace at end of file.
6277 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6279 * configure.in: Check whether we need to prototype strerror.
6280 * server.h: Optionally prototype strerror.
6281 * gdbreplay.c (perror_with_name): Use strerror.
6282 * linux-low.c (linux_attach_lwp): Use strerror.
6283 * utils.c (perror_with_name): Use strerror.
6284 * config.in, configure: Regenerated.
6286 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
6288 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6289 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6291 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
6293 * Makefile.in (SFILES): Update.
6294 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6295 low-sun3.c: Remove files.
6297 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
6299 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6300 (linux_detach_one_process, linux_detach): New functions.
6301 (linux_target_ops): Add linux_detach.
6302 * server.c (main): Handle 'D' packet.
6303 * target.h (struct target_ops): Add "detach" member.
6304 (detach_inferior): Define.
6306 2003-06-13 Mark Kettenis <kettenis@gnu.org>
6308 From Kelley Cook <kelleycook@wideopenwest.com>:
6309 * configure.srv: Accept i[34567]86 variants.
6311 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
6313 * linux-low.c (linux_wait_for_event): Correct comment typos.
6314 (linux_resume_one_process): Call check_removed_breakpoint.
6315 (linux_send_signal): New function.
6316 (linux_target_ops): Add linux_send_signal.
6317 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6319 * target.h (struct target_ops): Add send_signal.
6321 2003-05-29 Jim Blandy <jimb@redhat.com>
6323 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6324 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6325 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6326 away part of the register's value.
6328 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
6330 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6331 (linux_wait_for_event, linux_init_signals): Likewise.
6333 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
6335 * configure.in: Check for stdlib.h.
6336 * configure: Regenerated.
6337 * config.in: Regenerated.
6339 2003-01-04 Andreas Schwab <schwab@suse.de>
6341 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6343 2003-01-02 Andrew Cagney <ac131313@redhat.com>
6345 * Makefile.in: Remove obsolete code.
6347 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
6349 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6350 defined(PT_FPR0_HI).
6352 2002-11-17 Stuart Hughes <seh@zee2.com>
6354 * linux-arm-low.c (arm_num_regs): Increase.
6355 (arm_regmap): Include status register.
6357 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
6359 * linux-low.c (register_addr): Remove incorrect -1 check.
6361 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
6363 * linux-low.c (linux_create_inferior): Call setpgid. Return
6365 (unstopped_p, linux_signal_pid): Remove.
6366 (linux_target_ops): Remove linux_signal_pid.
6367 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6368 global instead of target method.
6369 * target.h (struct target_ops): Remove signal_pid. Update comment
6370 for create_inferior.
6371 * server.c (signal_pid): New variable.
6372 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
6373 gdbserver. Set the child to be the foreground process group.
6374 (attach_inferior): Set signal_pid.
6376 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
6378 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6380 2002-08-20 Jim Blandy <jimb@redhat.com>
6382 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6385 2002-08-01 Andrew Cagney <cagney@redhat.com>
6387 * Makefile.in: Make chill references obsolete.
6389 2002-07-24 Kevin Buettner <kevinb@redhat.com>
6391 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6392 * configure: Regenerate.
6393 * config.in: Regenerate.
6395 2002-07-09 David O'Brien <obrien@FreeBSD.org>
6397 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6398 (perror_with_name, remote_close, remote_open, expect, play): Static.
6400 2002-07-04 Michal Ludvig <mludvig@suse.cz>
6402 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
6403 byte offsets instead of an array of indexes.
6404 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6406 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
6408 * regcache.c: Add comment.
6410 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
6412 * thread-db.c: New file.
6413 * proc-service.c: New file.
6414 * acinclude.m4: New file.
6415 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6416 proc-service.o, and thread-db.o.
6417 (linux-low.o): Add USE_THREAD_DB.
6418 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6419 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6420 * aclocal.m4: Regenerated.
6421 * config.in: Regenerated.
6422 * configure: Regenerated.
6423 * configure.in: Check for proc_service.h, sys/procfs.h,
6424 thread_db.h, and linux/elf.h headrs.
6425 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6426 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6427 Check for -lthread_db and thread support.
6428 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6429 PowerPC, and SuperH.
6430 * i387-fp.c: Constify arguments.
6431 * i387-fp.h: Likewise.
6432 * inferiors.c: (struct thread_info): Renamed from
6433 `struct inferior_info'. Remove PID member. Use generic inferior
6434 list header. All uses updated.
6435 (inferiors, signal_pid): Removed.
6436 (all_threads): New variable.
6437 (get_thread): Define.
6438 (add_inferior_to_list): New function.
6439 (for_each_inferior): New function.
6440 (change_inferior_id): New function.
6441 (add_inferior): Removed.
6442 (remove_inferior): New function.
6443 (add_thread): New function.
6444 (free_one_thread): New function.
6445 (remove_thread): New function.
6446 (clear_inferiors): Use for_each_inferior and free_one_thread.
6447 (find_inferior): New function.
6448 (find_inferior_id): New function.
6449 (inferior_target_data): Update argument type.
6450 (set_inferior_target_data): Likewise.
6451 (inferior_regcache_data): Likewise.
6452 (set_inferior_regcache_data): Likewise.
6453 * linux-low.c (linux_bp_reinsert): Remove.
6454 (all_processes, stopping_threads, using_thrads)
6455 (struct pending_signals, debug_threads, pid_of): New.
6456 (inferior_pid): Replace with macro.
6457 (struct inferior_linux_data): Remove.
6458 (get_stop_pc, add_process): New functions.
6459 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6460 Use add_process and add_thread.
6461 (linux_attach_lwp): New function, based on old linux_attach. Use
6462 add_process and add_thread. Set stop_expected for new threads.
6463 (linux_attach): New function.
6464 (linux_kill_one_process): New function.
6465 (linux_kill): Kill all LWPs.
6466 (linux_thread_alive): Use find_inferior_id.
6467 (check_removed_breakpoints, status_pending_p): New functions.
6468 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6469 Update. Use WNOHANG. Wait for cloned processes also. Update process
6470 struct for the found process.
6471 (linux_wait_for_event): New function.
6472 (linux_wait): Use it. Support LWPs.
6473 (send_sigstop, wait_for_sigstop, stop_all_processes)
6474 (linux_resume_one_process, linux_continue_one_process): New functions.
6475 (linux_resume): Support LWPs.
6476 (REGISTER_RAW_SIZE): Remove.
6477 (fetch_register): Use register_size instead. Call supply_register.
6478 (usr_store_inferior_registers): Likewise. Call collect_register.
6480 (regsets_fetch_inferior_registers): Improve error message.
6481 (regsets_store_inferior_registers): Add debugging.
6482 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6483 (unstopped_p, linux_signal_pid): New functions.
6484 (linux_target_ops): Add linux_signal_pid.
6485 (linux_init_signals): New function.
6486 (initialize_low): Call it. Initialize using_threads.
6487 * regcache.c (inferior_regcache_data): Add valid
6489 (get_regcache): Fetch registers lazily. Add fetch argument
6490 and update all callers.
6491 (regcache_invalidate_one, regcache_invalidate): New
6493 (new_register_cache): Renamed from create_register_cache.
6494 Return the new regcache.
6495 (free_register_cache): Change argument to a void *.
6496 (registers_to_string, registers_from_string): Call get_regcache
6497 with fetch flag set.
6498 (register_data): Make static. Pass fetch flag to get_regcache.
6499 (supply_register): Call get_regcache with fetch flag clear.
6500 (collect_register): Call get_regcache with fetch flag set.
6501 (collect_register_as_string): New function.
6502 * regcache.h: Update.
6503 * remote-utils.c (putpkt): Flush after debug output and use
6505 Handle input interrupts while waiting for an ACK.
6506 (input_interrupt): Use signal_pid method.
6507 (getpkt): Flush after debug output and use stderr.
6508 (outreg): Use collect_register_as_string.
6509 (new_thread_notify, dead_thread_notify): New functions.
6510 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6512 (look_up_one_symbol): Flush after debug output.
6513 * server.c (step_thread, server_waiting): New variables.
6514 (start_inferior): Don't use signal_pid. Update call to mywait.
6515 (attach_inferior): Update call to mywait.
6516 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6517 (main): Don't fetch/store registers explicitly. Use
6518 set_desired_inferior. Support proposed ``Hs'' packet. Update
6521 (struct inferior_list, struct_inferior_list_entry): New.
6522 * target.c (set_desired_inferior): New.
6523 (write_inferior_memory): Constify.
6524 (mywait): New function.
6526 (struct target_ops): New signal_pid method.
6527 (mywait): Removed macro, added prototype.
6529 * linux-low.h (regset_func): Removed.
6530 (regset_fill_func, regset_store_func): New.
6531 (enum regset_type): New.
6532 (struct regset_info): Add type field. Use new operation types.
6533 (struct linux_target_ops): stop_pc renamed to get_pc.
6534 Add decr_pc_after_break and breakpoint_at.
6535 (get_process, get_thread_proess, get_process_thread)
6536 (strut process_info, all_processes, linux_attach_lwp)
6537 (thread_db_init): New.
6539 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6540 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6541 (the_low_target): Add new members.
6542 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6543 (i386_store_fpxregset): Constify.
6544 (target_regsets): Add new kind identifier.
6545 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6546 (i386_set_pc): Add debugging.
6547 (i386_breakpoint_at): New function.
6548 (the_low_target): Add new members.
6549 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6550 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6551 (mips_breakpoint_at): New.
6552 (the_low_target): Add new members.
6553 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6554 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6555 (the_low_target): Add new members.
6556 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6557 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6558 (the_low_target): Add new members.
6559 * linux-x86-64-low.c (target_regsets): Add new kind
6562 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
6564 From Martin Pool <mbp@samba.org>:
6565 * server.c (gdbserver_usage): New function.
6568 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6570 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6573 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6575 * Makefile.in: Remove obsolete code.
6577 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6579 * linux-low.c (regsets_fetch_inferior_registers),
6580 (regsets_store_inferior_registers): Removed cast to int from
6582 * regcache.h: Added declaration of struct inferior_info.
6584 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6586 * inferiors.c (struct inferior_info): Add regcache_data.
6587 (add_inferior): Call create_register_cache.
6588 (clear_inferiors): Call free_register_cache.
6589 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6590 * regcache.c (struct inferior_regcache_data): New.
6591 (registers): Remove.
6592 (get_regcache): New function.
6593 (create_register_cache, free_register_cache): New functions.
6594 (set_register_cache): Don't initialize the register cache here.
6595 (registers_to_string, registers_from_string, register_data): Call
6597 * regcache.h: Add prototypes.
6598 * server.h: Likewise.
6600 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6602 * mem-break.c: New file.
6603 * mem-break.h: New file.
6604 * Makefile.in: Add mem-break.o rule; update server.h
6606 * inferiors.c (struct inferior_info): Add target_data
6608 (clear_inferiors): Free target_data member if set.
6609 (inferior_target_data, set_inferior_target_data): New functions.
6610 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6611 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6612 * linux-low.c (linux_bp_reinsert): New variable.
6613 (struct inferior_linux_data): New.
6614 (linux_create_inferior): Use set_inferior_target_data.
6615 (linux_attach): Likewise. Call add_inferior.
6616 (linux_wait_for_one_inferior): New function.
6617 (linux_wait): Call it.
6618 (linux_write_memory): Add const.
6619 (initialize_low): Call set_breakpoint_data.
6620 * linux-low.h (struct linux_target_ops): Add breakpoint
6622 * server.c (attach_inferior): Remove extra add_inferior
6624 * server.h: Include mem-break.h. Update inferior.c
6626 * target.c (read_inferior_memory)
6627 (write_inferior_memory): New functions.
6628 * target.h (read_inferior_memory)
6629 (write_inferior_memory): Change macros to prototypes.
6630 (struct target_ops): Update comments. Add const to write_memory
6633 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6635 * linux-low.c (usr_store_inferior_registers): Support
6636 registers which are allowed to fail to store.
6637 * linux-low.h (linux_target_ops): Likewise.
6638 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6639 (ppc_cannot_store_register): FPSCR may not be storable.
6641 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6643 * server.h: Include <string.h> if HAVE_STRING_H.
6644 * ChangeLog: Correct paths in last ChangeLog entry.
6646 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6648 * linux-low.h: Remove obsolete prototypes.
6649 (struct linux_target_ops): New.
6650 (extern the_low_target): New.
6651 * linux-low.c (num_regs, regmap): Remove declarations.
6652 (register_addr): Use the_low_target explicitly.
6653 (fetch_register): Likewise.
6654 (usr_fetch_inferior_registers): Likewise.
6655 (usr_store_inferior_registers): Likewise.
6656 * linux-arm-low.c (num_regs): Remove.
6657 (arm_num_regs): Define.
6658 (arm_regmap): Renamed from regmap, made static.
6659 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6661 (arm_cannot_store_register): Renamed from cannot_store_register,
6663 (the_low_target): New.
6664 * linux-i386-low.c (num_regs): Remove.
6665 (i386_num_regs): Define.
6666 (i386_regmap): Renamed from regmap, made static.
6667 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6669 (i386_cannot_store_register): Renamed from cannot_store_register,
6671 (the_low_target): New.
6672 * linux-ia64-low.c (num_regs): Remove.
6673 (ia64_num_regs): Define.
6674 (ia64_regmap): Renamed from regmap, made static.
6675 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6677 (ia64_cannot_store_register): Renamed from cannot_store_register,
6679 (the_low_target): New.
6680 * linux-m68k-low.c (num_regs): Remove.
6681 (m68k_num_regs): Define.
6682 (m68k_regmap): Renamed from regmap, made static.
6683 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6685 (m68k_cannot_store_register): Renamed from cannot_store_register,
6687 (the_low_target): New.
6688 * linux-mips-low.c (num_regs): Remove.
6689 (mips_num_regs): Define.
6690 (mips_regmap): Renamed from regmap, made static.
6691 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6693 (mips_cannot_store_register): Renamed from cannot_store_register,
6695 (the_low_target): New.
6696 * linux-ppc-low.c (num_regs): Remove.
6697 (ppc_num_regs): Define.
6698 (ppc_regmap): Renamed from regmap, made static.
6699 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6701 (ppc_cannot_store_register): Renamed from cannot_store_register,
6703 (the_low_target): New.
6704 * linux-s390-low.c (num_regs): Remove.
6705 (s390_num_regs): Define.
6706 (s390_regmap): Renamed from regmap, made static.
6707 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6709 (s390_cannot_store_register): Renamed from cannot_store_register,
6711 (the_low_target): New.
6712 * linux-sh-low.c (num_regs): Remove.
6713 (sh_num_regs): Define.
6714 (sh_regmap): Renamed from regmap, made static.
6715 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6717 (sh_cannot_store_register): Renamed from cannot_store_register,
6719 (the_low_target): New.
6720 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6721 (the_low_target): New.
6723 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6725 * Makefile.in: Add stamp-h target.
6726 * configure.in: Create stamp-h.
6727 * configure: Regenerated.
6729 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6731 * inferiors.c: New file.
6732 * target.c: New file.
6733 * target.h: New file.
6734 * Makefile.in: Add target.o and inferiors.o. Update
6736 * linux-low.c (inferior_pid): New static variable,
6737 moved from server.c.
6738 (linux_create_inferior): Renamed from create_inferior.
6739 Call add_inferior. Return 0 on success instead of a PID.
6740 (linux_attach): Renamed from myattach.
6741 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6742 (linux_thread_alive): Renamed from mythread_alive.
6743 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6745 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6746 (regsets_store_inferior_registers): Correct error message.
6747 Add missing ``return 0''.
6748 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6749 (linux_store_registers): Renamed from store_inferior_registers.
6750 (linux_read_memory): Renamed from read_inferior_memory.
6751 (linux_write_memory): Renamed from write_inferior_memory.
6752 (linux_target_ops): New structure.
6753 (initialize_low): Call set_target_ops ().
6754 * remote-utils.c (unhexify): New function.
6755 (hexify): New function.
6756 (input_interrupt): Send signals to ``signal_pid''.
6757 * server.c (inferior_pid): Remove.
6758 (start_inferior): Update create_inferior call.
6759 (attach_inferior): Call add_inferior.
6760 (handle_query): New function.
6761 (main): Call handle_query for `q' packets.
6762 * server.h: Include "target.h". Remove obsolete prototypes.
6763 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6765 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6767 * Makefile.in: Add WARN_CFLAGS. Update configury
6769 * configure.in: Check for <string.h>
6770 * configure: Regenerate.
6771 * config.in: Regenerate.
6772 * gdbreplay.c: Include needed system headers.
6773 (remote_open): Remove strchr prototype.
6774 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6775 * regcache.c (supply_register): Change buf argument to const void *.
6776 (supply_register_by_name): Likewise.
6777 (collect_register): Change buf argument to void *.
6778 (collect_register_by_name): Likewise.
6779 * regcache.h: Add missing prototypes.
6780 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6781 * server.c (handle_query): New function.
6782 (attached): New static variable, moved out of main.
6783 (main): Quiet longjmp clobber warnings.
6784 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6785 * utils.c (error): Remove NORETURN.