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