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