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