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