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