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