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