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