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