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