]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7e947ad3
MR
12018-05-22 Maciej W. Rozycki <macro@mips.com>
2
3 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
6 functions.
7 (the_low_target): Wire them.
8
1d75a658
PFC
92018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
10
11 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
12 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
13 mode. Call collect_register_by_name with vscr using
14 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
15 (ppc_store_vrregset): Add and set vscr_offset variable as in
16 ppc_fill_vrregset. Call supply_register_by_name with vscr using
17 vscr_offset.
18
d078308a
PFC
192018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
20
21 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
22 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
23 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
24
7273b5fc
PFC
252018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
26
27 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
28 (ppc_store_vsxregset): Likewise.
29 (ppc_fill_vrregset): Likewise.
30 (ppc_store_vrregset): Likewise.
31 (ppc_fill_evrregset): Likewise.
32 (ppc_store_evrregset): Likewise.
33 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
34 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
35 needed.
36
2e077f5e
PFC
372018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
38
39 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
40 wordsize of the inferior. Call ppc_linux_target_wordsize.
41
bd64614e
PFC
422018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
43
44 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
45 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
46 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
47 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
48 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
49 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
50 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
51 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
52 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
53 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
54 (tdesc_powerpc_e500l): Remove.
55 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
56 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
57 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
58 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
59 linux-ppc-tdesc.h.
60 (ppc_arch_setup): Remove target description matching code. Fill a
61 ppc_linux_features struct and call ppc_linux_match_description
62 with it.
63
75d74cca
MR
642018-05-22 Maciej W. Rozycki <macro@mips.com>
65
66 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
67 width of the requested register exceeds the width of the
68 `ptrace' data type.
69 (mips_cannot_store_register): Likewise.
70
e4439e43
MR
712018-05-21 Maciej W. Rozycki <macro@mips.com>
72
73 * linux-mips-low.c (mips_fetch_register): New function. Update
74 preceding comment.
75 (mips_store_gregset): Supply 0 rather than $restart for $zero.
76 (the_low_target): Wire `mips_fetch_register'.
77
55271bf9
JB
782018-05-10 Joel Brobecker <brobecker@adacore.com>
79
80 * lynx-i386-low.c (LYNXOS_178): New macro.
81 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
82 the layout on LynxOS-178.
83 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
84 handle floating point registers that are not supported by
85 LynxOS-178.
86
1a34f210
TT
872018-05-10 Tom Tromey <tom@tromey.com>
88
89 * configure: Rebuild.
90
190852c8
JB
912018-05-10 Joel Brobecker <brobecker@adacore.com>
92
93 PR server/23158:
94 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
95 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
96 Use it to set the expedite_regs field in the given tdesc.
97 * x86-tdesc.h: New file.
98 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
99 Adjust following the addition of the new expedite_regs parameter
100 to init_target_desc.
101 * linux-tic6x-low.c (tic6x_read_description): Likewise.
102 * linux-x86-tdesc.c: #include "x86-tdesc.h".
103 (i386_linux_read_description, amd64_linux_read_description):
104 Adjust following the addition of the new expedite_regs parameter
105 to init_target_desc.
106 * lynx-i386-low.c: #include "x86-tdesc.h".
107 (lynx_i386_arch_setup): Adjust following the addition of the new
108 expedite_regs parameter to init_target_desc.
109 * nto-x86-low.c: #include "x86-tdesc.h".
110 (nto_x86_arch_setup): Adjust following the addition of the new
111 expedite_regs parameter to init_target_desc.
112 * win32-i386-low.c: #include "x86-tdesc.h".
113 (i386_arch_setup): Adjust following the addition of the new
114 expedite_regs parameter to init_target_desc.
115
7dbac825
JB
1162018-05-10 Joel Brobecker <brobecker@adacore.com>
117
118 PR server/23158:
119 * win32-low.c (win32_create_inferior): Add call to my_wait
120 setting last_status global.
121
906994d9
JB
1222018-05-10 Joel Brobecker <brobecker@adacore.com>
123
124 PR server/23158:
125 * win32-low.c (create_process): Only call gdb_tilde_expand if
126 inferior_cwd is not NULL.
127
8ee22052
AB
1282018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
129
130 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
131 registers to the cache if their values have changed.
132 (i387_xsave_to_cache): Provide default values for x87 control
133 registers when these features are available, but disabled.
134 * regcache.c (supply_register_by_name_zeroed): New function.
135 * regcache.h (supply_register_by_name_zeroed): Declare new
136 function.
137
aff689d3
TT
1382018-05-07 Tom Tromey <tom@tromey.com>
139
140 * configure: Rebuild.
141
85e26832
TT
1422018-05-04 Tom Tromey <tom@tromey.com>
143
144 * configure: Rebuild.
145
a3b60e45
JK
1462018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
147 Pedro Alves <palves@redhat.com>
148
149 * linux-aarch64-low.c (aarch64_stopped_data_address):
150 Likewise.
151
632e107b
TT
1522018-04-27 Tom Tromey <tom@tromey.com>
153
154 * configure: Rebuild.
155
458412c3
TT
1562018-04-23 Tom Tromey <tom@tromey.com>
157
158 * configure: Rebuild.
159
f31c089e
SM
1602018-04-19 Simon Marchi <simon.marchi@ericsson.com>
161
162 * Makefile.in (depcomp): Add "..".
163 (all_deps_files): New and use it.
164
b319b098
AH
1652018-04-18 Alan Hayward <alan.hayward@arm.com>
166
167 * configure.srv (aarch64*-*-linux*): Don't include xml.
168 (i[34567]86-*-cygwin*): Likewise.
169 (i[34567]86-*-linux*): Likewise.
170 (i[34567]86-*-lynxos*): Likewise.
171 (i[34567]86-*-mingw32ce*): Likewise.
172 (i[34567]86-*-mingw*): Likewise.
173 (i[34567]86-*-nto*): Likewise.
174 (tic6x-*-uclinux): Likewise.
175 (x86_64-*-linux*): Likewise.
176 (x86_64-*-mingw*): Likewise.
177 (x86_64-*-cygwin*): Likewise.
178
3b74854b
AH
1792018-04-18 Alan Hayward <alan.hayward@arm.com>
180
181 * tdesc.c: Remove xml parameter.
182
e98577a9
AH
1832018-04-18 Alan Hayward <alan.hayward@arm.com>
184
185 * server.c (get_features_xml): Remove cast.
186 * tdesc.c (void target_desc::accept): Fill in function.
187 (tdesc_get_features_xml): Remove old xml creation.
188 (print_xml_feature::visit_pre): Add xml vistor.
189 * tdesc.h (struct target_desc): Make xmltarget mutable.
190 (tdesc_get_features_xml): Remove declaration.
191
d278f585
AH
1922018-04-18 Alan Hayward <alan.hayward@arm.com>
193
194 * tdesc.c (tdesc_architecture_name): Add new function.
195 (tdesc_osabi_name): Likewise.
196 (tdesc_get_features_xml): Use new functions.
197
eee8a18d
AH
1982018-04-18 Alan Hayward <alan.hayward@arm.com>
199
200 * tdesc.c (tdesc_create_flags): Remove.
201 (tdesc_add_flag): Likewise.
202 (tdesc_named_type): Likewise.
203 (tdesc_create_union): Likewise.
204 (tdesc_create_struct): Likewise.
205 (tdesc_create_vector): Likewise.
206 (tdesc_add_bitfield): Likewise.
207 (tdesc_add_field): Likewise.
208 (tdesc_set_struct_size): Likewise.
209
82ec9bc7
AH
2102018-04-18 Alan Hayward <alan.hayward@arm.com>
211
212 * tdesc.c (~target_desc): Remove implictly deleted items.
213 (init_target_desc): Iterate all features.
214 (tdesc_get_features_xml): Use vector.
215 (tdesc_create_feature): Create feature.
216 * tdesc.h (tdesc_feature) Remove
217 (target_desc): Add features.
218
ea3e7d71
AH
2192018-04-18 Alan Hayward <alan.hayward@arm.com>
220
221 * Makefile.in: Add common/tdesc.c
222 * tdesc.c (init_target_desc): init all reg_defs from register
223 vector.
224 (tdesc_create_reg): Create tdesc_reg.
225 * tdesc.h (tdesc_feature): Add register vector.
226
17d08cd4
SM
2272018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
228
229 * tdesc.h (struct target_desc) <features>: Change type to
230 std::vector<std::string>.
231 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
232 changes.
233 (tdesc_get_features_xml): Likewise.
234 (tdesc_create_feature): Likewise.
235
5cd3e386
AH
2362018-03-26 Alan Hayward <alan.hayward@arm.com>
237
238 * regcache.c (find_register_by_number): Return a ref.
239 (find_regno): Use references.
240 (register_size): Likewise.
241 (register_data): Likewise.
242 * tdesc.c (target_desc::~target_desc): Remove free calls.
243 (target_desc::operator==): Use std::vector compare.
244 (init_target_desc): Use reference.
245 (tdesc_create_reg): Use reg constructors.
246 * tdesc.h (struct target_desc): Replace pointer with object.
247
dff7492c
AH
2482018-03-23 Alan Hayward <alan.hayward@arm.com>
249
250 * regcache.c (find_register_by_number): Make static.
251 (find_regno): Use find_register_by_number
252 * regcache.h (struct reg): Remove declaration.
253
d80e5242
AH
2542018-03-23 Alan Hayward <alan.hayward@arm.com>
255
256 * tdesc.c (target_desc::~target_desc): Move to here.
257 (target_desc::operator==): Likewise.
258 * tdesc.h (target_desc::~target_desc): Move from here.
259 (target_desc::operator==): Likewise.
260
f69c5afb
AA
2612018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
262
263 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
264
ce29f843
AA
2652018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
266
267 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
268 S390_TDESC_GS.
269 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
270 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
271 and init_registers_s390_gs_linux64.
272
c49bd90b
AA
2732018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
274
275 * linux-s390-low.c (s390_fill_gs): Remove function.
276 (s390_fill_gsbc): Remove function.
277 (s390_regsets): Set fill functions for the guarded storage regsets
278 to NULL.
279
7edb9bd3
AA
2802018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
281
282 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
283 the word size. Add comment.
284 (s390_get_wordsize): New function.
285 (s390_arch_setup): No longer select a temporary tdesc to fetch the
286 pswm with it. Instead, use s390_get_wordsize to determine the
287 word size first and derive the correct tdesc from that directly.
288
39be3c7e
SM
2892018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
290
291 * Makefile.in: Include silent-rules.mk.
292 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
293 (COMPILE): Add ECHO_CXX.
294 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
295 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
296 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
297 (version-generated.c): Add ECHO_GEN.
298 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
299 (IPAGENT_COMPILE): Add ECHO_CXX.
300 (%-generated.c): Add ECHO_REGDAT.
301
3ae9ce5d
TT
3022018-03-14 Tom Tromey <tom@tromey.com>
303
304 PR cli/14977:
305 * ax.c (ax_printf): Special case for NULL.
306
e6a58aa8
SM
3072018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
308
309 * linux-low.c (linux_qxfer_libraries_svr4): Use
310 xml_escape_text_append.
311
f6e8a41e
SM
3122018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
313
314 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
315
b9671caf
SM
3162018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * server.c (handle_general_set): Remove unnecessary xstrdup.
319
e80aaf61
SM
3202018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
321
322 * server.c (parse_debug_format_options): Adjust to
323 delim_string_to_char_ptr_vec changes.
324 * thread-db.c (thread_db_load_search): Adjust to
325 dirnames_to_char_ptr_vec changes.
326
b1223e78
MM
3272018-03-01 Markus Metzger <markus.t.metzger@intel.com>
328
329 * target.h (target_enable_btrace, target_disable_btrace)
330 (target_read_btrace, target_read_btrace_conf): Turn macro into
331 inline function. Throw error if target method is not defined.
332 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
333 check for btrace target method. Be prepared to handle exceptions
334 from btrace target methods.
335
81561546
SDJ
3362018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
337
338 * server.c (captured_main): Change order of error message printed
339 when the current working directory cannot be found.
340
25e3c82c
SDJ
3412018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
342
343 * server.c: Include "filenames.h" and "pathstuff.h".
344 (program_name): Delete variable.
345 (program_path): New anonymous class.
346 (get_exec_wrapper): Use "program_path" instead of
347 "program_name".
348 (handle_v_run): Likewise.
349 (captured_main): Likewise.
350 (process_serial_event): Likewise.
351
b4987c95
SDJ
3522018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
353
354 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
355 (OBJS): Add "pathstuff.o".
356 * server.c (current_directory): New global variable.
357 (captured_main): Initialize "current_directory".
358
f46cd62a
AH
3592018-02-26 Alan Hayward <alan.hayward@arm.com>
360
361 * tdesc.c: Use common/tdesc.h.
362 * tdesc.h: Likewise.
363
a543c5ca
AH
3642018-02-20 Alan Hayward <alan.hayward@arm.com>
365 Simon Marchi <simon.marchi@ericsson.com>
366
367 * Makefile.in: Switch order of make rules.
368
b5884fa7
AH
3692018-02-19 Alan Hayward <alan.hayward@arm.com>
370
371 * Makefile.in: Add common directory in build.
372 * configure.ac: Add common reference.
373 * configure: Regenerate.
374
de6242d3
MM
3752018-02-09 Markus Metzger <markus.t.metzger@intel.com>
376
377 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
378 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
379 * spu-low.c (spu_target_ops): Likewise.
380 * win32-low.c (win32_target_ops): Likewise.
381 * server.c (supported_btrace_packets): Report packets unconditionally.
382 * target.h (target_ops) <supports_btrace>: Remove.
383 (target_supports_btrace): Remove.
384
9ee23a85
MM
3852018-02-09 Markus Metzger <markus.t.metzger@intel.com>
386
387 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
388 (handle_btrace_disable): Change return type to void. Use exceptions
389 to report errors.
390 (handle_btrace_general_set): Catch exception and copy message to
391 return message.
392
8ce47547
TT
3932018-02-08 Tom Tromey <tom@tromey.com>
394
395 * linux-low.c (install_software_single_step_breakpoints): Use
396 make_scoped_restore.
397 * inferiors.c (make_cleanup_restore_current_thread): Remove.
398 (do_restore_current_thread_cleanup): Remove.
399 * gdbthread.h (make_cleanup_restore_current_thread): Don't
400 declare.
401
45dd3607
TT
4022018-02-08 Tom Tromey <tom@tromey.com>
403
404 * mem-break.c (set_raw_breakpoint_at): Use
405 gdb::unique_xmalloc_ptr.
406
e671cd59
PA
4072018-01-30 Pedro Alves <palves@redhat.com>
408
409 PR gdb/13211
410 * target.c (target_terminal::terminal_state): Rename to ...
411 (target_terminal::m_terminal_state): ... this.
412
a0aad537
JC
4132018-01-19 James Clarke <jrtc27@jrtc27.com>
414
415 * linux-low.c (handle_extended_wait): Surround call to
416 thread_db_notice_clone with #ifdef USE_THREAD_DB.
417
4d9b86e1
SM
4182018-01-17 Simon Marchi <simon.marchi@ericsson.com>
419
420 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
421 linux_ptrace_attach_fail_reason_string now returning an
422 std::string.
423 (linux_attach): Likewise.
424 * thread-db.c (attach_thread): Likewise.
425
f517c180
EA
4262018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
427
428 PR gdb/21559
429 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
430 checking for fs_base/gs_base fields in struct user_regs_struct.
431 * configure: Regenerate.
432
9a70f35c
YQ
4332018-01-16 Yao Qi <yao.qi@linaro.org>
434
435 PR gdb/18749
436 * linux-low.c (fetch_register): Call supply_register instead of
437 error.
438
605fd3c6
YQ
4392018-01-08 Yao Qi <yao.qi@linaro.org>
440 Simon Marchi <simon.marchi@ericsson.com>
441
442 * Makefile.in (OBS): Remove selftest.o.
443 * configure.ac: Set srv_selftest_objs if $development is true.
444 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
445 * configure: Re-generated.
446 * server.c (captured_main): Wrap variable selftest_filter with
447 GDB_SELF_TEST.
448
2cc05030
SM
4492018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
450
451 * server.c (parse_debug_format_options): Return std::string.
452 (handle_monitor_command, captured_main): Adjust.
453
e379cee6
PA
4542018-01-05 Pedro Alves <palves@redhat.com>
455
456 PR gdb/18653
457 * server.c (captured_main): Pass quiet=false to
458 save_original_signals_state.
459
82e1e79a
JB
4602018-01-01 Joel Brobecker <brobecker@adacore.com>
461
462 * gdbreplay.c (gdbreplay_version): Update copyright year in
463 version message.
464 * server.c (gdbserver_version): Likewise.
465
8e481c3b
TT
4662017-12-08 Tom Tromey <tom@tromey.com>
467
468 * ax.c (ax_printf): Update.
469
a8806230
YQ
4702017-12-07 Yao Qi <yao.qi@linaro.org>
471
472 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
473 aarch64_linux_read_description.
474 * linux-amd64-ipa.c (idx2mask): New array.
475 (get_ipa_tdesc): Move idx2mask out.
476 (initialize_low_tracepoint): Initialize target descriptions.
477 * linux-i386-ipa.c (idx2mask): New array.
478 (get_ipa_tdesc): Move idx2mask out.
479 (initialize_low_tracepoint): Initialize target descriptions.
480
d4a0e8b5
SM
4812017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * tdesc.c (struct tdesc_type): Change return type.
484 (tdesc_add_flag): Change parameter type.
485 (tdesc_add_bitfield): Likewise.
486 (tdesc_add_field): Likewise.
487 (tdesc_set_struct_size): Likewise.
488
798a7429
SM
4892017-12-05 Simon Marchi <simon.marchi@ericsson.com>
490
491 * regcache.c (registers_to_string): Remove unused variable.
492
c0e15c9b
SM
4932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
494
495 * inferiors.c (for_each_inferior_with_data): Remove.
496 * inferiors.h (for_each_inferior_with_data): Remove.
497 * server.c (handle_qxfer_threads_worker): Change parameter type.
498 (handle_qxfer_threads_proper): Use for_each_thread.
499
f0045347
SM
5002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
501
502 * inferiors.c (for_each_inferior): Remove.
503 (clear_inferiors): Use for_each_thread.
504 * inferiors.h (for_each_inferior): Remove.
505 * linux-low.c (linux_wait_for_event_filtered): Use
506 for_each_thread.
507 (linux_stabilize_threads): Likewise.
508 * regcache.c (regcache_release): Likewise.
509 * server.c (gdb_wants_all_threads_stopped): Likewise.
510 (clear_pending_status_callback): Remove.
511 (handle_status): Use for_each_thread.
512 (captured_main): Likewise.
513 * win32-low.c (child_init_thread_list): Likewise.
514 (win32_clear_inferiors): Likewise.
515 (fake_breakpoint_event): Likewise.
516
9521758b
SM
5172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
518
519 * inferiors.h (find_inferior): Remove.
520 * inferiors.c (find_inferior): Remove.
521
8f86d7aa
SM
5222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
523
524 * linux-low.c (resume_status_pending_p): Update comment.
525 (need_step_over_p): Update comment.
526
e2b44075
SM
5272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * linux-low.c (proceed_one_lwp): Return void, change parameter
530 type.
531 (unsuspend_and_proceed_one_lwp): Likewise.
532 (proceed_all_lwps): Use for_each_thread.
533 (unstop_all_lwps): Likewise.
534
c80825ff
SM
5352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
536
537 * linux-low.c (linux_resume_one_thread): Return void, take
538 parameter directly.
539 (linux_resume): Use for_each_thread.
540
df3e4dbe
SM
5412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * linux-low.c (send_sigstop_callback): Return void, change
544 parameter type. Rename to...
545 (send_sigstop): ... this.
546 (suspend_and_send_sigstop_callback): Return void, change parameter
547 type. Rename to...
548 (suspend_and_send_sigstop): ... this.
549 (stop_all_lwps): Use for_each_thread.
550
5a6b0a41
SM
5512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
552
553 * linux-low.c (lwp_running): Return bool, remove unused
554 argument.
555 (linux_stabilize_threads): Use find_thread.
556
39a64da5
SM
5572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
558
559 * linux-low.c (select_singlestep_lwp_callback): Remove.
560 (count_events_callback): Remove.
561 (select_event_lwp_callback): Remove.
562 (select_event_lwp): Use find_thread/for_each_thread.
563
a1385b7b
SM
5642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
565
566 * linux-low.c (not_stopped_callback): Return bool, take filter
567 argument directly.
568 (linux_wait_for_event_filtered): Use find_thread.
569 (linux_wait_1): Likewise.
570
454296a2
SM
5712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
572
573 * linux-low.c (same_lwp): Remove.
574 (find_lwp_pid): Use find_thread.
575
6b2a85da
SM
5762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * linux-low.c (delete_lwp_callback): Remove.
579 (linux_mourn): Use for_each_thread.
580
798a38e8
SM
5812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * linux-low.c (linux_detach_lwp_callback): Return void, remove
584 args parameter, don't check for pid.
585 (linux_detach): Use for_each_thread.
586
e4eb0dec
SM
5872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * linux-low.c (struct counter): Remove.
590 (second_thread_of_pid_p): Remove.
591 (last_thread_of_process_p): Use find_thread.
592
83e1b6c1
SM
5932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
594
595 * inferiors.c (find_inferior_in_random): Remove.
596 * inferiors.h (find_inferior_in_random): Remove.
597 * linux-low.c (status_pending_p_callback): Return bool, accept
598 parameter ptid directly.
599 (linux_wait_for_event_filtered): Use find_thread_in_random.
600 (linux_wait_1): Likewise.
601
8dc7b443
SM
6022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
603
604 * inferiors.c (find_inferior_id): Remove.
605 (find_thread_ptid): Move implemention from find_inferior_id to
606 here.
607 * inferiors.h (find_inferior_id): Remove.
608 * server.c (handle_status): Use find_thread_ptid.
609 (process_serial_event): Likewise.
610 * thread-db.c (find_one_thread): Likewise.
611 (thread_db_thread_handle): Likewise.
612 * win32-low.c (thread_rec): Likewise.
613 (child_delete_thread): Likewise.
614 (win32_thread_alive): Likewise.
615 (get_child_debug_event): Likewise.
616
da25033c
SM
6172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
618
619 * linux-mips-low.c (update_watch_registers_callback): Return
620 void, remove pid_p parameter, don't check for pid.
621 (mips_insert_point, mips_remove_point): Use for_each_thread.
622
c91bb56b
SM
6232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
624
625 * lynx.low (lynx_delete_thread_callback): Remove.
626 (lynx_mourn): Use for_each_thread.
627
634a3254
SM
6282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
629
630 * regcache.c (regcache_invalidate_one): Remove.
631 (regcache_invalidate_pid): use for_each_thread.
632
41272101
TT
6332017-11-26 Tom Tromey <tom@tromey.com>
634
635 * linux-low.c (linux_create_inferior): Update.
636
f5291a6f
UW
6372017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
638
639 * spu-low.c (spu_create_inferior): Fix typo in argument name.
640
6654d750
AH
6412017-11-24 Alan Hayward <alan.hayward@arm.com>
642
643 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
644 * linux-aarch64-low.c (initialize_low_arch): Call init func.
645 * linux-aarch64-tdesc-selftest.c: New file.
646 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
647
6482017-11-24 Alan Hayward <alan.hayward@arm.com>
649
650 * configure.srv: Add new file.
651 * linux-aarch64-low.c (initialize_low_arch): Call init func.
652 * linux-aarch64-tdesc-selftest.c: New file.
653 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
654
49bdb7ee
AH
6552017-11-24 Alan Hayward <alan.hayward@arm.com>
656
657 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
658 * linux-aarch64-low.c (initialize_low_arch): Remove init.
659 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
660
d6d7ce56
AH
6612017-11-24 Alan Hayward <alan.hayward@arm.com>
662
663 * configure.srv: Add new files.
664 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
665 aarch64_linux_read_description.
666 * linux-aarch64-low.c (aarch64_linux_read_description):
667 Merge with aarch64_arch_setup.
668 (aarch64_arch_setup): Call aarch64_linux_read_description.
669 * linux-aarch64-tdesc.c: New file.
670 * linux-aarch64-tdesc.h: New file.
671
506fe5f4
YQ
6722017-11-24 Yao Qi <yao.qi@linaro.org>
673
674 * configure.srv: Set $srv_regobj for tic6x-linux.
675 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
676 (tic6x_read_description): Move some code to tic6x_arch_setup.
677 (tic6x_tdesc_test): New function.
678 (initialize_low_arch): Call selftests::register_test.
679
29f9a567
YQ
6802017-11-22 Yao Qi <yao.qi@linaro.org>
681
682 * remote-utils.c (prepare_resume_reply): Use memcpy.
683
578290ec
SM
6842017-11-19 Simon Marchi <simon.marchi@ericsson.com>
685
686 * linux-low.c (kill_one_lwp_callback): Return void, take
687 argument directly, don't filter on pid.
688 (linux_kill): Use for_each_thread.
689
eca55aec
SM
6902017-11-19 Simon Marchi <simon.marchi@ericsson.com>
691
692 * linux-low.c (need_step_over_p): Return bool, remove dummy
693 argument.
694 (linux_resume, proceed_all_lwps): Use find_thread.
695
25c28b4d
SM
6962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
697
698 * linux-low.c (resume_status_pending_p): Return bool, remove
699 flag_p argument.
700 (linux_resume): Use find_thread.
701
5fdda392
SM
7022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
703
704 * linux-low.c (struct thread_resume_array): Remove.
705 (linux_set_resume_request): Return void, take arguments
706 directly.
707 (linux_resume): Use for_each_thread.
708
fcb056a5
SM
7092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
710
711 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
712 return bool, remove data argument.
713 (linux_stabilize_threads): Use find_thread.
714
139720c5
SM
7152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
716
717 * linux-low.c (unsuspend_one_lwp): Remove.
718 (unsuspend_all_lwps): Use for_each_thread, inline code from
719 unsuspend_one_lwp.
720
6d1e5673
SM
7212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
722
723 * gdbthread.h (find_thread): Add overload with ptid_t filter.
724 * linux-low.c (struct iterate_over_lwps_args): Remove.
725 (iterate_over_lwps_filter): Remove.
726 (iterate_over_lwps): Use find_thread.
727
bbf550d5
SM
7282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
729
730 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
731 (linux_handle_new_gdb_connection): Use for_each_thread, inline
732 code from reset_lwp_ptrace_options_callback.
733
00192f77
SM
7342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
735
736 * linux-arm-low.c (struct update_registers_data): Remove.
737 (update_registers_callback): Return void, take arguments
738 directly, don't check thread's pid.
739 (arm_insert_point, arm_remove_point): Use for_each_thread.
740
2bee2b6c
SM
7412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
742
743 * win32-low.c (continue_one_thread): Return void, take argument
744 directly.
745 (child_continue): Use for_each_thread.
746
0b360f19
SM
7472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
748
749 * win32-i386-low.c (update_debug_registers_callback): Rename
750 to ...
751 (update_debug_registers): ... this, return void, remove pid_p arg.
752 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
753
f27866ba
SM
7542017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * inferiors.h (struct process_info): Add constructor, initialize
757 fields..
758 <syscalls_to_catch>: Change type to std::vector<int>.
759 * inferiors.c (add_process): Allocate process_info with new.
760 (remove_process): Free process_info with delete.
761 * linux-low.c (handle_extended_wait): Adjust.
762 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
763 * server.c (handle_general_set): Adjust.
764
e849ea89
PA
7652017-11-16 Pedro Alves <palves@redhat.com>
766
767 * remote-utils.c (remote_close): Block SIGIO signals instead of
768 uninstalling the SIGIO handler.
769
1d0aa65c
AH
7702017-11-16 Alan Hayward <alan.hayward@arm.com>
771
772 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
773
3491a34c
YQ
7742017-11-16 Yao Qi <yao.qi@linaro.org>
775
776 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
777 (tic6x_store_gregset): Likewise.
778 (tic6x_usrregs_info): Move it up.
779
a602f924
AH
7802017-11-15 Alan Hayward <alan.hayward@arm.com>
781
782 * Makefile.in: Update arch rules.
783 * configure.srv: Explicitly mark arch/ files.
784
5616b6c3
AS
7852017-11-13 Andreas Schwab <schwab@suse.de>
786
787 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
788 function.
789 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
790
d1928160
PA
7912017-11-06 Pedro Alves <palves@redhat.com>
792
793 * config.in, configure: Regenerate.
794
bac608e7
SM
7952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
796
797 * target.c (struct thread_search): Remove.
798 (thread_search_callback): Remove.
799 (prepare_to_access_memory): Use for_each_thread instead of
800 find_inferior. Inline code from thread_search_callback.
801
eaddb425
SM
8022017-10-27 Simon Marchi <simon.marchi@ericsson.com>
803
804 * server.c (struct visit_actioned_threads_data): Remove.
805 (visit_actioned_threads): Change prototype to take arguments
806 directly.
807 (resume): Use find_thread instead of find_inferior.
808
99078d34
SM
8092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
810
811 * server.c (queue_stop_reply_callback): Change prototype, return
812 void.
813 (find_status_pending_thread_callback): Remove.
814 (handle_status): Replace find_inferior with find_thread and
815 for_each_thread.
816
cc628f3d
AH
8172017-10-25 Alan Hayward <alan.hayward@arm.com>
818
819 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
820 with REGNO.
821 (aarch64_store_gregset): Likewise.
822 (aarch64_fill_fpregset): Likewise.
823 (aarch64_store_fpregset): Likewise.
824
4d3bb80e
SM
8252017-10-21 Simon Marchi <simon.marchi@ericsson.com>
826
827 * gdbthread.h (find_thread, for_each_thread): New functions.
828 * inferiors.c (thread_of_pid): Remove.
829 (find_any_thread_of_pid): Use find_thread.
830 * linux-low.c (num_lwps): Use for_each_thread.
831
7a7cdfa0
YQ
8322017-10-17 Yao Qi <yao.qi@linaro.org>
833
834 * Makefile.in: Remove one rule.
835 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
836
e675d170
YQ
8372017-10-17 Yao Qi <yao.qi@linaro.org>
838
839 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
840 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
841
7eb4e0f9
YQ
8422017-10-17 Yao Qi <yao.qi@linaro.org>
843
844 * configure.srv: Rename arm.o with arch/arm.o.
845
60d6cfc9
YQ
8462017-10-17 Yao Qi <yao.qi@linaro.org>
847
848 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
849 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
850 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
851 (arch-i386.o, arch-amd64.o): Remove rules.
852 (arch/%.o): New rule.
853 Update POSTCOMPILE and COMPILE.pre.
854 * configure.ac: Invoke AC_CONFIG_COMMANDS.
855 * configure: Re-generated.
856 * configure.srv: Replace arch-i386.o with arch/i386.o.
857 Replace arch-amd64.o with arch/amd64.o.
858
5bfda255
YQ
8592017-10-16 Yao Qi <yao.qi@linaro.org>
860
861 * configure: Regenerated.
862
9c80ecd6
SM
8632017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
864
865 * inferiors.h: (struct inferior_list): Remove.
866 (struct inferior_list_entry); Remove.
867 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
868 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
869 get_first_inferior): Remove.
870 (for_each_inferior, for_each_inferior_with_data, find_inferior,
871 find_inferior_id, find_inferior_in_random): Change signature.
872 * inferiors.c (all_threads): Change type to
873 std::list<thread_info *>.
874 (get_thread): Remove macro.
875 (find_inferior, find_inferior_id): Change signature, implement
876 using find_thread.
877 (find_inferior_in_random): Change signature, implement using
878 find_thread_in_random.
879 (for_each_inferior, for_each_inferior_with_data): Change
880 signature, implement using for_each_thread.
881 (add_inferior_to_list, remove_inferior): Remove.
882 (add_thread, get_first_thread, thread_of_pid,
883 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
884 (get_first_inferior, one_inferior_p, clear_inferior_list):
885 Remove.
886 (clear_inferiors, get_thread_process): Update.
887 * gdbthread.h: Include <list>.
888 (struct thread_info) <entry>: Remove field.
889 <id>: New field.
890 (all_threads): Change type to std::list<thread_info *>.
891 (get_first_inferior): Add doc.
892 (find_thread, for_each_thread, find_thread_in_random): New
893 functions.
894 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
895 * linux-arm-low.c (update_registers_callback): Update.
896 * linux-low.c (second_thread_of_pid_p): Update.
897 (kill_one_lwp_callback, linux_detach_lwp_callback,
898 delete_lwp_callback, status_pending_p_callback, same_lwp,
899 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
900 iterate_over_lwps, not_stopped_callback,
901 resume_stopped_resumed_lwps, count_events_callback,
902 select_singlestep_lwp_callback, select_event_lwp_callback,
903 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
904 suspend_and_send_sigstop_callback, wait_for_sigstop,
905 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
906 lwp_running, linux_set_resume_request, resume_status_pending_p,
907 need_step_over_p, start_step_over, linux_resume_one_thread,
908 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
909 reset_lwp_ptrace_options_callback): Update.
910 * linux-mips-low.c (update_watch_registers_callback): Update.
911 * regcache.c (regcache_invalidate_one, regcache_invalidate):
912 Update.
913 (free_register_cache_thread_one): Remove.
914 (regcache_release): Update.
915 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
916 handle_qxfer_threads_worker): Update.
917 (handle_query): Update, use list iterator.
918 (visit_actioned_threads, handle_pending_status,
919 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
920 clear_pending_status_callback, set_pending_status_callback,
921 find_status_pending_thread_callback, handle_status,
922 process_serial_event): Update.
923 * target.c (thread_search_callback): Update.
924 * thread-db.c (thread_db_get_tls_address): Update.
925 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
926 Update.
927 * win32-i386-low.c (update_debug_registers_callback): Update.
928 * win32-low.c (delete_thread_info, child_delete_thread,
929 continue_one_thread, suspend_one_thread,
930 get_child_debug_event): Adjust.
931
9179355e
SM
9322017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
933
934 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
935 * inferiors.h: Include <list>.
936 (struct process_info) <entry>: Remove field.
937 <pid>: New field.
938 (pid_of): Change macro to function.
939 (ptid_of, lwpid_of): Remove macro.
940 (all_processes): Change type to std::list<process_info *>.
941 (ALL_PROCESSES): Remove macro.
942 (for_each_process, find_process): New function.
943 * inferiors.c (all_processes): Change type to
944 std::list<process_info *>.
945 (find_thread_process): Adjust.
946 (add_process): Likewise.
947 (remove_process): Likewise.
948 (find_process_pid): Likewise.
949 (get_first_process): Likewise.
950 (started_inferior_callback): Remove.
951 (have_started_inferiors_p): Adjust.
952 (attached_inferior_callback): Remove.
953 (have_attached_inferiors_p): Adjust.
954 * linux-low.c (check_zombie_leaders): Likewise.
955 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
956 (x86_linux_update_xmltarget): Adjust.
957 * server.c (handle_query): Likewise.
958 (gdb_reattached_process): Remove.
959 (handle_status): Adjust.
960 (kill_inferior_callback): Likewise.
961 (detach_or_kill_inferior): Remove.
962 (print_started_pid): Likewise.
963 (print_attached_pid): Likewise.
964 (detach_or_kill_for_exit): Update.
965 (process_serial_event): Likewise.
966 * linux-arm-low.c (arm_new_fork): Likewise.
967
c9cb8905
SM
9682017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
969
970 * dll.h: Include <list>.
971 (struct dll_info): Add constructor.
972 <entry>: Remove field.
973 (all_dlls): Change type to std::list<dll_info>.
974 * dll.c: Include <algorithm>.
975 (get_dll): Remove macro.
976 (all_dlls): Change type to std::list<dll_info *>.
977 (free_one_dll): Remove.
978 (match_dll): Likewise.
979 (loaded_dll): Adjust.
980 (unloaded_dll): Adjust to all_dlls type change, use
981 std::find_if. Inline code from match_dll.
982 (clear_dlls): Adjust to all_dlls type change.
983 * server.c (emit_dll_description): Remove.
984 (handle_qxfer_libraries): Adjust to all_dlls type change,
985 integrate emit_dll_description's functionality.
986
04ec7890
SM
9872017-10-12 Simon Marchi <simon.marchi@ericsson.com>
988
989 * linux-low.h (struct linux_target_ops) <delete_process>: New
990 field.
991 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
992 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
993 (struct linux_target_ops): Add delete_process callback.
994 * linux-arm-low.c (arm_delete_process): New.
995 (struct linux_target_ops): Add delete_process callback.
996 * linux-bfin-low.c (struct linux_target_ops): Likewise.
997 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
998 * linux-m32r-low.c (struct linux_target_ops): Likewise.
999 * linux-mips-low.c (mips_linux_delete_process): New.
1000 (struct linux_target_ops): Add delete_process callback.
1001 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1002 * linux-s390-low.c (struct linux_target_ops): Likewise.
1003 * linux-sh-low.c (struct linux_target_ops): Likewise.
1004 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1005 * linux-tile-low.c (struct linux_target_ops): Likewise.
1006 * linux-x86-low.c (x86_linux_delete_process): New.
1007 (struct linux_target_ops): Add delete_process callback.
1008 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1009
466eecee
SM
10102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1011
1012 * linux-aarch64-low.c (the_low_target): Add thread delete
1013 callback.
1014 * linux-arm-low.c (arm_delete_thread): New function.
1015 (the_low_target): Add thread delete callback.
1016 * linux-bfin-low.c (the_low_target): Likewise.
1017 * linux-crisv32-low.c (the_low_target): Likewise.
1018 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1019 set.
1020 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1021 field.
1022 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1023 * linux-mips-low.c (mips_linux_delete_thread): New function.
1024 (the_low_target): Add thread delete callback.
1025 * linux-ppc-low.c (the_low_target): Likewise.
1026 * linux-s390-low.c (the_low_target): Likewise.
1027 * linux-sh-low.c (the_low_target): Likewise.
1028 * linux-tic6x-low.c (the_low_target): Likewise.
1029 * linux-tile-low.c (the_low_target): Likewise.
1030 * linux-x86-low.c (the_low_target): Likewise.
1031 * linux-xtensa-low.c (the_low_target): Likewise.
1032
b79f7801
YZ
10332017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1034
1035 * win32-low.c: Include "common-inferior.h".
1036
bc3b087d
SDJ
10372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1038
1039 * inferiors.c (set_inferior_cwd): New function.
1040 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1041 (handle_query): Inform that QSetWorkingDir is supported.
1042 * win32-low.c (create_process): Pass the inferior's cwd to
1043 CreateProcess.
1044
d092c5a2
SDJ
10452017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1046
1047 * inferiors.c (current_inferior_cwd): New global variable.
1048 (get_inferior_cwd): New function.
1049 * inferiors.h (struct process_info) <cwd>: New field.
1050
7da0a886
SDJ
10512017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1052
1053 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1054 (OBS): Add gdb_tilde_expand.o.
1055
289a6840
SM
10562017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1057
1058 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1059 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1060
256642e8
PA
10612017-09-29 Pedro Alves <palves@redhat.com>
1062
1063 * ax.c (gdb_parse_agent_expr): Constify.
1064 * ax.h (gdb_parse_agent_expr): Constify.
1065 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1066 Constify.
1067 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1068 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1069 * remote-utils.h (read_ptid): Constify.
1070 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1071 (process_point_options, process_serial_event): Constify.
1072 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1073 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1074 (cmd_qtbuffer): Constify.
1075
5b9ca4d4
PA
10762017-09-29 Pedro Alves <palves@redhat.com>
1077
1078 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1079 fails.
1080
94c207e0
PA
10812017-09-29 Pedro Alves <palves@redhat.com>
1082
1083 * linux-low.c (handle_extended_wait): Pass parent thread instead
1084 of process to thread_db_notice_clone.
1085 * linux-low.h (thread_db_notice_clone): Replace parent process
1086 parameter with parent thread parameter.
1087 * thread-db.c (find_one_thread): Add comment.
1088 (thread_db_notice_clone): Replace parent process parameter with
1089 parent thread parameter. Temporarily switch to the parent thread.
1090
75352e28
SDJ
10912017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1092
1093 * gdbthread.h: Include "common-gdbthread.h".
1094 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1095 "if" when validating the ptid.
1096 * remote-utils.c: Include "gdbthread.h".
1097 (prepare_resume_reply): Use "switch_to_thread".
1098 * target.c (done_accessing_memory): Likewise.
1099
ad339634
AA
11002017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1101
1102 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1103 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1104 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1105 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1106 s390x-gs-linux64-ipa.o to ipa_obj.
1107 * linux-s390-low.c (HWCAP_S390_GS): New define.
1108 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1109 New functions.
1110 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1111 (s390_arch_setup): Check for guarded-storage support and choose
1112 appropriate tdesc.
1113 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1114 init_registers_s390x_gs_linux64.
1115 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1116 enum value.
1117 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1118 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1119
cc4d742f
SM
11202017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1121
1122 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1123
f6327dcb
KB
11242017-09-21 Kevin Buettner <kevinb@redhat.com>
1125
1126 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1127 (thread_db_thread_handle): Declare.
1128 * linux-low.c (linux_target_ops): Initialize thread_handle.
1129 * server.c (handle_qxfer_threads_worker): Add support for
1130 "handle" attribute.
1131 * target.h (struct target_ops): Add new function pointer,
1132 thread_handle.
1133 (target_thread_handle): Define.
1134 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1135 field in lwp.
1136 (thread_db_thread_handle): New function.
1137
86299109
KB
11382017-09-21 Kevin Buettner <kevinb@redhat.com>
1139
1140 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1141 * linux-low.h (thread_db_notice_clone): Declare.
1142 * thread-db.c (thread_db_notice_clone): New function.
1143
f557a88a
PA
11442017-09-21 Pedro Alves <palves@redhat.com>
1145
1146 * server.c (gdb_read_memory, handle_status, process_serial_event)
1147 (handle_serial_event, handle_target_event): Adjust to
1148 set_desired_thread prototype change.
1149 * target.c (set_desired_thread): Remove 'use_general' parameter
1150 and adjust.
1151 * target.h (set_desired_thread): Remove 'use_general' parameter.
1152
223ffa71
TT
11532017-09-20 Tom Tromey <tom@tromey.com>
1154
1155 * target.c (target_terminal::terminal_state): Define.
1156 (target_terminal::init): Rename from target_terminal_init.
1157 (target_terminal::inferior): Rename from
1158 target_terminal_inferior.
1159 (target_terminal::ours): Rename from target_terminal_ours.
1160 (target_terminal::ours_for_output, target_terminal::info): New.
1161
04fd3ba9
SM
11622017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1163
1164 * server.c (accumulate_file_name_length): Remove.
1165 (emit_dll_description): Adjust to std::string change.
1166 (handle_qxfer_libraries): Use std::string to hold document.
1167
5e187554
SM
11682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1171 return type of xml_escape_text.
1172 * server.c (emit_dll_description): Likewise.
1173
1526853e
SM
11742017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1175
1176 * server.c (captured_main): Accept argument for --selftest.
1177 Update run_tests call.
1178 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1179 when registering selftests.
1180
c4dfafab
SDJ
11812017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1182
1183 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1184 instead of "VEC" for "target_desc.reg_defs".
1185 (regcache_cpy): Likewise.
1186 (registers_to_string): Likewise.
1187 (registers_from_string): Likewise.
1188 (find_regno): Likewise.
1189 (supply_regblock): Likewise.
1190 (regcache_raw_read_unsigned): Likewise.
1191 * tdesc.c (init_target_desc): Likewise.
1192 (tdesc_create_reg): Likewise.
1193 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1194 (struct target_desc) <reg_defs>: Convert to "std::vector".
1195 (target_desc): Do not initialize "reg_defs".
1196 (~target_desc): Update code to use "std::vector" instead of "VEC"
1197 for "target_desc.reg_defs".
1198 (operator==): Likewise.
1199
124aceb4
SM
12002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1201
1202 * inferiors.h (thread_to_gdb_id): Remove.
1203 * inferiors.c (thread_to_gdb_id): Remove.
1204 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1205 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1206 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1207 Likewise.
1208 * nto-low.c (nto_fetch_registers, nto_store_registers,
1209 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1210
96cde54f
SM
12112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1212
1213 * inferiors.h (gdb_id_to_thread_id): Remove.
1214 * inferiors.c (gdb_id_to_thread_id): Remove.
1215 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1216 removal. Move pid declaration closer to where it's used.
1217
e8ca139e
SM
12182017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * server.c (handle_detach): New function.
1221 (process_serial_event): Move code out, call handle_detach.
1222
f8a4e119
SM
12232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1224
1225 * server.c (require_running): Rename to ...
1226 (require_running_or_return): ... this ...
1227 (require_running_or_break): ... and this.
1228 (handle_query, process_serial_event): Adjust.
1229
0eb0a407
SM
12302017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * linux-low.c (linux_set_resume_request): Remove unused
1233 variables.
1234
785922a5
SM
12352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * server.c (first_thread_of): Remove.
1238 (process_serial_event): Replace usage of first_thread_of with
1239 find_any_thread_of_pid.
1240 * tracepoint.c (same_process_p): Remove.
1241 (gdb_agent_about_to_close): Replace usage of same_process_p with
1242 find_any_thread_of_pid.
1243 * linux-x86-low.c (same_process_callback): Remove.
1244 (x86_arch_setup_process_callback): Replace usage of
1245 same_process_callback with find_any_thread_of_pid.
1246 * thread-db.c (any_thread_of): Remove.
1247 (switch_to_process): Replace usage of any_thread_of with
1248 find_any_thread_of_pid.
1249 * inferiors.c (thread_pid_matches_callback): Remove.
1250 (find_thread_process): Adjust to use find_any_thread_of_pid.
1251
a059f00c
SDJ
12522017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1253
1254 * regcache.c (get_thread_regcache): Guard calls to "memset"
1255 with "!VEC_empty".
1256
cc397f3a
SDJ
12572017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1258
1259 * linux-low.c (handle_extended_wait): Use
1260 "allocate_target_description" instead of "XNEW".
1261 * linux-x86-low.c (initialize_low_arch): Likewise.
1262
22916b07
YQ
12632017-09-05 Yao Qi <yao.qi@linaro.org>
1264
1265 * configure.srv (srv_i386_regobj): Remove.
1266 (srv_amd64_regobj): Remove.
1267 (srv_regobj): Set it to "" for x86 non-linux targets.
1268 * linux-x86-tdesc.c (i386_linux_read_description):
1269 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1270 (init_registers_i386): Remove the declaration.
1271 (tdesc_i386): Remove the declaration.
1272 (lynx_i386_arch_setup): Call i386_create_target_description.
1273 * nto-x86-low.c: Likewise.
1274 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1275 [!__x86_64__]: include arch/i386.h.
1276 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1277
38602d55
YQ
12782017-09-05 Yao Qi <yao.qi@linaro.org>
1279
1280 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1281 i386/amd64-XXX-linux from it.
1282
44b886ff
YQ
12832017-09-05 Yao Qi <yao.qi@linaro.org>
1284
1285 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1286 false.
1287 (ipa_amd64_linux_regobj): Remove.
1288 (ipa_x32_linux_regobj): Remove.
1289
b4570e4b
YQ
12902017-09-05 Yao Qi <yao.qi@linaro.org>
1291
1292 * Makefile.in (arch-amd64.o): New rule.
1293 * configure.srv: Append arch-amd64.o.
1294 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1295 (get_ipa_tdesc): Call amd64_linux_read_description.
1296 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1297 and init_registers_amd64_XXX.
1298 * linux-x86-low.c (x86_linux_read_description): Call
1299 amd64_linux_read_description.
1300 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1301 (initialize_low_arch): Don't call init_registers_x32_XXX and
1302 init_registers_amd64_XXX.
1303 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1304 and tdesc_amd64_XXX.
1305 [__x86_64__] (amd64_tdesc_test): New function.
1306 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1307 and init_registers_amd64_XXX.
1308 * linux-x86-tdesc.c: Include arch/amd64.h.
1309 (xcr0_to_tdesc_idx): New function.
1310 (i386_linux_read_description): New function.
1311 (amd64_get_ipa_tdesc_idx): New function.
1312 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1313 (amd64_get_ipa_tdesc): Declare.
1314
d1f28ea2
YQ
13152017-09-05 Yao Qi <yao.qi@linaro.org>
1316
1317 * configure.srv (srv_i386_linux_xmlfiles): Remove
1318 i386/i386-XXX-linux.xml from it.
1319
25a93583
YQ
13202017-09-05 Yao Qi <yao.qi@linaro.org>
1321
1322 * configure.srv: Set srv_i386_linux_regobj empty if $development
1323 is false.
1324 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1325 initialize_low_tdesc.
1326 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1327 with #if initialize_low_tdesc.
1328 * linux-x86-tdesc-selftest.c: New file.
1329 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1330
5f035c07
YQ
13312017-09-05 Yao Qi <yao.qi@linaro.org>
1332
1333 * Makefile.in (arch-i386.o): New rule.
1334 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1335 (x86_64-*-linux*): Likewise.
1336 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1337 include arch/i386.h.
1338 (i386_linux_read_description): Remove code and call
1339 i386_create_target_description.
1340 * tdesc.c (allocate_target_description): New function.
1341 * tdesc.h (set_tdesc_architecture): Remove declaration.
1342 (set_tdesc_osabi): Likewise.
1343
0abe8a89
YQ
13442017-09-05 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1347 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1348 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1349 .xmltarget.
1350 * server.c (get_features_xml): Call tdesc_get_features_xml.
1351 * tdesc.c (set_tdesc_architecture): New function.
1352 (set_tdesc_osabi): New function.
1353 (tdesc_get_features_xml): New function.
1354 (tdesc_create_feature): Add an argument.
1355 * tdesc.h (struct target_desc) <features>: New field.
1356 <arch, osabi>: New field.
1357 (~target_desc): xfree features, arch, and osabi.
1358 (target_desc::oerator==): Don't compare .xmltarget.
1359 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1360 (set_tdesc_osabi): Likewise.
1361 (tdesc_get_features_xml): Likewise.
1362
0a188386
YQ
13632017-09-05 Yao Qi <yao.qi@linaro.org>
1364
1365 * linux-x86-tdesc.c: Include selftest.h.
1366 (i386_tdesc_test): New function.
1367 (initialize_low_tdesc): Call selftests::register_test.
1368 * tdesc.h: Include regdef.h.
1369 (target_desc): Override operator == and !=.
1370
f49ff000
YQ
13712017-09-05 Yao Qi <yao.qi@linaro.org>
1372
1373 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1374 (ipa_obj): Likewise.
1375 * linux-i386-ipa.c: Include common/x86-xstate.h
1376 (get_ipa_tdesc): Call i386_linux_read_description.
1377 (initialize_low_tracepoint): Don't call init_registers_XXX
1378 functions, call initialize_low_tdesc instead.
1379 * linux-x86-low.c (x86_linux_read_description): Call
1380 i386_linux_read_description.
1381 (initialize_low_arch): Don't call init_registers_i386_XXX
1382 functions, call initialize_low_tdesc.
1383 * linux-x86-tdesc.c: New file.
1384 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1385 (i386_get_ipa_tdesc_idx): Declare.
1386 (i386_get_ipa_tdesc): Declare.
1387 (initialize_low_tdesc): Declare.
1388
2b68ef2f
YQ
13892017-09-05 Yao Qi <yao.qi@linaro.org>
1390
1391 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1392 instead of 0.
1393
f7000548
YQ
13942017-09-05 Yao Qi <yao.qi@linaro.org>
1395
1396 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1397 * regcache.c (get_thread_regcache): Use VEC_length.
1398 (init_register_cache): Likewise.
1399 (regcache_cpy): Likewise.
1400 (registers_to_string): Iterate reg_defs via VEC_iterate.
1401 (find_regno): Likewise.
1402 (find_register_by_number): Use VEC_index.
1403 (register_size): Call find_register_by_number.
1404 (register_data): Call find_register_by_number.
1405 (supply_regblock): Use VEC_length.
1406 (regcache_raw_read_unsigned): Likewise.
1407 * tdesc.c (init_target_desc): Iterate reg_defs via
1408 VEC_iterate.
1409 (default_description): Update initializer.
1410 (copy_target_description): Don't update field num_registers.
1411 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1412 <num_registers>: Remove.
1413
50a421ac
SM
14142017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1415
1416 * Makefile.in (.SECONDARY): Define target.
1417
23fdd69e
SM
14182017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1419
1420 * linux-low.c (linux_wait_1): Adjust.
1421 * server.c (queue_stop_reply_callback): Adjust.
1422
0a2dde4a
SDJ
14232017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1424
1425 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1426 QEnvironmentUnset and QEnvironmentReset packets.
1427 (handle_query): Inform remote that QEnvironmentHexEncoded,
1428 QEnvironmentUnset and QEnvironmentReset are supported.
1429
6afd337d
SM
14302017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1431
1432 * inferiors.h (inferior_target_data): Rename to ...
1433 (thread_target_data): ... this.
1434 (inferior_regcache_data): Rename to ...
1435 (thread_regcache_data): ... this.
1436 (set_inferior_regcache_data): Rename to ...
1437 (set_thread_regcache_data): ... this.
1438 * inferiors.c (inferior_target_data): Rename to ...
1439 (thread_target_data): ... this.
1440 (inferior_regcache_data): Rename to ...
1441 (thread_regcache_data): ... this.
1442 (set_inferior_regcache_data): Rename to ...
1443 (set_thread_regcache_data): ... this.
1444 (free_one_thread): Update.
1445 * linux-low.h (get_thread_lwp): Update.
1446 * regcache.c (get_thread_regcache): Update.
1447 (regcache_invalidate_thread): Update.
1448 (free_register_cache_thread): Update.
1449 * win32-i386-low.c (update_debug_registers_callback): Update.
1450 (win32_get_current_dr): Update.
1451 * win32-low.c (thread_rec): Update.
1452 (delete_thread_info): Update.
1453 (continue_one_thread): Update.
1454 (suspend_one_thread): Update.
1455
a160cc46
SM
14562017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1457
1458 * inferiors.c (set_inferior_target_data): Remove.
1459 * inferiors.h (set_inferior_target_data): Remove.
1460
6d580b63
YQ
14612017-08-18 Yao Qi <yao.qi@linaro.org>
1462
1463 * Makefile.in (OBS): Add selftest.o.
1464 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1465 * configure, config.in: Re-generated.
1466 * server.c: Include common/sefltest.h.
1467 (captured_main): Handle option --selftest.
1468
f5a29eb0
YQ
14692017-08-09 Yao Qi <yao.qi@linaro.org>
1470
1471 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1472 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1473 i386-avx-mpx.o and i386-mmx.o.
1474 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1475 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1476 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1477 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1478 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1479 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1480 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1481 i386/amd64-avx-mpx.xml.
1482
57757c2f
YQ
14832017-08-09 Yao Qi <yao.qi@linaro.org>
1484
1485 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1486 and x32-avx-avx512.o.
1487 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1488 i386/x32-avx-avx512.xml.
1489
229d26fc
SM
14902017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * tracepoint.h (enum class fast_tpoint_collect_result): New
1493 enumeration.
1494 (fast_tracepoint_collecting): Change return type to
1495 fast_tpoint_collect_result.
1496 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1497 * linux-low.h: Include tracepoint.h.
1498 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1499 fast_tpoint_collect_result.
1500 * linux-low.c (handle_tracepoints): Adjust.
1501 (linux_fast_tracepoint_collecting): Change return type to
1502 fast_tpoint_collect_result.
1503 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1504 linux_wait_1, stuck_in_jump_pad_callback,
1505 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1506 proceed_one_lwp): Adjust to type change.
1507
2e1e43e1
YQ
15082017-07-10 Yao Qi <yao.qi@linaro.org>
1509
1510 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1511
adc764e7
YQ
15122017-06-29 Yao Qi <yao.qi@linaro.org>
1513
1514 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1515 Remove.
1516 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1517
a206891a
SM
15182017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1519
1520 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1521
9a6c7d9c
SDJ
15222017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1523
1524 * linux-low.c (linux_create_inferior): Adjust code to access the
1525 environment information via 'gdb_environ' class.
1526 * lynx-low.c (lynx_create_inferior): Likewise.
1527 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1528 (get_environ): Return a pointer to 'our_environ'.
1529 (captured_main): Initialize 'our_environ'.
1530 * server.h (get_environ): Adjust prototype.
1531 * spu-low.c (spu_create_inferior): Adjust code to access the
1532 environment information via 'gdb_environ' class.
1533
ae3e2ccf
SM
15342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1537 usage of "register" keyword.
1538
3e019bdc
SM
15392017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1540
1541 * configure: Re-generate.
1542
8465943a
SM
15432017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1544
1545 * configure: Re-generate.
1546
cf0dd6f0
SM
15472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1548
1549 * Makefile.in (COMPILE.pre): Add "-x c++".
1550
9845682b
SDJ
15512017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1552
1553 * fork-child.c: Conditionally include <signal.h>.
1554
aefd8b33
SDJ
15552017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1556
1557 * server.c (handle_general_set): Handle new packet
1558 "QStartupWithShell".
1559 (handle_query): Add "QStartupWithShell" to the list of supported
1560 packets.
1561 (gdbserver_usage): Add help text explaining the
1562 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1563 options.
1564 (captured_main): Recognize and act upon the presence of the new
1565 CLI options.
1566
2090129c
SDJ
15672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1568 Pedro Alves <palves@redhat.com>
1569
1570 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1571 * configure: Regenerate.
1572 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1573 "fork-inferior.o".
1574 (i[34567]86-*-lynxos*): Likewise.
1575 (spu*-*-*): Likewise.
1576 * fork-child.c: New file.
1577 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1578 and "environ.h".
1579 (linux_ptrace_fun): New function.
1580 (linux_create_inferior): Adjust function prototype to reflect
1581 change on "target.h". Adjust function code to use
1582 "fork_inferior".
1583 (linux_request_interrupt): Delete "signal_pid".
1584 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1585 (lynx_ptrace_fun): New function.
1586 (lynx_create_inferior): Adjust function prototype to reflect
1587 change on "target.h". Adjust function code to use
1588 "fork_inferior".
1589 * nto-low.c (nto_create_inferior): Adjust function prototype and
1590 code to reflect change on "target.h". Update comments.
1591 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1592 "common-terminal.h" and "environ.h".
1593 (terminal_fd): Moved to fork-child.c.
1594 (old_foreground_pgrp): Likewise.
1595 (restore_old_foreground_pgrp): Likewise.
1596 (last_status): Make it global.
1597 (last_ptid): Likewise.
1598 (our_environ): New variable.
1599 (startup_with_shell): Likewise.
1600 (program_name): Likewise.
1601 (program_argv): Rename to...
1602 (program_args): ...this.
1603 (wrapper_argv): New variable.
1604 (start_inferior): Delete function.
1605 (get_exec_wrapper): New function.
1606 (get_exec_file): Likewise.
1607 (get_environ): Likewise.
1608 (prefork_hook): Likewise.
1609 (post_fork_inferior): Likewise.
1610 (postfork_hook): Likewise.
1611 (postfork_child_hook): Likewise.
1612 (handle_v_run): Update code to deal with arguments coming from the
1613 remote host. Update calls from "start_inferior" to
1614 "create_inferior".
1615 (captured_main): Likewise. Initialize environment variable. Call
1616 "have_job_control".
1617 * server.h (post_fork_inferior): New prototype.
1618 (get_environ): Likewise.
1619 (last_status): Declare.
1620 (last_ptid): Likewise.
1621 (signal_pid): Likewise.
1622 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1623 (spu_ptrace_fun): New function.
1624 (spu_create_inferior): Adjust function prototype to reflect change
1625 on "target.h". Adjust function code to use "fork_inferior".
1626 * target.c (target_terminal_init): New function.
1627 (target_terminal_inferior): Likewise.
1628 (target_terminal_ours): Likewise.
1629 * target.h: Include <vector>.
1630 (struct target_ops) <create_inferior>: Update prototype.
1631 (create_inferior): Update macro.
1632 * utils.c (gdb_flush_out_err): New function.
1633 * win32-low.c (win32_create_inferior): Adjust function prototype
1634 and code to reflect change on "target.h".
1635
043a4934
SDJ
16362017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1637
1638 * inferiors.c (switch_to_thread): New function.
1639
15652511
SDJ
16402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1641
1642 * Makefile.in (SFILE): Add "common/job-control.c".
1643 (OBS): Add "job-control.o".
1644
21ea5acd
SDJ
16452017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1646
1647 * Makefile: Remove "@host_makefile_frag@".
1648
e13cb306
PA
16492017-05-05 Pedro Alves <palves@redhat.com>
1650
1651 * configure: Regenerate.
1652
c94fee56
SDJ
16532017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1654
1655 * configure: Regenerate.
1656
a0ff9e1a
SM
16572017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1658
1659 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1660 software_single_step change of return type to
1661 std::vector<CORE_ADDR>.
1662 * linux-low.c (install_software_single_step_breakpoints):
1663 Likewise.
1664 * linux-low.h (install_software_single_step_breakpoints):
1665 Likewise.
1666
be628ab8
SDJ
16672017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1668
1669 * remote-utils.c: Include "gdb_termios.h" instead of
1670 "terminal.h".
1671 * terminal.h: Delete file.
1672
7c5ded6a
SDJ
16732017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1674
1675 * server.c: Include <vector>.
1676 <program_argv, wrapper_argv>: Convert to std::vector.
1677 (start_inferior): Rewrite function to use C++.
1678 (handle_v_run): Likewise. Update code that calculates the argv
1679 based on the vRun packet; use C++.
1680 (captured_main): Likewise.
1681
436252de
SM
16822017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1683
1684 * server.c (handle_v_cont): Initialize thread_resume::thread
1685 with null_ptid.
1686
9bf2a700
PA
16872017-04-05 Pedro Alves <palves@redhat.com>
1688
1689 * configure: Regenerate.
1690
a121b7c1
PA
16912017-04-05 Pedro Alves <palves@redhat.com>
1692
1693 * gdbreplay.c (sync_error): Constify.
1694 * linux-x86-low.c (push_opcode): Constify.
1695
21c8a587
PA
16962017-04-05 Pedro Alves <palves@redhat.com>
1697
1698 * win32-low.c (get_child_debug_event)
1699 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1700 Report TARGET_WAITKIND_SPURIOUS instead.
1701
fb32b4f7
PA
17022017-04-05 Pedro Alves <palves@redhat.com>
1703
1704 * remote-utils.c (remote_prepare, remote_open): Constify.
1705 * remote-utils.h (remote_prepare, remote_open): Constify.
1706 * server.c (captured_main): Constify 'port' handling.
1707
65dd1e59
SM
17082017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1709
1710 * Makefile.in (clean): Clear .deps.
1711
8fa5b777
SM
17122017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1713
1714 * .gitignore: Remove generated files, replace with wildcard.
1715 * (clean): Replace removal of generated files with wildcard.
1716 (version.c): Replace with...
1717 (version-generated.c): ...this.
1718 (xml-builtin.c): Replace with...
1719 (xml-builtin-generated.c): ...this.
1720 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1721 (%.c: *regformats*): Replace with...
1722 (%-generated.c: *regformats*): ...this.
1723
a12e714b
MF
17242017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1725
1726 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1727 (xtensa_fill_gregset): Call collect_register_by_name for
1728 threadptr register.
1729 (xtensa_store_gregset): Call supply_register_by_name for
1730 threadptr register.
1731
1a09b50a
MF
17322017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1733
1734 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1735 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1736 (xtensa_store_gregset): Call supply_register for all registers in
1737 a0_regnum..a0_regnum + C0_NREGS range.
1738
1a01e7c6
SM
17392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1740
1741 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1742 (ax-ipa.o: ax.c): Remove.
1743 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1744 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1745 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1746 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1747 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1748
36bc18a8
SM
17492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1752 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1753 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1754 (errors-ipa.o: ../common/errors.c): Remove.
1755 (format-ipa.o: ../common/format.c): Remove.
1756 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1757
a8ebe3d5
SM
17582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1759
1760 * Makefile.in (%-ipa.o: %.c): New rule.
1761 (tracepoint-ipa.o: tracepoint.c): Remove.
1762 (utils-ipa.o: utils.c): Remove.
1763 (remote-utils-ipa.o: remote-utils.c): Remove.
1764 (regcache-ipa.o: regcache.c): Remove.
1765 (i386-linux-ipa.o: i386-linux.c): Remove.
1766 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1767 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1768 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1769 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1770 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1771 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1772 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1773 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1774 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1775 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1776 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1777 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1778 (aarch64-ipa.o: aarch64.c): Remove.
1779 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1780 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1781 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1782 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1783 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1784 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1785 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1786 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1787 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1788 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1789 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1790 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1791 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1792 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1793 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1794 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1795 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1796 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1797 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1798 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1799 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1800 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1801 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1802 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1803 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1804 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1805 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1806 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1807 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1808 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1809 (tdesc-ipa.o: tdesc.c): Remove.
1810 (x32-linux-ipa.o: x32-linux.c): Remove.
1811 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1812 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1813
50cfacb7
SM
18142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * Makefile.in (%.o: ../arch/%.c): New rule.
1817 (arm.o: ../arch/arm.c): Remove.
1818 (arm-linux.o: ../arch/arm-linux.c): Remove.
1819 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1820 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1821
c5a22423
SM
18222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * Makefile.in (%.o: ../nat/%.c): New rule.
1825 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1826 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1827 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1828 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1829 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1830 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1831 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1832 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1833 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1834 (linux-personality.o: ../nat/linux-personality.c): Remove.
1835 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1836 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1837 (x86-linux.o: ../nat/x86-linux.c): Remove.
1838 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1839 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1840
6bda016b
SM
18412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * Makefile.in (%.o: ../common/%.c): New rule.
1844 (signals.o: ../common/signals.c): Remove.
1845 (print-utils.o: ../common/print-utils.c): Remove.
1846 (rsp-low.o: ../common/rsp-low.c): Remove.
1847 (common-utils.o: ../common/common-utils.c): Remove.
1848 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1849 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1850 (vec.o: ../common/vec.c): Remove.
1851 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1852 (xml-utils.o: ../common/xml-utils.c): Remove.
1853 (ptid.o: ../common/ptid.c): Remove.
1854 (buffer.o: ../common/buffer.c): Remove.
1855 (format.o: ../common/format.c): Remove.
1856 (filestuff.o: ../common/filestuff.c): Remove.
1857 (agent.o: ../common/agent.c): Remove.
1858 (errors.o: ../common/errors.c): Remove.
1859 (environ.o: ../common/environ.c): Remove.
1860 (common-debug.o: ../common/common-debug.c): Remove.
1861 (cleanups.o: ../common/cleanups.c): Remove.
1862 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1863 (fileio.o: ../common/fileio.c): Remove.
1864 (common-regcache.o: ../common/common-regcache.c): Remove.
1865 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1866 (new-op.o: ../common/new-op.c): Remove.
1867 (btrace-common.o: ../common/btrace-common.c): Remove.
1868
21122961
SM
18692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1870
1871 * Makefile.in (%.o: ../target/%.c): New rule.
1872 (waitstatus.o: ../target/waitstatus.c): Remove.
1873
c362e621
SM
18742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1875
1876 * Makefile.in
1877 (%.c: ../regformats/%.dat,
1878 (%.c: ../regformats/arm/%.dat,
1879 (%.c: ../regformats/i386/%.dat,
1880 (%.c: ../regformats/rs6000/%.dat): New rules.
1881 (aarch64.c): Remove.
1882 (reg-arm.c): Remove.
1883 (arm-with-iwmmxt.c): Remove.
1884 (arm-with-vfpv2.c): Remove.
1885 (arm-with-vfpv3.c): Remove.
1886 (arm-with-neon.c): Remove.
1887 (reg-bfin.c): Remove.
1888 (reg-cris.c): Remove.
1889 (reg-crisv32.c): Remove.
1890 (i386.c): Remove.
1891 (i386-linux.c): Remove.
1892 (i386-avx.c): Remove.
1893 (i386-avx-linux.c): Remove.
1894 (i386-avx-avx512.c): Remove.
1895 (i386-avx-avx512-linux.c): Remove.
1896 (i386-mpx.c): Remove.
1897 (i386-mpx-linux.c): Remove.
1898 (i386-avx-mpx-avx512-pku.c): Remove.
1899 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1900 (i386-avx-mpx.c): Remove.
1901 (i386-avx-mpx-linux.c): Remove.
1902 (i386-mmx.c): Remove.
1903 (i386-mmx-linux.c): Remove.
1904 (reg-ia64.c): Remove.
1905 (reg-m32r.c): Remove.
1906 (reg-m68k.c): Remove.
1907 (reg-cf.c): Remove.
1908 (mips-linux.c): Remove.
1909 (mips-dsp-linux.c): Remove.
1910 (mips64-linux.c): Remove.
1911 (mips64-dsp-linux.c): Remove.
1912 (nios2-linux.c): Remove.
1913 (powerpc-32.c): Remove.
1914 (powerpc-32l.c): Remove.
1915 (powerpc-altivec32l.c): Remove.
1916 (powerpc-cell32l.c): Remove.
1917 (powerpc-vsx32l.c): Remove.
1918 (powerpc-isa205-32l.c): Remove.
1919 (powerpc-isa205-altivec32l.c): Remove.
1920 (powerpc-isa205-vsx32l.c): Remove.
1921 (powerpc-e500l.c): Remove.
1922 (powerpc-64l.c): Remove.
1923 (powerpc-altivec64l.c): Remove.
1924 (powerpc-cell64l.c): Remove.
1925 (powerpc-vsx64l.c): Remove.
1926 (powerpc-isa205-64l.c): Remove.
1927 (powerpc-isa205-altivec64l.c): Remove.
1928 (powerpc-isa205-vsx64l.c): Remove.
1929 (s390-linux32.c): Remove.
1930 (s390-linux32v1.c): Remove.
1931 (s390-linux32v2.c): Remove.
1932 (s390-linux64.c): Remove.
1933 (s390-linux64v1.c): Remove.
1934 (s390-linux64v2.c): Remove.
1935 (s390-te-linux64.c): Remove.
1936 (s390-vx-linux64.c): Remove.
1937 (s390-tevx-linux64.c): Remove.
1938 (s390x-linux64.c): Remove.
1939 (s390x-linux64v1.c): Remove.
1940 (s390x-linux64v2.c): Remove.
1941 (s390x-te-linux64.c): Remove.
1942 (s390x-vx-linux64.c): Remove.
1943 (s390x-tevx-linux64.c): Remove.
1944 (tic6x-c64xp-linux.c): Remove.
1945 (tic6x-c64x-linux.c): Remove.
1946 (tic6x-c62x-linux.c): Remove.
1947 (reg-sh.c): Remove.
1948 (reg-sparc64.c): Remove.
1949 (reg-spu.c): Remove.
1950 (amd64.c): Remove.
1951 (amd64-linux.c): Remove.
1952 (amd64-avx.c): Remove.
1953 (amd64-avx-linux.c): Remove.
1954 (amd64-avx-avx512.c): Remove.
1955 (amd64-avx-avx512-linux.c): Remove.
1956 (amd64-mpx.c): Remove.
1957 (amd64-mpx-linux.c): Remove.
1958 (amd64-avx-mpx-avx512-pku.c): Remove.
1959 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1960 (amd64-avx-mpx.c): Remove.
1961 (amd64-avx-mpx-linux.c): Remove.
1962 (x32.c): Remove.
1963 (x32-linux.c): Remove.
1964 (x32-avx.c): Remove.
1965 (x32-avx-linux.c): Remove.
1966 (x32-avx-avx512.c): Remove.
1967 (x32-avx-avx512-linux.c): Remove.
1968 (reg-xtensa.c): Remove.
1969 (reg-tilegx.c): Remove.
1970 (reg-tilegx32.c): Remove.
1971
1672e0d9
SDJ
19722017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1973
1974 * Makefile.in (SFILES): Add "common/environ.c".
1975 (OBJS): Add "common/environ.h".
1976
239b6d10
WT
19772017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1978
1979 * configure.ac: Check if the fs_base and gs_base members of
1980 `struct user_regs_struct' exist.
1981 * config.in: Regenerated.
1982 * configure: Likewise.
1983
694b382c
AT
19842017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1985
1986 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1987 target_read_memory.
1988 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1989 (get_next_pcs_syscall_next_pc): Likewise.
1990
7dc53023
LM
19912016-12-23 Luis Machado <lgustavo@codesourcery.com>
1992
1993 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1994 * nto-x86-low.c: Likewise.
1995
ad02e4fe
SM
19962016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1997
1998 * Makefile.in: Include disable-implicit-rules.mk.
1999
dcb07cfa
PA
20002016-11-23 Pedro Alves <palves@redhat.com>
2001
2002 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2003 (debug_vprintf): Use std::chrono::steady_clock instead of
2004 gettimeofday. Use '.' instead of ':'.
2005 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2006 (get_timestamp): Use std::chrono::steady_clock instead of
2007 gettimeofday.
2008
8629c02c
SM
20092016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2010
2011 * Makefile.in: Fix whitespace formatting.
2012
b593ecca
SM
20132016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2014
2015 * Makefile.in (SFILES, OBS): Flatten list and order
2016 alphabetically.
2017
9986ba08
PA
20182016-11-23 Pedro Alves <palves@redhat.com>
2019
2020 * event-loop.c (handle_file_event): Use warning.
2021 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2022 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2023 Use warning.
2024
4eefa7bc
PA
20252016-11-23 Pedro Alves <palves@redhat.com>
2026
2027 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2028 output.
2029 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2030 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2031 debug_printf and debug_flush for debug output.
2032 * server.c (handle_general_set): Likewise.
2033 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2034 output.
2035
5443506e
SM
20362016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2037
2038 * Makefile.in (.c.o): Replace rule with ...
2039 (%.o: %.c): ... this one.
2040
3b165252
SM
20412016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2044 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2045 make.
2046 * configure.ac: Remove checks for the make program.
2047 * configure: Re-generate.
2048
0bcda685
PA
20492016-10-28 Pedro Alves <palves@redhat.com>
2050
2051 * Makefile.in (CXX_DIALECT): Get from configure.
2052 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2053 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2054 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2055 * config.in: Regenerate.
2056 * configure: Regenerate.
2057
c3805894
YQ
20582016-10-27 Yao Qi <yao.qi@linaro.org>
2059
2060 * linux-low.c (linux_supports_range_stepping): Return true if
2061 can_software_single_step return true.
2062
89342618
YQ
20632016-10-27 Yao Qi <yao.qi@linaro.org>
2064
2065 * inferiors.c (find_inferior_in_random): New function.
2066 * inferiors.h (find_inferior_in_random): Declare.
2067 * linux-low.c (linux_wait_for_event_filtered): Call
2068 find_inferior_in_random instead of find_inferior.
2069
e3652c84
YQ
20702016-10-27 Yao Qi <yao.qi@linaro.org>
2071
2072 * linux-low.c (linux_wait_1): If single-step breakpoints are
2073 inserted, remove them.
2074
5a04c4cf
PA
20752016-10-26 Pedro Alves <palves@redhat.com>
2076
2077 * linux-low.c (handle_extended_wait): Link parent/child fork
2078 threads.
2079 (linux_wait_1): Unlink them.
2080 (linux_set_resume_request): Ignore resume requests for
2081 already-resumed and unhandled fork child threads.
2082 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2083 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2084 New functions.
2085 (handle_v_requests) <vCont>: Don't call require_running.
2086 * server.h (in_queued_stop_replies): New declaration.
2087
cb93dc7f
YQ
20882016-10-24 Yao Qi <yao.qi@linaro.org>
2089
2090 PR server/20733
2091 * linux-aarch64-low.c (append_insns): Cast the return value to
2092 'uint32_t *'.
2093
a1078bea
YQ
20942016-10-10 Yao Qi <yao.qi@linaro.org>
2095
2096 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2097
1fb77080
SDJ
20982016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2099
2100 * target.c (target_supports_multi_process): New function, moved
2101 from...
2102 * target.h (target_supports_multi_process): ... here. Remove
2103 macro.
2104
39b5a3b9
TT
21052016-10-05 Tom Tromey <tom@tromey.com>
2106
2107 PR remote/20655:
2108 * tracepoint.c (handle_tracepoint_bkpts): Check
2109 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2110
c1d0b70a
YQ
21112016-10-05 Yao Qi <yao.qi@linaro.org>
2112
2113 * configure.srv: Update the path of arm-*.xml files.
2114
0a69eedb
YQ
21152016-10-05 Terry Guo <terry.guo@arm.com>
2116 Yao Qi <yao.qi@linaro.org>
2117
2118 * Makefile.in: Adjust the path of rules.
2119 * configure.srv: Update the path of xml files.
2120 * regformats/arm-with-iwmmxt.dat: Regenerated.
2121 * regformats/arm-with-neon.dat: Likewise.
2122 * regformats/arm-with-vfpv2.dat: Likewise.
2123 * regformats/arm-with-vfpv3.dat Likewise.
2124
17e16485
YQ
21252016-09-30 Yao Qi <yao.qi@linaro.org>
2126
2127 PR gdbserver/20627
2128 * target.c (target_stop_and_wait): Don't call
2129 target_continue_no_signal, use resume_stop instead.
2130
edeeb602
YQ
21312016-09-26 Yao Qi <yao.qi@linaro.org>
2132
2133 * linux-low.c (linux_wait_1): Call debug_exit.
2134
503b1c39
PA
21352016-09-23 Pedro Alves <palves@redhat.com>
2136
2137 * Makefile.in (SFILES): Add common/new-op.c.
2138 (OBS): Add common/new-op.o.
2139 (new-op.o): New rule.
2140
74172ecf
SM
21412016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2142
2143 * .gitinore: Ignore more files.
2144
fc6cda2e
YQ
21452016-09-21 Yao Qi <yao.qi@linaro.org>
2146
2147 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2148 23.
2149
bc1e6c81
SDJ
21502016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2151
2152 * server.c (start_inferior): Call target_mourn_inferior instead of
2153 mourn_inferior; pass ptid_t argument to it.
2154 (resume): Likewise.
2155 (handle_target_event): Likewise.
2156 * target.c (target_mourn_inferior): New function.
2157 * target.h (mourn_inferior): Delete macro.
2158
0e00e962
AA
21592016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2160
2161 * linux-low.c (lwp_is_stepping): New function.
2162
1d8cb77d
CL
21632016-09-06 Carl Love <cel@us.ibm.com>
2164
2165 * server.c (start_inferior): Fixed comment, requested comment change
2166 didn't get updated correctly. Removed reference to ptrace () call as
2167 it is only true on Linux systems.
2168
7313bced
CL
21692016-09-06 Carl Love <cel@us.ibm.com>
2170
2171 * server.c (start_inferior): Do not call
2172 function target_post_create_inferior () if the
2173 inferior process has already exited.
2174
cf6de44d
PA
21752016-09-05 Pedro Alves <palves@redhat.com>
2176
2177 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2178 (COMPILE.pre, CC_LD): Use CXX directly.
2179 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2180 * acinclude.m4: Don't include build-with-cxx.m4.
2181 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2182 * configure: Regenerate.
2183
c1da6748
AT
21842016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2185
2186 PR gdb/19495
2187 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2188 call writing data to own_buf.
2189
f2b9e3df
SDJ
21902016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2191
2192 * target.c (mywait): Call target_wait instead of
2193 the_target->wait.
2194 (target_wait): New function.
2195
049a8570
SDJ
21962016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2197
2198 * server.c (start_inferior): New variable 'ptid'. Replace calls
2199 to the_target->resume by target_continue{,_no_signal}, depending
2200 on the case.
2201 * target.c (target_stop_and_wait): Call target_continue_no_signal
2202 instead of the_target->resume.
2203 (target_continue): New function.
2204
3aa5cfa0
AT
22052016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2206
2207 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2208
754653a7
AZ
22092016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2210
2211 PR server/20491
2212 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2213 ps_prochandle.
2214 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2215 * linux-arm-low.c (ps_get_thread_area): Likewise.
2216 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2217 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2218 * linux-mips-low.c (ps_get_thread_area): Likewise.
2219 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2220 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2221 * linux-x86-low.c (ps_get_thread_area): Likewise.
2222 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2223
ed036b40
PA
22242016-08-19 Pedro Alves <palves@redhat.com>
2225
2226 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2227
c8ef42ee
PA
22282016-08-19 Pedro Alves <palves@redhat.com>
2229
2230 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2231 comment. Use memcpy instead of casting through unsigned long.
2232
9c235a72
PA
22332016-08-19 Pedro Alves <palves@redhat.com>
2234
2235 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2236 allocating around 0x80000000.
2237
201506da
PA
22382016-08-19 Pedro Alves <palves@redhat.com>
2239
2240 PR gdb/20415
2241 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2242 (x32-avx512-linux-ipa.o): New rules.
2243 * configure.ac (x86_64-*-linux*): New x32 check.
2244 * configure.srv (ipa_x32_linux_regobj): New.
2245 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2246 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2247 descriptions.
2248 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2249 descriptions.
2250 * configure: Regenerate.
2251
f348d89a
PA
22522016-08-09 Pedro Alves <palves@redhat.com>
2253
2254 PR gdb/18653
2255 * Makefile.in (OBS): Add signals-state-save-restore.o.
2256 (signals-state-save-restore.o): New rule.
2257 * config.in: Regenerate.
2258 * configure: Regenerate.
2259 * linux-low.c: Include "signals-state-save-restore.h".
2260 (linux_create_inferior): Call
2261 restore_original_signals_state.
2262 * server.c: Include "dispositions-save-restore.h".
2263 (captured_main): Call save_original_signals_state.
2264
1baf5149
PA
22652016-08-05 Pedro Alves <palves@redhat.com>
2266
2267 * configure: Regenerate.
2268
fcd4a73d
YQ
22692016-08-04 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-low.c (regsets_fetch_inferior_registers): Check
2272 errno is ESRCH or not.
2273
979659d0
YQ
22742016-08-02 Yao Qi <yao.qi@linaro.org>
2275
2276 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2277 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2278 (thread_db_load_search): Update.
2279 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2280 td_ta_set_event and td_ta_event_getmsg.
2281
6598661d
PA
22822016-07-26 Pedro Alves <palves@redhat.com>
2283
2284 PR server/20414
2285 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2286 of unsigned long for 64-bit registers and use uint32_t instead of
2287 unsigned int for 32-bit registers.
2288
9cf12d57
PA
22892016-07-26 Pedro Alves <palves@redhat.com>
2290
2291 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2292 to 'ptrace'.
2293
305450ed
TT
22942016-07-21 Tom Tromey <tom@tromey.com>
2295
2296 * configure: Rebuild.
2297
2583da7c
YQ
22982016-07-21 Yao Qi <yao.qi@linaro.org>
2299
2300 * mem-break.c (find_gdb_breakpoint): Cast bp to
2301 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2302
21536b36
YQ
23032016-07-21 Yao Qi <yao.qi@linaro.org>
2304
2305 * server.c (handle_v_requests): Support s and S actions
2306 if target_supports_software_single_step return true.
2307
8901d193
YQ
23082016-07-21 Yao Qi <yao.qi@linaro.org>
2309
2310 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2311 is resume_step, call maybe_hw_step.
2312 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2313 and unstop them.
2314 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2315 breakpoints or not.
2316 (proceed_one_lwp): If resume request is resume_step, install
2317 reinsert breakpoints and call maybe_hw_step.
2318
0e9a339e
YQ
23192016-07-21 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-low.c (proceed_one_lwp): Declare.
2322 (linux_resume_one_thread): Remove local variable 'step'.
2323 Lift code enqueue signal. Call proceed_one_lwp instead of
2324 linux_resume_one_lwp.
2325
4281b351
YQ
23262016-07-21 Yao Qi <yao.qi@linaro.org>
2327
2328 * linux-low.c (linux_resume_one_thread): Call
2329 enqueue_pending_signal.
2330
984a2c04
YQ
23312016-07-21 Yao Qi <yao.qi@linaro.org>
2332
2333 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2334 * inferiors.c (do_restore_current_thread_cleanup): New function.
2335 (make_cleanup_restore_current_thread): Likewise.
2336 * linux-low.c (install_software_single_step_breakpoints): Call
2337 make_cleanup_restore_current_thread. Switch current_thread to
2338 thread.
2339
bec903c9
YQ
23402016-07-21 Yao Qi <yao.qi@linaro.org>
2341
2342 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2343 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2344 (clone_one_breakpoint): Likewise.
2345 (delete_reinsert_breakpoints): Change parameter to thread.
2346 Callers updated.
2347 (has_reinsert_breakpoints): Likewise.
2348 (uninsert_reinsert_breakpoints): Likewise.
2349 (reinsert_reinsert_breakpoints): Likewise.
2350 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2351 (delete_reinsert_breakpoints): Likewise.
2352 (reinsert_reinsert_breakpoints): Likewise.
2353 (uninsert_reinsert_breakpoints): Likewise.
2354 (has_reinsert_breakpoints): Likewise.
2355
63c40ec7
YQ
23562016-07-21 Yao Qi <yao.qi@linaro.org>
2357
2358 * inferiors.c (get_thread_process): Make parameter const.
2359 * inferiors.h (get_thread_process): Update declaration.
2360 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2361 Add new parameters child_thread and parent_thread. Callers
2362 updated.
2363 * mem-break.h (clone_all_breakpoints): Update declaration.
2364
9aa76cd0
YQ
23652016-07-21 Yao Qi <yao.qi@linaro.org>
2366
2367 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2368 <command_list, handler>: Remove.
2369 (struct gdb_breakpoint): New.
2370 (struct other_breakpoint): New.
2371 (struct reinsert_breakpoint): New.
2372 (is_gdb_breakpoint): New function.
2373 (any_persistent_commands): Update command_list if
2374 is_gdb_breakpoint returns true.
2375 (set_breakpoint): Create breakpoints according to their types.
2376 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2377 (set_gdb_breakpoint_1): Likewise.
2378 (set_gdb_breakpoint): Likewise.
2379 (clear_breakpoint_conditions): Change parameter type to
2380 'struct gdb_breakpoint *'.
2381 (clear_breakpoint_commands): Likewise.
2382 (clear_breakpoint_conditions_and_commands): Likewise.
2383 (add_condition_to_breakpoint): Likewise.
2384 (add_breakpoint_condition): Likewise.
2385 (add_commands_to_breakpoint): Likewise.
2386 (check_breakpoints): Check other_breakpoint.
2387 (clone_one_breakpoint): Clone breakpopint according to its type.
2388 * mem-break.h (struct gdb_breakpoint): Declare.
2389 (set_gdb_breakpoint): Update declaration.
2390 (clear_breakpoint_conditions_and_commands): Likewise.
2391 (add_breakpoint_condition): Likewise.
2392 (add_breakpoint_commands): Likewise.
2393 * server.c (process_point_options): Change parameter type to
2394 'struct gdb_breakpoint *'.
2395
811f8301
YQ
23962016-07-21 Yao Qi <yao.qi@linaro.org>
2397
2398 * mem-break.c (set_breakpoint_at): Rename it to ...
2399 (set_breakpoint_type_at): ... it.
2400 (set_breakpoint_at): Call set_breakpoint_type_at.
2401 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2402 * mem-break.h (set_breakpoint_at): Update comments.
2403
b1c51e36
CLT
24042016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2405
2406 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2407 to buf parameter.
2408 (nios2_store_gregset): Likewise.
2409
ced2dffb
PA
24102016-07-01 Pedro Alves <palves@redhat.com>
2411 Antoine Tremblay <antoine.tremblay@ericsson.com>
2412
2413 * linux-low.c: Change interface to take the target lwp_info
2414 pointer directly and return void. Handle detaching from a zombie
2415 thread.
2416 (linux_detach_lwp_callback): New function.
2417 (linux_detach): Detach from the leader thread after detaching from
2418 the clone threads.
2419
2ac09a5b
YQ
24202016-06-28 Yao Qi <yao.qi@linaro.org>
2421
2422 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2423 for variable new_offset.
2424 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2425 (aarch64_ftrace_insn_reloc_cb): Likewise.
2426 (aarch64_ftrace_insn_reloc_tb): Likewise.
2427 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2428 PRIx64 instead of PRIx32.
2429
79e7fd4f
YQ
24302016-06-28 Yao Qi <yao.qi@linaro.org>
2431
2432 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2433 (the_low_target): Install arm_get_syscall_trapinfo.
2434
061fc021
YQ
24352016-06-28 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2438 function.
2439 (the_low_target): Install aarch64_get_syscall_trapinfo.
2440
4cc32bec
YQ
24412016-06-28 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2444 Callers updated.
2445 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2446 Remove parameter sysno.
2447 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2448 sysret.
2449
782c1122
AA
24502016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2451
2452 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2453 (s390_emit_ne_goto): Likewise.
2454 (s390_emit_lt_goto): Likewise.
2455 (s390_emit_le_goto): Likewise.
2456 (s390_emit_gt_goto): Likewise.
2457 (s390_emit_ge_goto): Likewise.
2458 (s390x_emit_eq_goto): Likewise.
2459 (s390x_emit_ne_goto): Likewise.
2460 (s390x_emit_lt_goto): Likewise.
2461 (s390x_emit_le_goto): Likewise.
2462 (s390x_emit_gt_goto): Likewise.
2463 (s390x_emit_ge_goto): Likewise.
2464 (s390_emit_ops_impl): Mark variable static.
2465 (s390x_emit_ops): Likewise.
2466
2e7b624b
YQ
24672016-06-17 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-low.c (handle_extended_wait): Call
2470 uninsert_reinsert_breakpoints for the parent process. Remove
2471 reinsert breakpoints from the child process. Reinsert them to
2472 the parent process when vfork is done.
2473 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2474 (reinsert_reinsert_breakpoints): New function.
2475 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2476 (reinsert_reinsert_breakpoints): Declare.
2477
8a81c5d7
YQ
24782016-06-17 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-low.c (handle_extended_wait): If the parent is doing
2481 step-over, remove the reinsert breakpoints from the forked child.
2482
f50bf8e5
YQ
24832016-06-17 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-low.c (unsuspend_all_lwps): Declare.
2486 (linux_low_filter_event): If thread exited, call finish_step_over.
2487 If step-over is finished, unsuspend other threads.
2488
8376a3cb
YQ
24892016-06-17 Yao Qi <yao.qi@linaro.org>
2490
2491 * linux-low.c (linux_resume_one_lwp_throw): Assert
2492 has_reinsert_breakpoints returns false.
2493 * mem-break.c (delete_disabled_breakpoints): Assert
2494 bp type isn't reinsert_breakpoint.
2495
f79b145d
YQ
24962016-06-17 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-low.c (maybe_hw_step): New function.
2499 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2500 (finish_step_over): Switch current_thread to lwp temporarily,
2501 and assert has_reinsert_breakpoints returns true.
2502 (proceed_one_lwp): Call maybe_hw_step.
2503 * mem-break.c (has_reinsert_breakpoints): New function.
2504 * mem-break.h (has_reinsert_breakpoints): Declare.
2505
0ae534d2
JT
25062016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2507
2508 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2509
fcdad592
YQ
25102016-05-17 Yao Qi <yao.qi@linaro.org>
2511
2512 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2513 instead of find_inferior.
2514
9e784964
YQ
25152016-05-05 Yao Qi <yao.qi@linaro.org>
2516
2517 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2518 Initialize res to zero.
2519
cf2ebb6e
YQ
25202016-05-05 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2523 to uint32_t.
2524
c1aebf87
UW
25252016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2526
2527 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2528 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2529 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2530
35fd2deb 25312016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2532 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2533
2534 * tracepoint.c (write_inferior_int8): New function.
2535 (cmd_qtenable_disable): Write enable flag using
2536 write_inferior_int8.
2537
484b3c32
YQ
25382016-04-25 Yao Qi <yao.qi@linaro.org>
2539
2540 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2541 (need_step_over_p): Return zero if the LWP has pending signals
2542 can be delivered on software single step target.
2543
85ba7d86
YQ
25442016-04-25 Yao Qi <yao.qi@linaro.org>
2545
2546 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2547 return instead of error.
2548
3539aa13
YQ
25492016-04-22 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2552 to 23.
2553
5b061e98
YQ
25542016-04-22 Yao Qi <yao.qi@linaro.org>
2555
2556 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2557 signal when stepping over breakpoint with software single
2558 step.
2559
3451269c
PA
25602016-04-21 Pedro Alves <palves@redhat.com>
2561
2562 * linux-s390-low.c (s390_collect_ptrace_register)
2563 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2564 add casts.
2565 (s390_check_regset): Use void * instead of gdb_byte *.
2566
a2358508
PA
25672016-04-20 Pedro Alves <palves@redhat.com>
2568
2569 * configure: Renegerate.
2570
6885166d
YQ
25712016-04-20 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2574 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2575 number 16.
2576 (arm_store_gregset): Likewise.
2577
2b863f51
WT
25782016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2579
2580 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2581 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2582 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2583 (amd64-avx-mpx-linux.c): New rules.
2584 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2585 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2586 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2587 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2588 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2589 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2590 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2591 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2592 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2593 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2594 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2595 * linux-x86-low.c (x86_linux_read_description): Add case for
2596 X86_XSTATE_AVX_MPX_MASK.
2597 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2598 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2599 init_registers_i386_avx_mpx_linux.
2600 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2601 (initialize_low_tracepoint): Call
2602 init_registers_i386_avx_mpx_linux.
2603 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2604 (initialize_low_tracepoint): Call
2605 init_registers_amd64_avx_mpx_linux.
2606 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2607 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2608 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2609 declarations.
2610
9b30624b
PA
26112016-04-18 Pedro Alves <palves@redhat.com>
2612
2613 * configure: Regenerate.
2614
45e3745e
AT
26152016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2616
2617 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2618 (aarch64_emit_sub): Likewise.
2619
2afc13ff
PA
26202016-04-12 Pedro Alves <palves@redhat.com>
2621
2622 * utils.c (prepare_to_throw_exception): Delete.
2623
6e774b13
SM
26242016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2625
2626 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2627
4dca19f8
MK
26282016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2629
2630 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2631
d0a9981f
MK
26322016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2633
2634 * linux-aarch64-ipa.c: Add <elf.h> include.
2635 * linux-ppc-ipa.c: Add <elf.h> include.
2636 * linux-s390-ipa.c: Add <elf.h> include.
2637
252db07e
MK
26382016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2639
2640 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2641 (get_raw_reg_ptr): Likewise.
2642 (get_trace_state_variable_value_ptr): Likewise.
2643 (set_trace_state_variable_value_ptr): Likewise.
2644 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2645 char *.
2646
14e2b6d9
MK
26472016-03-31 Wei-cheng Wang <cole945@gmail.com>
2648 Marcin Kościelnicki <koriakin@0x04.net>
2649
2650 PR/17221
2651 * linux-ppc-low.c (emit_insns): New function.
2652 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2653 (ppc_emit_prologue): New function.
2654 (ppc_emit_epilogue): New function.
2655 (ppc_emit_add): New function.
2656 (ppc_emit_sub): New function.
2657 (ppc_emit_mul): New function.
2658 (ppc_emit_lsh): New function.
2659 (ppc_emit_rsh_signed): New function.
2660 (ppc_emit_rsh_unsigned): New function.
2661 (ppc_emit_ext): New function.
2662 (ppc_emit_zero_ext): New function.
2663 (ppc_emit_log_not): New function.
2664 (ppc_emit_bit_and): New function.
2665 (ppc_emit_bit_or): New function.
2666 (ppc_emit_bit_xor): New function.
2667 (ppc_emit_bit_not): New function.
2668 (ppc_emit_equal): New function.
2669 (ppc_emit_less_signed): New function.
2670 (ppc_emit_less_unsigned): New function.
2671 (ppc_emit_ref): New function.
2672 (ppc_emit_const): New function.
2673 (ppc_emit_reg): New function.
2674 (ppc_emit_pop): New function.
2675 (ppc_emit_stack_flush): New function.
2676 (ppc_emit_swap): New function.
2677 (ppc_emit_stack_adjust): New function.
2678 (ppc_emit_call): New function.
2679 (ppc_emit_int_call_1): New function.
2680 (ppc_emit_void_call_2): New function.
2681 (ppc_emit_if_goto): New function.
2682 (ppc_emit_goto): New function.
2683 (ppc_emit_eq_goto): New function.
2684 (ppc_emit_ne_goto): New function.
2685 (ppc_emit_lt_goto): New function.
2686 (ppc_emit_le_goto): New function.
2687 (ppc_emit_gt_goto): New function.
2688 (ppc_emit_ge_goto): New function.
2689 (ppc_write_goto_address): New function.
2690 (ppc_emit_ops_impl): New static variable.
2691 (ppc64v1_emit_prologue): New function.
2692 (ppc64v2_emit_prologue): New function.
2693 (ppc64_emit_epilogue): New function.
2694 (ppc64_emit_add): New function.
2695 (ppc64_emit_sub): New function.
2696 (ppc64_emit_mul): New function.
2697 (ppc64_emit_lsh): New function.
2698 (ppc64_emit_rsh_signed): New function.
2699 (ppc64_emit_rsh_unsigned): New function.
2700 (ppc64_emit_ext): New function.
2701 (ppc64_emit_zero_ext): New function.
2702 (ppc64_emit_log_not): New function.
2703 (ppc64_emit_bit_and): New function.
2704 (ppc64_emit_bit_or): New function.
2705 (ppc64_emit_bit_xor): New function.
2706 (ppc64_emit_bit_not): New function.
2707 (ppc64_emit_equal): New function.
2708 (ppc64_emit_less_signed): New function.
2709 (ppc64_emit_less_unsigned): New function.
2710 (ppc64_emit_ref): New function.
2711 (ppc64_emit_const): New function.
2712 (ppc64v1_emit_reg): New function.
2713 (ppc64v2_emit_reg): New function.
2714 (ppc64_emit_pop): New function.
2715 (ppc64_emit_stack_flush): New function.
2716 (ppc64_emit_swap): New function.
2717 (ppc64v1_emit_call): New function.
2718 (ppc64v2_emit_call): New function.
2719 (ppc64v1_emit_int_call_1): New function.
2720 (ppc64v2_emit_int_call_1): New function.
2721 (ppc64v1_emit_void_call_2): New function.
2722 (ppc64v2_emit_void_call_2): New function.
2723 (ppc64_emit_if_goto): New function.
2724 (ppc64_emit_eq_goto): New function.
2725 (ppc64_emit_ne_goto): New function.
2726 (ppc64_emit_lt_goto): New function.
2727 (ppc64_emit_le_goto): New function.
2728 (ppc64_emit_gt_goto): New function.
2729 (ppc64_emit_ge_goto): New function.
2730 (ppc64v1_emit_ops_impl): New static variable.
2731 (ppc64v2_emit_ops_impl): New static variable.
2732 (ppc_emit_ops): New function.
2733 (linux_low_target): Wire in ppc_emit_ops.
2734
a2174ba4
MK
27352016-03-31 Wei-cheng Wang <cole945@gmail.com>
2736 Marcin Kościelnicki <koriakin@0x04.net>
2737
2738 PR/17221
2739 * Makefile.in: Add powerpc-*-ipa.o
2740 * configure.srv: Add ipa_obj for powerpc*-linux.
2741 * linux-ppc-ipa.c: New file.
2742 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2743 includes.
2744 (PPC_FIELD): New macro.
2745 (PPC_SEXT): New macro.
2746 (PPC_OP6): New macro.
2747 (PPC_BO): New macro.
2748 (PPC_LI): New macro.
2749 (PPC_BD): New macro.
2750 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2751 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2752 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2753 (ppc_get_thread_area): New function.
2754 (is_elfv2_inferior): New function.
2755 (gen_ds_form): New function.
2756 (GEN_STD): New macro.
2757 (GEN_STDU): New macro.
2758 (GEN_LD): New macro.
2759 (GEN_LDU): New macro.
2760 (gen_d_form): New function.
2761 (GEN_ADDI): New macro.
2762 (GEN_ADDIS): New macro.
2763 (GEN_LI): New macro.
2764 (GEN_LIS): New macro.
2765 (GEN_ORI): New macro.
2766 (GEN_ORIS): New macro.
2767 (GEN_LWZ): New macro.
2768 (GEN_STW): New macro.
2769 (GEN_STWU): New macro.
2770 (gen_xfx_form): New function.
2771 (GEN_MFSPR): New macro.
2772 (GEN_MTSPR): New macro.
2773 (GEN_MFCR): New macro.
2774 (GEN_MTCR): New macro.
2775 (GEN_SYNC): New macro.
2776 (GEN_LWSYNC): New macro.
2777 (gen_x_form): New function.
2778 (GEN_OR): New macro.
2779 (GEN_MR): New macro.
2780 (GEN_LWARX): New macro.
2781 (GEN_STWCX): New macro.
2782 (GEN_CMPW): New macro.
2783 (gen_md_form): New function.
2784 (GEN_RLDICL): New macro.
2785 (GEN_RLDICR): New macro.
2786 (gen_i_form): New function.
2787 (GEN_B): New macro.
2788 (GEN_BL): New macro.
2789 (gen_b_form): New function.
2790 (GEN_BNE): New macro.
2791 (GEN_LOAD): New macro.
2792 (GEN_STORE): New macro.
2793 (gen_limm): New function.
2794 (gen_atomic_xchg): New function.
2795 (gen_call): New function.
2796 (ppc_relocate_instruction): New function.
2797 (ppc_install_fast_tracepoint_jump_pad): New function.
2798 (ppc_get_min_fast_tracepoint_insn_len): New function.
2799 (ppc_get_ipa_tdesc_idx): New function.
2800 (the_low_target): Wire in the new functions.
2801 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2802 tdescs.
2803 * linux-ppc-tdesc.h: New file.
2804
a13c4696
MK
28052016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2806
2807 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2808 (alloc_jump_pad_buffer): New function.
2809 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2810 (alloc_jump_pad_buffer): New function.
2811 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2812 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2813 (alloc_jump_pad_buffer): New function.
2814 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2815 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2816 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2817 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2818
1cda1512
MK
28192016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2820
2821 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2822 * linux-amd64-ipa.c: Likewise.
2823 * linux-i386-ipa.c: Likewise.
2824 * linux-s390-ipa.c: Likewise.
2825 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2826 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2827 set_trace_state_variable_value_ptr.
2828 (struct ipa_sym_addresses): Likewise.
2829 (symbol_list): Likewise.
2830 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2831 accessing gdb_collect directly.
2832 (gdb_collect_ptr_type): New typedef.
2833 (get_raw_reg_ptr_type): New typedef.
2834 (get_trace_state_variable_value_ptr_type): New typedef.
2835 (set_trace_state_variable_value_ptr_type): New typedef.
2836 (gdb_collect_ptr): New global.
2837 (get_raw_reg_ptr): New global.
2838 (get_trace_state_variable_value_ptr): New global.
2839 (set_trace_state_variable_value_ptr): New global.
2840 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2841 accessing get_raw_reg directly.
2842 (get_get_tsv_func_addr): Likewise for
2843 get_trace_state_variable_value_ptr.
2844 (get_set_tsv_func_addr): Likewise for
2845 set_trace_state_variable_value_ptr.
2846 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2847
72fb5488
SM
28482016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2849
2850 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2851
28170b88
MK
28522016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2853
2854 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2855 packets.
2856 (relocate_instruction): Remove own_buf.
2857 * server.c (own_buf): Make global.
2858 (handle_v_requests): Make global.
2859 * server.h (own_buf): New declaration.
2860 (handle_v_requests): New prototype.
2861
f39e8743
MK
28622016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2863
2864 PR 18377
2865 * linux-s390-low.c (add_insns): New function.
2866 (s390_emit_prologue): New function.
2867 (s390_emit_epilogue): New function.
2868 (s390_emit_add): New function.
2869 (s390_emit_sub): New function.
2870 (s390_emit_mul): New function.
2871 (s390_emit_lsh): New function.
2872 (s390_emit_rsh_signed): New function.
2873 (s390_emit_rsh_unsigned): New function.
2874 (s390_emit_ext): New function.
2875 (s390_emit_log_not): New function.
2876 (s390_emit_bit_and): New function.
2877 (s390_emit_bit_or): New function.
2878 (s390_emit_bit_xor): New function.
2879 (s390_emit_bit_not): New function.
2880 (s390_emit_equal): New function.
2881 (s390_emit_less_signed): New function.
2882 (s390_emit_less_unsigned): New function.
2883 (s390_emit_ref): New function.
2884 (s390_emit_if_goto): New function.
2885 (s390_emit_goto): New function.
2886 (s390_write_goto_address): New function.
2887 (s390_emit_litpool): New function.
2888 (s390_emit_const): New function.
2889 (s390_emit_call): New function.
2890 (s390_emit_reg): New function.
2891 (s390_emit_pop): New function.
2892 (s390_emit_stack_flush): New function.
2893 (s390_emit_zero_ext): New function.
2894 (s390_emit_swap): New function.
2895 (s390_emit_stack_adjust): New function.
2896 (s390_emit_set_r2): New function.
2897 (s390_emit_int_call_1): New function.
2898 (s390_emit_void_call_2): New function.
2899 (s390_emit_eq_goto): New function.
2900 (s390_emit_ne_goto): New function.
2901 (s390_emit_lt_goto): New function.
2902 (s390_emit_le_goto): New function.
2903 (s390_emit_gt_goto): New function.
2904 (s390_emit_ge_goto): New function.
2905 (s390x_emit_prologue): New function.
2906 (s390x_emit_epilogue): New function.
2907 (s390x_emit_add): New function.
2908 (s390x_emit_sub): New function.
2909 (s390x_emit_mul): New function.
2910 (s390x_emit_lsh): New function.
2911 (s390x_emit_rsh_signed): New function.
2912 (s390x_emit_rsh_unsigned): New function.
2913 (s390x_emit_ext): New function.
2914 (s390x_emit_log_not): New function.
2915 (s390x_emit_bit_and): New function.
2916 (s390x_emit_bit_or): New function.
2917 (s390x_emit_bit_xor): New function.
2918 (s390x_emit_bit_not): New function.
2919 (s390x_emit_equal): New function.
2920 (s390x_emit_less_signed): New function.
2921 (s390x_emit_less_unsigned): New function.
2922 (s390x_emit_ref): New function.
2923 (s390x_emit_if_goto): New function.
2924 (s390x_emit_const): New function.
2925 (s390x_emit_call): New function.
2926 (s390x_emit_reg): New function.
2927 (s390x_emit_pop): New function.
2928 (s390x_emit_stack_flush): New function.
2929 (s390x_emit_zero_ext): New function.
2930 (s390x_emit_swap): New function.
2931 (s390x_emit_stack_adjust): New function.
2932 (s390x_emit_int_call_1): New function.
2933 (s390x_emit_void_call_2): New function.
2934 (s390x_emit_eq_goto): New function.
2935 (s390x_emit_ne_goto): New function.
2936 (s390x_emit_lt_goto): New function.
2937 (s390x_emit_le_goto): New function.
2938 (s390x_emit_gt_goto): New function.
2939 (s390x_emit_ge_goto): New function.
2940 (s390_emit_ops): New function.
2941 (struct linux_target_ops): Fill in emit_ops hook.
2942
abd9baf9
MK
29432016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2944
2945 PR 18377
2946 * Makefile.in: Add s390 IPA files.
2947 * configure.srv: Build IPA for s390.
2948 * linux-s390-ipa.c: New file.
2949 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2950 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2951 (tdesc_s390_linux32): Likewise.
2952 (init_registers_s390_linux32v1): Likewise.
2953 (tdesc_s390_linux32v1): Likewise.
2954 (init_registers_s390_linux32v2): Likewise.
2955 (tdesc_s390_linux32v2): Likewise.
2956 (init_registers_s390_linux64): Likewise.
2957 (tdesc_s390_linux64): Likewise.
2958 (init_registers_s390_linux64v1): Likewise.
2959 (tdesc_s390_linux64v1): Likewise.
2960 (init_registers_s390_linux64v2): Likewise.
2961 (tdesc_s390_linux64v2): Likewise.
2962 (init_registers_s390_te_linux64): Likewise.
2963 (tdesc_s390_te_linux64): Likewise.
2964 (init_registers_s390_vx_linux64): Likewise.
2965 (tdesc_s390_vx_linux64): Likewise.
2966 (init_registers_s390_tevx_linux64): Likewise.
2967 (tdesc_s390_tevx_linux64): Likewise.
2968 (init_registers_s390x_linux64): Likewise.
2969 (tdesc_s390x_linux64): Likewise.
2970 (init_registers_s390x_linux64v1): Likewise.
2971 (tdesc_s390x_linux64v1): Likewise.
2972 (init_registers_s390x_linux64v2): Likewise.
2973 (tdesc_s390x_linux64v2): Likewise.
2974 (init_registers_s390x_te_linux64): Likewise.
2975 (tdesc_s390x_te_linux64): Likewise.
2976 (init_registers_s390x_vx_linux64): Likewise.
2977 (tdesc_s390x_vx_linux64): Likewise.
2978 (init_registers_s390x_tevx_linux64): Likewise.
2979 (tdesc_s390x_tevx_linux64): Likewise.
2980 (have_hwcap_s390_vx): New static variable.
2981 (s390_arch_setup): Fill have_hwcap_s390_vx.
2982 (s390_get_thread_area): New function.
2983 (s390_ft_entry_gpr_esa): New const.
2984 (s390_ft_entry_gpr_zarch): New const.
2985 (s390_ft_entry_misc): New const.
2986 (s390_ft_entry_fr): New const.
2987 (s390_ft_entry_vr): New const.
2988 (s390_ft_main_31): New const.
2989 (s390_ft_main_64): New const.
2990 (s390_ft_exit_fr): New const.
2991 (s390_ft_exit_vr): New const.
2992 (s390_ft_exit_misc): New const.
2993 (s390_ft_exit_gpr_esa): New const.
2994 (s390_ft_exit_gpr_zarch): New const.
2995 (append_insns): New function.
2996 (s390_relocate_instruction): New function.
2997 (s390_install_fast_tracepoint_jump_pad): New function.
2998 (s390_get_min_fast_tracepoint_insn_len): New function.
2999 (s390_get_ipa_tdesc_idx): New function.
3000 (struct linux_target_ops): Wire in the above functions.
3001 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3002 * linux-s390-tdesc.h: New file.
3003
a4105d04
MK
30042016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3005
3006 * linux-s390-low.c (s390_supports_tracepoints): New function.
3007 (struct linux_target_ops): Fill supports_tracepoints hook.
3008
35ac8b3e
YQ
30092016-03-18 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-low.c (lwp_signal_can_be_delivered): New function.
3012 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3013
94610ec4
YQ
30142016-03-18 Yao Qi <yao.qi@linaro.org>
3015
3016 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3017 0 if signal is enqueued. Remove 'signal' from one debugging
3018 message. Move one debugging message to some lines below.
3019 Remove code setting 'signal' to 0.
3020
80aea927
YQ
30212016-03-18 Yao Qi <yao.qi@linaro.org>
3022
3023 * linux-low.c (linux_low_filter_event): Remove redundant
3024 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3025
b04fd3be
MK
30262016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3027
3028 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3029 (struct linux_target_ops): Wire in the above.
3030
c40c8d4b
YQ
30312016-03-03 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-low.c: Update comments to start_step_over.
3034
0f8288ae
YQ
30352016-03-03 Yao Qi <yao.qi@linaro.org>
3036
3037 PR server/19736
3038 * linux-low.c (handle_extended_wait): Set child suspended
3039 if event_lwp->bp_reinsert isn't zero.
3040
fdbd04a8
YQ
30412016-03-02 Yao Qi <yao.qi@linaro.org>
3042
3043 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3044 enqueue_pending_signal.
3045
6896a8fa
MK
30462016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3047
3048 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3049 is actually loaded.
3050
ab503087
MK
30512016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3052
3053 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3054 (s390_regmap_3264) [!__s390x__]: New global.
3055 (s390_collect_ptrace_register): Skip map entries containing -1.
3056 (s390_supply_ptrace_register): Ditto.
3057 (s390_fill_gprs_high): New function.
3058 (s390_store_gprs_high): New function.
3059 (s390_regsets): Add NT_S390_HIGH_GPRS.
3060 (s390_get_hwcap): Enable on 31-bit.
3061 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3062 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3063 Detect NT_S390_HIGH_GPRS.
3064 (s390_usrregs_info_3264): Enable on 31-bit.
3065 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3066 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3067
ae91f625
MK
30682016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3069
3070 PR gdb/13808
3071 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3072 * configure.srv: Ditto.
3073 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3074 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3075 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3076 (init_registers_amd64_linux): Remove prototype.
3077 (tdesc_amd64_linux): Remove declaration.
3078 (get_ipa_tdesc): New function.
3079 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3080 initialize remaining tdescs.
3081 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3082 (init_registers_i386_linux): Remove prototype.
3083 (tdesc_i386_linux): Remove declaration.
3084 (get_ipa_tdesc): New function.
3085 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3086 initialize remaining tdescs.
3087 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3088 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3089 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3090 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3091 (x86_get_ipa_tdesc_idx): New function.
3092 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3093 * linux-x86-tdesc.h: New file.
3094 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3095 (target_get_ipa_tdesc_idx): New macro.
3096 * tracepoint.c (ipa_tdesc_idx): New macro.
3097 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3098 (symbol_list): Add ipa_tdesc_idx.
3099 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3100 (ipa_tdesc): Remove.
3101 (ipa_tdesc_idx): New variable.
3102 (get_context_regcache): Use get_ipa_tdesc.
3103 (gdb_collect): Ditto.
3104 (gdb_probe): Ditto.
3105 * tracepoint.h (get_ipa_tdesc): New prototype.
3106 (ipa_tdesc): Remove.
3107
e7ad2f14
PA
31082016-02-24 Pedro Alves <palves@redhat.com>
3109
3110 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3111 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3112 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3113 Factor out common code between the USE_SIGTRAP_SIGINFO and
3114 !USE_SIGTRAP_SIGINFO blocks.
3115 (linux_low_filter_event): Call save_stop_reason instead of
3116 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3117 Update comments.
3118 (linux_wait_1): Update comments.
3119
657f9cde
WW
31202016-02-24 Wei-cheng Wang <cole945@gmail.com>
3121
3122 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3123 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3124 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3125 ppc_insert_point, ppc_remove_point.
3126
b00b61e1
MK
31272016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3128
3129 * linux-s390-low.c (s390_supports_z_point_type): New function.
3130 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3131
553cb527
YQ
31322016-02-16 Yao Qi <yao.qi@linaro.org>
3133
3134 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3135 PC. Get pc from regcache_read_pc.
3136
a5652c21
YQ
31372016-02-12 Yao Qi <yao.qi@linaro.org>
3138
3139 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3140 or linux_get_pc_32bit.
3141 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3142
ed443b61
YQ
31432016-02-12 Yao Qi <yao.qi@linaro.org>
3144
3145 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3146 arm_linux_get_next_pcs_fixup.
3147
020ecd38
MK
31482016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3149
3150 * tracepoint.c (x_tracepoint_action_download): Change
3151 write_inferior_data_ptr to write_inferior_data_pointer.
3152 (cmd_qtstart): Likewise.
3153 (write_inferior_data_ptr): Remove.
3154 (download_agent_expr): Change write_inferior_data_ptr to
3155 write_inferior_data_pointer.
3156 (download_tracepoint_1): Likewise.
3157 (download_tracepoint): Likewise.
3158 (download_trace_state_variables): Likewise.
3159
7cae9051
WW
31602016-02-11 Wei-cheng Wang <cole945@gmail.com>
3161 Marcin Kościelnicki <koriakin@0x04.net>
3162
3163 * tracepoint.c (struct tracepoint_action_ops): Remove.
3164 (struct tracepoint_action): Remove ops.
3165 (m_tracepoint_action_download, r_tracepoint_action_download)
3166 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3167 size and offset accordingly.
3168 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3169 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3170 (tracepoint_action_send, tracepoint_action_download): New functions.
3171 Helpers for trace action handlers.
3172 (add_tracepoint_action): Remove setup actions ops.
3173 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3174
9f6a71b4
YQ
31752016-02-10 Yao Qi <yao.qi@linaro.org>
3176
3177 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3178
1e94266c
SM
31792016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3180
3181 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3182 to AC_OUTPUT.
3183 * configure: Regenerate.
3184
8adce034
SM
31852016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3186
3187 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3188 void * to gdb_byte *.
3189 * linux-low.c (siginfo_fixup): Likewise.
3190 (linux_xfer_siginfo): Likewise.
3191 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3192 Likewise.
3193 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3194
93813b37
WT
31952016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3196
3197 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3198 to srv_tgtobj.
3199 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3200 to srv_tgtobj.
3201 * linux-x86-low.c [__x86_64__]: Include
3202 "nat/amd64-linux-siginfo.h".
3203 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3204 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3205 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3206 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3207 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3208 (cpt_si_fd, si_timerid, si_overrun): Move from
3209 nat/amd64-linux-siginfo.c.
3210 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3211
8424cc97
SM
32122016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3213
3214 * server.c (skip_to_semicolon): Remove.
3215 (process_point_options): Use strchrnul instead of
3216 skip_to_semicolon.
3217
4d18591b
YQ
32182016-01-26 Yao Qi <yao.qi@linaro.org>
3219
3220 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3221 * linux-low.c (install_software_single_step_breakpoints): Don't
3222 call regcache_read_pc.
3223 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3224 argument pc.
3225
d8020970
YQ
32262016-01-26 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-low.c (install_software_single_step_breakpoints): Call
3229 regcache_read_pc instead of get_pc.
3230
8b207339
YQ
32312016-01-26 Yao Qi <yao.qi@linaro.org>
3232
3233 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3234 (unblock_async_io): Rename to ...
3235 (block_unblock_async_io): ... it. New function.
3236 (enable_async_io): Don't install SIGIO handler. Unblock it
3237 instead.
3238 (disable_async_io): Don't ignore SIGIO. Block it instead.
3239 (initialize_async_io): Install SIGIO handler. Don't call
3240 unblock_async_io.
3241
18879fef
YQ
32422016-01-26 Yao Qi <yao.qi@linaro.org>
3243
3244 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3245 first character is '\003', call *the_target->request_interrupt.
3246
a0f8e08a
YQ
32472016-01-25 Yao Qi <yao.qi@linaro.org>
3248
3249 * remote-utils.c (new_thread_notify): Remove.
3250 (dead_thread_notify): Likewise.
3251 * remote-utils.h (new_thread_notify): Remove declaration.
3252 (dead_thread_notify): Likewise.
3253
cc5fd9ab
MK
32542016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3255
3256 * gdb.trace/pending.exp: Fix expected message on continue.
3257
99e8eb11
MK
32582016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3259
3260 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3261 it works properly on big-endian machines where sizeof (CORE_ADDR)
3262 != sizeof (void *).
3263
a994041d
PA
32642016-01-21 Pedro Alves <palves@redhat.com>
3265
3266 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3267 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3268 * configure: Regenerate.
3269
f7a6a40d
YQ
32702016-01-21 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3273 is_thumb and set it according to CPSR saved on the stack.
3274 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3275 arm_sigreturn_next_pc.
3276
6f69e520
YQ
32772016-01-18 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-low.c (linux_set_pc_64bit): New function.
3280 (linux_get_pc_64bit): New function.
3281 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3282 Declare.
3283 * linux-sparc-low.c (debug_threads): Remove declaration.
3284 (sparc_get_pc): Remove.
3285 (the_low_target): Use linux_get_pc_64bit instead of
3286 sparc_get_pc.
3287 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3288 (the_low_target): Use linux_get_pc_64bit and
3289 linux_set_pc_64bit.
3290
276d4552
YQ
32912016-01-18 Yao Qi <yao.qi@linaro.org>
3292
3293 * linux-arm-low.c (debug_threads): Remove declaration.
3294 (arm_get_pc, arm_set_pc): Remove.
3295 (the_low_target): Use linux_get_pc_32bit and
3296 linux_set_pc_32bit.
3297 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3298 (the_low_target): Use linux_get_pc_32bit and
3299 linux_set_pc_32bit.
3300 * linux-cris-low.c (debug_threads): Remove declaration.
3301 (cris_get_pc, cris_set_pc,): Remove.
3302 (the_low_target): Use linux_get_pc_32bit and
3303 linux_set_pc_32bit.
3304 * linux-crisv32-low.c (debug_threads): Remove declaration.
3305 (cris_get_pc, cris_set_pc): Remove.
3306 (the_low_target): Use linux_get_pc_32bit and
3307 linux_set_pc_32bit.
3308 * linux-low.c: Include inttypes.h.
3309 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3310 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3311 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3312 (the_low_target): Use linux_get_pc_32bit and
3313 linux_set_pc_32bit.
3314 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3315 (the_low_target): Use linux_get_pc_32bit and
3316 linux_set_pc_32bit.
3317 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3318 (the_low_target): Use linux_get_pc_32bit and
3319 linux_set_pc_32bit.
3320 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3321 (the_low_target): Use linux_get_pc_32bit and
3322 linux_set_pc_32bit.
3323 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3324 (the_low_target): Use linux_get_pc_32bit and
3325 linux_set_pc_32bit.
3326
eb0edac8
GB
33272016-01-18 Gary Benson <gbenson@redhat.com>
3328
3329 * configure.ac (AC_FUNC_FORK): New check.
3330 * config.in: Regenerate.
3331 * configure: Likewise.
3332
1b451dda
YQ
33332016-01-14 Yao Qi <yao.qi@linaro.org>
3334
3335 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3336 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3337 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3338 arm_get_next_pcs_ctor.
3339
82075af2
JS
33402016-01-12 Josh Stone <jistone@redhat.com>
3341 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3342
3343 * inferiors.h: Include "gdb_vecs.h".
3344 (struct process_info): Add syscalls_to_catch.
3345 * inferiors.c (remove_process): Free syscalls_to_catch.
3346 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3347 syscall_return stops.
3348 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3349 * server.c (handle_general_set): Handle QCatchSyscalls.
3350 (handle_query): Report support for QCatchSyscalls.
3351 * target.h (struct target_ops): Add supports_catch_syscall.
3352 (target_supports_catch_syscall): New macro.
3353 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3354 (struct lwp_info): Add syscall_state.
3355 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3356 Maintain syscall_state and syscalls_to_catch across exec.
3357 (get_syscall_trapinfo): New function, proxy to the_low_target.
3358 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3359 (linux_low_filter_event): Toggle syscall_state entry/return for
3360 syscall traps, and set it ignored for all others.
3361 (gdb_catching_syscalls_p): New function.
3362 (gdb_catch_this_syscall_p): New function.
3363 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3364 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3365 (linux_supports_catch_syscall): New function.
3366 (linux_target_ops): Install it.
3367 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3368 (the_low_target): Install it.
3369
8f13a3ce
MF
33702016-01-12 Mike Frysinger <vapier@gentoo.org>
3371
3372 * acinclude.m4: Include new ../warning.m4 file.
3373 * configure: Regenerated.
3374 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3375
5b3da067
MF
33762016-01-12 Mike Frysinger <vapier@gentoo.org>
3377
3378 * ax.c (is_goto_target): Mark static.
3379 * linux-low.c (register_addr): Likewise.
3380 (linux_fetch_registers, linux_store_registers): Likewise.
3381 * mem-break.c (any_persistent_commands): Fix old prototype.
3382 (add_commands_to_breakpoint): Mark static.
3383 * regcache.c (find_register_by_name): Delete unused func.
3384 * remote-utils.c (hex_or_minus_one): Mark static.
3385 * server.c (monitor_show_help): Mark static.
3386 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3387 handle_v_requests): Likewise.
3388
bc504a31
PA
33892016-01-12 Pedro Alves <palves@redhat.com>
3390
3391 Remove use of the registered trademark symbol throughout.
3392
5a0dd67a
YQ
33932016-01-08 Yao Qi <yao.qi@linaro.org>
3394
3395 * remote-utils.c (getpkt): If c is '\003', call target hook
3396 request_interrupt.
3397
b2ca446f
YQ
33982016-01-06 Yao Qi <yao.qi@linaro.org>
3399
3400 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3401 linux-aarch32-low.c.
3402 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3403 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3404 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3405 (thumb2_breakpoint): Declare.
3406 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3407 linux-aarch32-low.h.
3408 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3409 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3410 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3411
edd88788
JB
34122016-01-01 Joel Brobecker <brobecker@adacore.com>
3413
3414 * gdbreplay.c (gdbreplay_version): Change copyright year in
3415 version message.
3416 * server.c (gdbserver_version): Likewise.
3417
65da7f14
PP
34182015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3419
3420 * server.c (crc32_table): Delete.
3421 (crc32): Use libiberty's xcrc32 function.
3422
4abd5ed2
JB
34232015-12-22 Joel Brobecker <brobecker@adacore.com>
3424
3425 * lynx-low.c (lynx_delete_thread_callback): New function.
3426 (lynx_mourn): Properly delete our process and all of its
3427 threads. Remove call to clear_inferiors.
3428
0e50fe5c
JB
34292015-12-22 Joel Brobecker <brobecker@adacore.com>
3430
3431 * target.c (thread_search_callback): Add check that
3432 the thread_stopped target callback is not NULL before
3433 calling it.
3434
35adc03f
YQ
34352015-12-21 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3438 arm breakpoint.
3439
bd2b2909
AT
34402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3441
3442 * server.c (handle_query): Call target_supports_software_single_step.
3443
7fe5e27e
AT
34442015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3445
3446 * linux-low.c (single_step): New function.
3447 (linux_resume_one_lwp_throw): Call single_step.
3448 (start_step_over): Likewise.
3449
d9311bfa
AT
34502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * Makefile.in (SFILES): Append arch/arm-linux.c,
3453 arch/arm-get-next-pcs.c.
3454 (arm-linux.o): New rule.
3455 (arm-get-next-pcs.o): New rule.
3456 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3457 arm-linux.o.
3458 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3459 to linux-aarch32-low.c.
3460 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3461 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3462 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3463 (thumb2_breakpoint_len): Likewise.
3464 (arm_is_thumb_mode): Make non-static.
3465 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3466 from linux-aarch32-low.c.
3467 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3468 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3469 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3470 (thumb2_breakpoint_len): Likewise.
3471 (arm_is_thumb_mode): New declaration.
3472 * linux-arm-low.c: Include arch/arm-linux.h
3473 aarch/arm-get-next-pcs.h, sys/syscall.h.
3474 (get_next_pcs_ops): New struct.
3475 (get_next_pcs_addr_bits_remove): New function.
3476 (get_next_pcs_is_thumb): New function.
3477 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3478 (arm_sigreturn_next_pc): Likewise.
3479 (get_next_pcs_syscall_next_pc): Likewise.
3480 (arm_gdbserver_get_next_pcs): Likewise.
3481 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3482 Initialize.
3483 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3484 * server.h: Include gdb_vecs.h.
3485
68ce2059
AT
34862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3487
3488 * Makefile.in (SFILES): Append common/common-regcache.c.
3489 (OBS): Append common-regcache.o.
3490 (common-regcache.o): New rule.
3491 * regcache.c (init_register_cache): Initialize cache to
3492 REG_UNAVAILABLE.
3493 (regcache_raw_read_unsigned): New function.
3494 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3495 register_status enum.
3496
fa5308bd
AT
34972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3498
3499 * linux-aarch64-low.c (the_low_targets): Rename
3500 breakpoint_reinsert_addr to get_next_pcs.
3501 * linux-arm-low.c (the_low_targets): Likewise.
3502 * linux-bfin-low.c (the_low_targets): Likewise.
3503 * linux-cris-low.c (the_low_targets): Likewise.
3504 * linux-crisv32-low.c (the_low_targets): Likewise.
3505 * linux-low.c (can_software_single_step): Likewise.
3506 (install_software_single_step_breakpoints): New function.
3507 (start_step_over): Use install_software_single_step_breakpoints.
3508 * linux-low.h: New CORE_ADDR vector.
3509 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3510 get_next_pcs.
3511 * linux-mips-low.c (the_low_targets): Likewise.
3512 * linux-nios2-low.c (the_low_targets): Likewise.
3513 * linux-sparc-low.c (the_low_targets): Likewise.
3514
4a6ed09b
PA
35152015-12-17 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c (linux_kill_one_lwp): Remove references to
3518 LinuxThreads.
3519 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3520 to 'kill'.
3521 (linux_init_signals): Delete.
3522 (initialize_low): Adjust.
3523 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3524
7544db95
PA
35252015-12-16 Pedro Alves <palves@redhat.com>
3526
3527 * configure.ac (compiler warning flags): When testing a
3528 -Wno-foo option, check whether -Wfoo works instead.
3529 * configure: Regenerate.
3530
8020350c
DB
35312015-12-11 Don Breazeal <donb@codesourcery.com>
3532
3533 * server.c (process_serial_event): Don't exit from gdbserver
3534 in remote mode if there are still active inferiors.
3535
db91f502
YQ
35362015-12-11 Yao Qi <yao.qi@linaro.org>
3537
3538 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3539 arm_breakpoint_at if the process is 32-bit.
3540
b37a6290
YQ
35412015-12-11 Yao Qi <yao.qi@linaro.org>
3542
3543 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3544 arm breakpoint.
3545
17b1509a
YQ
35462015-12-07 Yao Qi <yao.qi@linaro.org>
3547
3548 * configure.srv: Append arm.o to srv_tgtobj for
3549 aarch64*-*-linux* target.
3550 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3551 from linux-arm-low.c.
3552 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3553 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3554 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3555 (thumb2_breakpoint_len): Likewise.
3556 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3557 (arm_breakpoint_kinds): Likewise.
3558 (arm_breakpoint_kind_from_pc): Likewise.
3559 (arm_sw_breakpoint_from_kind): Likewise.
3560 (arm_breakpoint_kind_from_current_state): Likewise.
3561 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3562 (arm_sw_breakpoint_from_kind): Declare.
3563 (arm_breakpoint_kind_from_current_state): Declare.
3564 (arm_breakpoint_at): Declare.
3565 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3566 arm_sw_breakpoint_from_kind if process is 32-bit.
3567 (aarch64_breakpoint_kind_from_pc): New function.
3568 (aarch64_breakpoint_kind_from_current_state): New function.
3569 (the_low_target): Initialize fields breakpoint_kind_from_pc
3570 and breakpoint_kind_from_current_state.
3571 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3572 linux-aarch32-low.c.
3573 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3574 (arm_breakpoint, arm_breakpoint_len): Likewise.
3575 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3576 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3577 (arm_is_thumb_mode): Likewise.
3578 (arm_breakpoint_at): Likewise.
3579 (arm_breakpoint_kind_from_pc): Likewise.
3580 (arm_sw_breakpoint_from_kind): Likewise.
3581 (arm_breakpoint_kind_from_current_state): Likewise.
3582
3583 Revert:
3584 2015-08-04 Yao Qi <yao.qi@linaro.org>
3585
3586 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3587 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3588 * server.c (extended_protocol): Remove "static".
3589 * server.h (extended_protocol): Declare it.
3590
ece66d65
JS
35912015-12-04 Josh Stone <jistone@redhat.com>
3592
3593 * target.h (struct target_ops) <arch_setup>: Rename to ...
3594 (struct target_ops) <post_create_inferior>: ... this.
3595 (target_arch_setup): Rename to ...
3596 (target_post_create_inferior): ... this, calling post_create_inferior.
3597 * server.c (start_inferior): Update target_arch_setup calls to
3598 target_post_create_inferior.
3599 * linux-low.c (linux_low_ptrace_options): Forward declare.
3600 (linux_arch_setup): Update its comment for general use.
3601 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3602 (struct linux_target_ops): Use linux_post_create_inferior.
3603 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3604 to post_create_inferior.
3605 * nto-low.c (struct nto_target_ops): Likewise.
3606 * spu-low.c (struct spu_target_ops): Likewise.
3607 * win32-low.c (struct win32_target_ops): Likewise.
3608
e58c48b4
AT
36092015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3610
3611 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3612
fbec8956
AT
36132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3614
3615 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3616 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3617 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3618 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3619 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3620 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3621 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3622 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3623 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3624 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3625 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3626 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3627
9b4c5f87
AT
36282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3629
3630 * linux-low.c (linux_look_up_symbols): Don't call
3631 linux_supports_traceclone.
3632 * linux-low.h (thread_db_init): Remove use_events argument.
3633 * thread-db.c (thread_db_use_event): Remove global variable.
3634 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3635 (struct thread_db) <td_create_bp>: Remove field.
3636 (thread_db_create_event): Remove function.
3637 (thread_db_enable_reporting): Likewise.
3638 (find_one_thread): Don't check for thread_db_use_events.
3639 (attach_thread): Likewise.
3640 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3641 (try_thread_db_load_1): Don't check for thread_db_use_events.
3642 (thread_db_init): Remove use_events argument and thread events
3643 handling.
3644 (remove_thread_event_breakpoints): Remove function.
3645 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3646
7d00775e
AT
36472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3648
3649 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3650 New function.
3651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3652 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3653 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3654 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3655 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3656 Initialize.
3657 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3658 New function.
3659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3660 * linux-low.c (can_hardware_single_step): Use
3661 supports_hardware_single_step.
3662 (can_software_single_step): New function.
3663 (start_step_over): Call can_software_single_step.
3664 (linux_supports_hardware_single_step): New function.
3665 (struct target_ops) <supports_software_single_step>: Initialize.
3666 * linux-low.h (struct linux_target_ops)
3667 <supports_hardware_single_step>: Initialize.
3668 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3669 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3670 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3671 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3672 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3673 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3674 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3676 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3677 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3678 Initialize.
3679 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3680 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3681 Initialize.
3682 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3683 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3684 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3685 New function.
3686 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3687 * target.h (struct target_ops): <supports_software_single_step>:
3688 New field.
3689 (target_supports_software_single_step): New macro.
3690
2d97cd35
AT
36912015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3692
3693 * linux-low.c (linux_wait_1): Fix pc advance condition.
3694 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3695 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3696
769ef81f
AT
36972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3698
3699 * linux-arm-low.c (arm_is_thumb_mode): New function.
3700 (arm_breakpoint_at): Use arm_is_thumb_mode.
3701 (arm_breakpoint_kind_from_current_state): New function.
3702 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3703 Initialize.
3704 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3705 (linux_breakpoint_kind_from_current_state): New function.
3706 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3707 * linux-low.h (struct linux_target_ops)
3708 <breakpoint_kind_from_current_state>: New field.
3709 * target.h (struct target_ops): Likewise.
3710 (target_breakpoint_kind_from_current_state): New macro.
3711
1bebeeca
PA
37122015-11-30 Pedro Alves <palves@redhat.com>
3713
3714 * linux-low.c (linux_resume): Wake up the event loop before
3715 returning.
3716
a67a9fae
PA
37172015-11-30 Pedro Alves <palves@redhat.com>
3718
3719 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3720 check.
3721 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3722 to -1.
3723 * target.c (struct thread_search): New structure.
3724 (thread_search_callback): New function.
3725 (prev_general_thread): New global.
3726 (prepare_to_access_memory, done_accessing_memory): New functions.
3727 * target.h (prepare_to_access_memory, done_accessing_memory):
3728 Replace macros with function declarations.
3729
f2faf941
PA
37302015-11-30 Pedro Alves <palves@redhat.com>
3731
3732 PR 14618
3733 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3734 report TARGET_WAITKIND_NO_RESUMED.
3735 * remote-utils.c (prepare_resume_reply): Handle
3736 TARGET_WAITKIND_NO_RESUMED.
3737 * server.c (report_no_resumed): New global.
3738 (handle_query) <qSupported>: Handle "no-resumed+". Report
3739 "no-resumed+" support.
3740 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3741 return error if the client doesn't support no-resumed events.
3742 (push_stop_notification): New function.
3743 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3744 events if the client supports them.
3745
a681f9c9
PA
37462015-11-30 Pedro Alves <palves@redhat.com>
3747
3748 * linux-low.c (thread_still_has_status_pending_p): Don't check
3749 vCont;t here.
3750 (lwp_resumed): New function.
3751 (status_pending_p_callback): Return early if the LWP is not
3752 supposed to be resumed.
3753
65706a29
PA
37542015-11-30 Pedro Alves <palves@redhat.com>
3755
3756 * linux-low.c (handle_extended_wait): Assert that the LWP's
3757 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3758 thread create events, leave the new child's status pending.
3759 (linux_low_filter_event): If GDB wants to hear about thread exit
3760 events, leave the LWP marked dead and don't delete it.
3761 (linux_wait_for_event_filtered): Don't check for thread exit.
3762 (filter_exit_event): New function.
3763 (linux_wait_1): Use it, when returning an exit event.
3764 (linux_resume_one_lwp_throw): Assert that the LWP's
3765 waitstatus is TARGET_WAITKIND_IGNORE.
3766 * remote-utils.c (prepare_resume_reply): Handle
3767 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3768 * server.c (report_thread_events): New global.
3769 (handle_general_set): Handle QThreadEvents.
3770 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3771 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3772 TARGET_WAITKIND_THREAD_EXITED.
3773 * server.h (report_thread_events): Declare.
3774
56cf4bed
PA
37752015-11-30 Pedro Alves <palves@redhat.com>
3776
3777 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3778 the thread's last_resume_kind was resume_stop.
3779
500c1d85
PA
37802015-11-30 Pedro Alves <palves@redhat.com>
3781
3782 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3783 before returning.
3784
de979965
PA
37852015-11-30 Pedro Alves <palves@redhat.com>
3786
3787 * server.c (handle_v_requests): Handle vCtrlC.
3788
34c65914
PA
37892015-11-30 Pedro Alves <palves@redhat.com>
3790
3791 * gdbthread.h (find_any_thread_of_pid): Declare.
3792 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3793 functions.
3794 * server.c (handle_query): If current_thread is NULL, look for
3795 another thread of the selected process.
3796
79efa585 37972015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3798 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3799
3800 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3801 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3802 name in reply.
3803 * target.h (struct target_ops) <thread_name>: New field.
3804 (target_thread_name): New macro.
3805
80d82c19
JB
38062015-11-23 Joel Brobecker <brobecker@adacore.com>
3807
3808 * regcache.h (regcache_invalidate_pid): Add declaration.
3809 * regcache.c (regcache_invalidate_pid): New function, extracted
3810 from regcache_invalidate.
3811 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3812 Add trivial documentation comment.
3813 * lynx-low.c: Use regcache_invalidate_pid instead of
3814 regcache_invalidate.
3815
64da5dd5
JB
38162015-11-23 Joel Brobecker <brobecker@adacore.com>
3817
3818 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3819 and Elf64_auxv_t if the target is Android.
3820
37ce4055
DE
38212015-11-22 Doug Evans <xdje42@gmail.com>
3822
3823 * target.h: #include <sys/types.h>.
3824
06e03fff
PA
38252015-11-19 Pedro Alves <palves@redhat.com>
3826
3827 * linux-low.c (linux_process_qsupported): Change prototype.
3828 Adjust.
3829 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3830 Change prototype.
3831 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3832 and adjust to loop over all features.
3833 * server.c (handle_query) <qSupported>: Adjust to call
3834 target_process_qsupported once, passing it a vector of unprocessed
3835 features.
3836 * target.h (struct target_ops) <process_qsupported>: Change
3837 prototype.
3838 (target_process_qsupported): Adjust.
3839
9a084706
PA
38402015-11-19 Pedro Alves <palves@redhat.com>
3841
3842 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3843 mode.
3844 * configure: Regenerate.
3845
dad44a1f
PA
38462015-11-19 Pedro Alves <palves@redhat.com>
3847
3848 * configure: Regenerate.
3849
231c0592
YQ
38502015-11-19 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3853 type to uint32_t.
3854
6c1c9a8b
YQ
38552015-11-19 Yao Qi <yao.qi@linaro.org>
3856
3857 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3858 (struct aarch64_operand): Move enum out.
3859
9caa3311
YQ
38602015-11-19 Yao Qi <yao.qi@linaro.org>
3861
3862 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3863 struct user_fpsimd_state *.
3864 (aarch64_store_fpregset): Likewise.
3865
6a69a054
YQ
38662015-11-19 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3869 struct user_pt_regs *.
3870 (aarch64_store_gregset): Likewise.
3871
1798301e
PA
38722015-11-18 Pedro Alves <palves@redhat.com>
3873
3874 * Makefile.in (all_object_files): Add $IPA_OBJS.
3875
ce7715e2
PA
38762015-11-17 Pedro Alves <palves@redhat.com>
3877
3878 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3879 GDB_SIGNAL_0 and gdb_signal_to_string.
3880
c0879059
PA
38812015-11-17 Pedro Alves <palves@redhat.com>
3882
3883 * win32-low.c (handle_output_debug_string): Remove parameter.
3884 (win32_kill): Remove our_status local and adjust call to
3885 handle_output_debug_string.
3886 (get_child_debug_event): Adjust call to
3887 handle_output_debug_string.
3888
1996e237
SM
38892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3890
3891 * linux-mips-low.c (mips_fill_gregset): Add cast.
3892 (mips_store_gregset): Likewise.
3893 (mips_fill_fpregset): Likewise.
3894 (mips_store_fpregset): Likewise.
3895
cbec665b
SM
38962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3897
3898 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3899 priv.
3900
eb3e3c67
SM
39012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3902
3903 * linux-mips-low.c (mips_linux_new_thread): Change type of
3904 watch_type to enum target_hw_bp_type.
3905
171de4b8
SM
39062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3907
3908 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3909 Change return type to arm_hwbp_type.
3910
04248ead
SM
39112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3912
3913 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3914 (arm_store_gregset): Likewise.
3915 * linux-arm-low.c (arm_get_hwcap): Likewise.
3916 (arm_read_description): Likewise.
3917
04b3479c
SM
39182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3919
3920 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3921
2bc84e8a
SM
39222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3923
3924 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3925 (ppc_fill_vsxregset): Likewise.
3926 (ppc_store_vsxregset): Likewise.
3927 (ppc_fill_vrregset): Likewise.
3928 (ppc_store_vrregset): Likewise.
3929 (ppc_fill_evrregset): Likewise.
3930 (ppc_store_evrregset): Likewise.
3931
e6c5bb05
SM
39322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3933
3934 * linux-ppc-low.c (ppc_usrregs_info): Remove
3935 forward-declaration.
3936 (ppc_arch_setup): Move lower in file.
3937
7ea45d72
SM
39382015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3941 (ps_pdwrite): Likewise.
3942
69291610
HW
39432015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3944
3945 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3946 to after assert checks.
3947
b42945fd
SM
39482015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3949
3950 * proc-service.c (ps_pdread): Add/adjust casts.
3951 (ps_pdwrite): Add/adjust casts.
3952
d6f85c84
SM
39532015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3954
3955 * server.c (handle_search_memory_1): Cast return value of
3956 memmem.
3957
f98cd059
SM
39582015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3959
3960 * server.c (write_qxfer_response): Change type of data to
3961 gdb_byte *.
3962
d2412fa5
PA
39632015-10-29 Pedro Alves <palves@redhat.com>
3964
3965 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3966
c17414a2
PA
39672015-10-29 Pedro Alves <palves@redhat.com>
3968
3969 * tracepoint.c (clear_installed_tracepoints): Add casts.
3970
e053fbc4
PA
39712015-10-29 Pedro Alves <palves@redhat.com>
3972
3973 * server.c (handle_v_cont, process_serial_event): Add enum
3974 gdb_signal casts to signal parsing code.
3975
add67df8
PA
39762015-10-29 Pedro Alves <palves@redhat.com>
3977
3978 * linux-low.h (NULL_REGSET): Define.
3979 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3980 * linux-arm-low.c (arm_regsets): Likewise.
3981 * linux-crisv32-low.c (cris_regsets): Likewise.
3982 * linux-m68k-low.c (m68k_regsets): Likewise.
3983 * linux-mips-low.c (mips_regsets): Likewise.
3984 * linux-nios2-low.c (nios2_regsets): Likewise.
3985 * linux-ppc-low.c (ppc_regsets): Likewise.
3986 * linux-s390-low.c (s390_regsets): Likewise.
3987 * linux-sh-low.c (sh_regsets): Likewise.
3988 * linux-sparc-low.c (sparc_regsets): Likewise.
3989 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3990 * linux-tile-low.c (tile_regsets): Likewise.
3991 * linux-x86-low.c (x86_regsets): Likewise.
3992 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3993
50bc912a
PA
39942015-10-29 Pedro Alves <palves@redhat.com>
3995
3996 * linux-low.h (NULL_REGSET): Define.
3997 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3998 * linux-arm-low.c (arm_regsets): Likewise.
3999 * linux-crisv32-low.c (cris_regsets): Likewise.
4000 * linux-m68k-low.c (m68k_regsets): Likewise.
4001 * linux-mips-low.c (mips_regsets): Likewise.
4002 * linux-nios2-low.c (nios2_regsets): Likewise.
4003 * linux-ppc-low.c (ppc_regsets): Likewise.
4004 * linux-s390-low.c (s390_regsets): Likewise.
4005 * linux-sh-low.c (sh_regsets): Likewise.
4006 * linux-sparc-low.c (sparc_regsets): Likewise.
4007 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4008 * linux-tile-low.c (tile_regsets): Likewise.
4009 * linux-x86-low.c (x86_regsets): Likewise.
4010 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4011
682b2546
DE
40122015-10-26 Doug Evans <dje@google.com>
4013
4014 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4015
963843d4
DE
40162015-10-26 Doug Evans <dje@google.com>
4017
4018 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4019
d41401ac
DE
40202015-10-26 Doug Evans <dje@google.com>
4021
4022 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4023 for debug_printf.
4024 (attach_thread, find_new_threads_callback): Ditto.
4025
3db28855
AT
40262015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4027
4028 * mem-break.h (set_breakpoint_data): Remove.
4029
fb78e89c
AT
40302015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4031
4032 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4033 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4034 (initialize_low): Remove set_breakpoint_data call.
4035 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4036 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4037 (initialize_low): Remove set_breakpoint_data call.
4038 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4039 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4040 (initialize_low): Remove set_breakpoint_data call.
4041
2e6ee069
AT
40422015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4043
4044 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4045 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4046 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4047 * target.h (target_breakpoint_kind_from_pc): New macro.
4048
1652a986
AT
40492015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4050
4051 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4052 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4053 the default breakpoint kind.
4054
abeead09
AT
40552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4056
4057 * linux-arm-low.c (arm_supports_z_point_type): Add software
4058 breakpoint support.
4059
b0b4b501
AT
40602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4061
4062 * linux-arm-low.c: Refactor breakpoint definitions.
4063 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4064 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4065
8689682c
AT
40662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4067
4068 * Makefile.in: Add arm.c/o.
4069 * configure.srv: Likewise.
4070 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4071 (arm_breakpoint_kind_from_pc): New function.
4072 (arm_sw_breakpoint_from_kind): Return proper kind.
4073 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4074
27165294
AT
40752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4076
4077 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4078 removal.
4079 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4080 (struct raw_breakpoint) <size>: Remove.
4081 (struct raw_breakpoint) <kind>: Add.
4082 (bp_size): New function.
4083 (bp_opcode): Likewise.
4084 (find_raw_breakpoint_at): Adjust for kind.
4085 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4086 (remove_memory_breakpoint): Adjust for kind call bp_size.
4087 (set_raw_breakpoint_at): Adjust for kind.
4088 (set_breakpoint): Likewise.
4089 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4090 (delete_raw_breakpoint): Adjust for kind.
4091 (delete_breakpoint): Likewise.
4092 (find_gdb_breakpoint): Likewise.
4093 (set_gdb_breakpoint_1): Likewise.
4094 (set_gdb_breakpoint): Likewise.
4095 (delete_gdb_breakpoint_1): Likewise.
4096 (delete_gdb_breakpoint): Likewise.
4097 (uninsert_raw_breakpoint): Likewise.
4098 (reinsert_raw_breakpoint): Likewise.
4099 (set_breakpoint_data): Remove.
4100 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4101 (check_mem_read): Adjust for kind call bp_size.
4102 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4103 (clone_one_breakpoint): Adjust for kind.
4104 * mem-break.h (set_gdb_breakpoint): Likewise.
4105 (delete_gdb_breakpoint): Likewise.
4106 * server.c (process_serial_event): Likewise.
4107
dd373349
AT
41082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4109
4110 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4111 (struct linux_target_ops) <breakpoint>: Remove.
4112 (struct linux_target_ops) <breakpoint_len>: Remove.
4113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4115 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4116 (arm_sw_breakpoint_from_kind): New function.
4117 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4118 (struct linux_target_ops) <breakpoint>: Remove.
4119 (struct linux_target_ops) <breakpoint_len>: Remove.
4120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4122 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4123 (struct linux_target_ops) <breakpoint>: Remove.
4124 (struct linux_target_ops) <breakpoint_len>: Remove.
4125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4127 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4128 (struct linux_target_ops) <breakpoint>: Remove.
4129 (struct linux_target_ops) <breakpoint_len>: Remove.
4130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4132 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4133 and sw_breakpoint_from_kind to increment the pc.
4134 (linux_breakpoint_kind_from_pc): New function.
4135 (linux_sw_breakpoint_from_kind): New function.
4136 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4137 (initialize_low): Call breakpoint_kind_from_pc and
4138 sw_breakpoint_from_kind to replace breakpoint_data/len.
4139 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4140 New field.
4141 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4142 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4143 (struct linux_target_ops) <breakpoint>: Remove.
4144 (struct linux_target_ops) <breakpoint_len>: Remove.
4145 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4146 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4147 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4148 (struct linux_target_ops) <breakpoint>: Remove.
4149 (struct linux_target_ops) <breakpoint_len>: Remove.
4150 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4152 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4153 (struct linux_target_ops) <breakpoint>: Remove.
4154 (struct linux_target_ops) <breakpoint_len>: Remove.
4155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4157 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4158 (struct linux_target_ops) <breakpoint>: Remove.
4159 (struct linux_target_ops) <breakpoint_len>: Remove.
4160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4162 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4163 (struct linux_target_ops) <breakpoint>: Remove.
4164 (struct linux_target_ops) <breakpoint_len>: Remove.
4165 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4167 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4168 (struct linux_target_ops) <breakpoint>: Remove.
4169 (struct linux_target_ops) <breakpoint_len>: Remove.
4170 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4172 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4173 (struct linux_target_ops) <breakpoint>: Remove.
4174 (struct linux_target_ops) <breakpoint_len>: Remove.
4175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4177 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4178 (struct linux_target_ops) <breakpoint>: Remove.
4179 (struct linux_target_ops) <breakpoint_len>: Remove.
4180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4182 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4183 (struct linux_target_ops) <breakpoint>: Remove.
4184 (struct linux_target_ops) <breakpoint_len>: Remove.
4185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4187 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4188 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4189 (struct linux_target_ops) <breakpoint>: Remove.
4190 (struct linux_target_ops) <breakpoint_len>: Remove.
4191 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4192 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4193 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4194 (struct linux_target_ops) <breakpoint>: Remove.
4195 (struct linux_target_ops) <breakpoint_len>: Remove.
4196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4198
4cd98a19
AT
41992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4200
4201 * linux-cris-low.c (cris_get_pc): Remove void arg.
4202
774ee6d2
AR
42032015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4204
4205 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4206 variable name.
4207
833dcd29
AR
42082015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4209
4210 * inferiors.c (thread_pid_matches_callback): New function.
4211 (find_thread_process): New function.
4212 (remove_thread): Reset current_thread.
4213 (remove_process): Assert threads have been removed first.
4214
8d689ee5
YQ
42152015-10-15 Yao Qi <yao.qi@linaro.org>
4216
4217 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4218 if it is 3.
4219 (aarch64_remove_point): Likewise.
4220 * regcache.c (regcache_register_size): New function.
4221
1c2e1515
YQ
42222015-10-12 Yao Qi <yao.qi@linaro.org>
4223
4224 * linux-aarch64-low.c: Update all callers as emit_load_store
4225 is renamed to aarch64_emit_load_store.
4226
e1c587c3
YQ
42272015-10-12 Yao Qi <yao.qi@linaro.org>
4228
4229 * linux-aarch64-low.c: Update all callers of function renaming
4230 from emit_insn to aarch64_emit_insn.
4231
b6542f81
YQ
42322015-10-12 Yao Qi <yao.qi@linaro.org>
4233
4234 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4235 arch/aarch64-insn.h.
4236 (struct aarch64_memory_operand): Likewise.
4237 (ENCODE): Likewise.
4238 (emit_insn): Move to arch/aarch64-insn.c.
4239 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4240 (emit_load_store): Move to arch/aarch64-insn.c.
4241 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4242 (can_encode_int32): Remove.
4243
246994ce
YQ
42442015-10-12 Yao Qi <yao.qi@linaro.org>
4245
4246 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4247 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4248 (aarch64_relocate_instruction): Likewise.
4249 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4250 (struct aarch64_insn_visitor): Likewise.
4251
0badd99f
YQ
42522015-10-12 Yao Qi <yao.qi@linaro.org>
4253
4254 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4255 (struct aarch64_insn_visitor): New.
4256 (struct aarch64_insn_relocation_data): New.
4257 (aarch64_ftrace_insn_reloc_b): New function.
4258 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4259 (aarch64_ftrace_insn_reloc_cb): Likewise.
4260 (aarch64_ftrace_insn_reloc_tb): Likewise.
4261 (aarch64_ftrace_insn_reloc_adr): Likewise.
4262 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4263 (aarch64_ftrace_insn_reloc_others): Likewise.
4264 (visitor): New.
4265 (aarch64_relocate_instruction): Use visitor.
4266
dfaffe9d
YQ
42672015-10-12 Yao Qi <yao.qi@linaro.org>
4268
4269 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4270 int. Add argument buf.
4271 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4272 aarch64_relocate_instruction.
4273
70b439f0
YQ
42742015-10-12 Yao Qi <yao.qi@linaro.org>
4275
4276 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4277 argument insn. Remove local variable insn. Don't call
4278 target_read_uint32.
4279 (aarch64_install_fast_tracepoint_jump_pad): Call
4280 target_read_uint32.
4281
7781c06f
YQ
42822015-09-30 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4285 (emit_load_store_pair): Likewise.
4286
9a3c8263
SM
42872015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4288
4289 * dll.c (match_dll): Add cast(s).
4290 (unloaded_dll): Likewise.
4291 * linux-low.c (second_thread_of_pid_p): Likewise.
4292 (delete_lwp_callback): Likewise.
4293 (count_events_callback): Likewise.
4294 (select_event_lwp_callback): Likewise.
4295 (linux_set_resume_request): Likewise.
4296 * server.c (accumulate_file_name_length): Likewise.
4297 (emit_dll_description): Likewise.
4298 (handle_qxfer_threads_worker): Likewise.
4299 (visit_actioned_threads): Likewise.
4300 * thread-db.c (any_thread_of): Likewise.
4301 * tracepoint.c (same_process_p): Likewise.
4302 (match_blocktype): Likewise.
4303 (build_traceframe_info_xml): Likewise.
4304
224c3ddb
SM
43052015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4306
4307 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4308 assignment.
4309 (gdb_unparse_agent_expr): Likewise.
4310 * hostio.c (require_data): Likewise.
4311 (handle_pread): Likewise.
4312 * linux-low.c (disable_regset): Likewise.
4313 (fetch_register): Likewise.
4314 (store_register): Likewise.
4315 (get_dynamic): Likewise.
4316 (linux_qxfer_libraries_svr4): Likewise.
4317 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4318 (set_fast_tracepoint_jump): Likewise.
4319 (uninsert_fast_tracepoint_jumps_at): Likewise.
4320 (reinsert_fast_tracepoint_jumps_at): Likewise.
4321 (validate_inserted_breakpoint): Likewise.
4322 (clone_agent_expr): Likewise.
4323 * regcache.c (init_register_cache): Likewise.
4324 * remote-utils.c (putpkt_binary_1): Likewise.
4325 (decode_M_packet): Likewise.
4326 (decode_X_packet): Likewise.
4327 (look_up_one_symbol): Likewise.
4328 (relocate_instruction): Likewise.
4329 (monitor_output): Likewise.
4330 * server.c (handle_search_memory): Likewise.
4331 (handle_qxfer_exec_file): Likewise.
4332 (handle_qxfer_libraries): Likewise.
4333 (handle_qxfer): Likewise.
4334 (handle_query): Likewise.
4335 (handle_v_cont): Likewise.
4336 (handle_v_run): Likewise.
4337 (captured_main): Likewise.
4338 * target.c (write_inferior_memory): Likewise.
4339 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4340 * tracepoint.c (init_trace_buffer): Likewise.
4341 (add_tracepoint_action): Likewise.
4342 (add_traceframe): Likewise.
4343 (add_traceframe_block): Likewise.
4344 (cmd_qtdpsrc): Likewise.
4345 (cmd_qtdv): Likewise.
4346 (cmd_qtstatus): Likewise.
4347 (response_source): Likewise.
4348 (response_tsv): Likewise.
4349 (cmd_qtnotes): Likewise.
4350 (gdb_collect): Likewise.
4351 (initialize_tracepoint): Likewise.
4352
afbe19f8
PL
43532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4354
4355 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4356 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4357 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4358 <NOP>: New.
4359 (enum aarch64_condition_codes): New enum.
4360 (w0): New static global.
4361 (fp): Likewise.
4362 (lr): Likewise.
4363 (struct aarch64_memory_operand) <type>: New
4364 MEMORY_OPERAND_POSTINDEX type.
4365 (postindex_memory_operand): New helper function.
4366 (emit_ret): New function.
4367 (emit_load_store_pair): New function, factored out of emit_stp
4368 with support for MEMORY_OPERAND_POSTINDEX.
4369 (emit_stp): Rewrite using emit_load_store_pair.
4370 (emit_ldp): New function.
4371 (emit_load_store): Likewise.
4372 (emit_ldr): Mention post-index instruction in comment.
4373 (emit_ldrh): New function.
4374 (emit_ldrb): New function.
4375 (emit_ldrsw): Mention post-index instruction in comment.
4376 (emit_str): Likewise.
4377 (emit_subs): New function.
4378 (emit_cmp): Likewise.
4379 (emit_and): Likewise.
4380 (emit_orr): Likewise.
4381 (emit_orn): Likewise.
4382 (emit_eor): Likewise.
4383 (emit_mvn): Likewise.
4384 (emit_lslv): Likewise.
4385 (emit_lsrv): Likewise.
4386 (emit_asrv): Likewise.
4387 (emit_mul): Likewise.
4388 (emit_sbfm): Likewise.
4389 (emit_sbfx): Likewise.
4390 (emit_ubfm): Likewise.
4391 (emit_ubfx): Likewise.
4392 (emit_csinc): Likewise.
4393 (emit_cset): Likewise.
4394 (emit_nop): Likewise.
4395 (emit_ops_insns): New helper function.
4396 (emit_pop): Likewise.
4397 (emit_push): Likewise.
4398 (aarch64_emit_prologue): New function.
4399 (aarch64_emit_epilogue): Likewise.
4400 (aarch64_emit_add): Likewise.
4401 (aarch64_emit_sub): Likewise.
4402 (aarch64_emit_mul): Likewise.
4403 (aarch64_emit_lsh): Likewise.
4404 (aarch64_emit_rsh_signed): Likewise.
4405 (aarch64_emit_rsh_unsigned): Likewise.
4406 (aarch64_emit_ext): Likewise.
4407 (aarch64_emit_log_not): Likewise.
4408 (aarch64_emit_bit_and): Likewise.
4409 (aarch64_emit_bit_or): Likewise.
4410 (aarch64_emit_bit_xor): Likewise.
4411 (aarch64_emit_bit_not): Likewise.
4412 (aarch64_emit_equal): Likewise.
4413 (aarch64_emit_less_signed): Likewise.
4414 (aarch64_emit_less_unsigned): Likewise.
4415 (aarch64_emit_ref): Likewise.
4416 (aarch64_emit_if_goto): Likewise.
4417 (aarch64_emit_goto): Likewise.
4418 (aarch64_write_goto_address): Likewise.
4419 (aarch64_emit_const): Likewise.
4420 (aarch64_emit_call): Likewise.
4421 (aarch64_emit_reg): Likewise.
4422 (aarch64_emit_pop): Likewise.
4423 (aarch64_emit_stack_flush): Likewise.
4424 (aarch64_emit_zero_ext): Likewise.
4425 (aarch64_emit_swap): Likewise.
4426 (aarch64_emit_stack_adjust): Likewise.
4427 (aarch64_emit_int_call_1): Likewise.
4428 (aarch64_emit_void_call_2): Likewise.
4429 (aarch64_emit_eq_goto): Likewise.
4430 (aarch64_emit_ne_goto): Likewise.
4431 (aarch64_emit_lt_goto): Likewise.
4432 (aarch64_emit_le_goto): Likewise.
4433 (aarch64_emit_gt_goto): Likewise.
4434 (aarch64_emit_ge_got): Likewise.
4435 (aarch64_emit_ops_impl): New static global variable.
4436 (aarch64_emit_ops): New target function, return
4437 &aarch64_emit_ops_impl.
4438 (struct linux_target_ops): Install it.
4439
bb903df0
PL
44402015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4441
4442 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4443 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4444 aarch64-ipa.o.
4445 * linux-aarch64-ipa.c: New file.
4446 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4447 and endian.h.
4448 (aarch64_get_thread_area): New target method.
4449 (extract_signed_bitfield): New helper function.
4450 (aarch64_decode_ldr_literal): New function.
4451 (enum aarch64_opcodes): New enum.
4452 (struct aarch64_register): New struct.
4453 (struct aarch64_operand): New struct.
4454 (x0): New static global.
4455 (x1): Likewise.
4456 (x2): Likewise.
4457 (x3): Likewise.
4458 (x4): Likewise.
4459 (w2): Likewise.
4460 (ip0): Likewise.
4461 (sp): Likewise.
4462 (xzr): Likewise.
4463 (aarch64_register): New helper function.
4464 (register_operand): Likewise.
4465 (immediate_operand): Likewise.
4466 (struct aarch64_memory_operand): New struct.
4467 (offset_memory_operand): New helper function.
4468 (preindex_memory_operand): Likewise.
4469 (enum aarch64_system_control_registers): New enum.
4470 (ENCODE): New macro.
4471 (emit_insn): New helper function.
4472 (emit_b): New function.
4473 (emit_bcond): Likewise.
4474 (emit_cb): Likewise.
4475 (emit_tb): Likewise.
4476 (emit_blr): Likewise.
4477 (emit_stp): Likewise.
4478 (emit_ldp_q_offset): Likewise.
4479 (emit_stp_q_offset): Likewise.
4480 (emit_load_store): Likewise.
4481 (emit_ldr): Likewise.
4482 (emit_ldrsw): Likewise.
4483 (emit_str): Likewise.
4484 (emit_ldaxr): Likewise.
4485 (emit_stxr): Likewise.
4486 (emit_stlr): Likewise.
4487 (emit_data_processing_reg): Likewise.
4488 (emit_data_processing): Likewise.
4489 (emit_add): Likewise.
4490 (emit_sub): Likewise.
4491 (emit_mov): Likewise.
4492 (emit_movk): Likewise.
4493 (emit_mov_addr): Likewise.
4494 (emit_mrs): Likewise.
4495 (emit_msr): Likewise.
4496 (emit_sevl): Likewise.
4497 (emit_wfe): Likewise.
4498 (append_insns): Likewise.
4499 (can_encode_int32_in): New helper function.
4500 (aarch64_relocate_instruction): New function.
4501 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4502 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4503 (struct linux_target_ops): Install aarch64_get_thread_area,
4504 aarch64_install_fast_tracepoint_jump_pad and
4505 aarch64_get_min_fast_tracepoint_insn_len.
4506
787749ea
PL
45072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4508
4509 * Makefile.in (aarch64-insn.o): New rule.
4510 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4511
9812b2e6
YQ
45122015-09-21 Yao Qi <yao.qi@linaro.org>
4513
4514 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4515
18fe412b
YQ
45162015-09-21 Yao Qi <yao.qi@linaro.org>
4517
4518 * tracepoint.c (max_jump_pad_size): Remove.
4519
a0cc84cd
YQ
45202015-09-18 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-aarch64-low.c: Don't include sys/uio.h.
4523 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4524
d78908cf
WW
45252015-09-16 Wei-cheng Wang <cole945@gmail.com>
4526
4527 * tracepoint.c (eval_result_type): Change prototype.
4528 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4529
d57e0d50
PA
45302015-09-15 Pedro Alves <palves@redhat.com>
4531
4532 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4533 Check whether to report exec events instead of checking whether
4534 multiprocess is enabled.
4535
5a676acc
PA
45362015-09-15 Pedro Alves <palves@redhat.com>
4537
4538 PR remote/18965
4539 * remote-utils.c (prepare_resume_reply): Merge
4540 TARGET_WAITKIND_VFORK_DONE switch case with the
4541 TARGET_WAITKIND_FORKED case.
4542
7c5d0fad
YQ
45432015-09-15 Yao Qi <yao.qi@linaro.org>
4544
4545 * server.c (handle_query): Check string comparison using
4546 "else if" instead of "if".
4547
750ce8d1
YQ
45482015-09-15 Yao Qi <yao.qi@linaro.org>
4549
4550 * server.c (vCont_supported): New global variable.
4551 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4552 matches. Append ";vContSupported+" to own_buf.
4553 (handle_v_requests): Append ";s;S" to own_buf if target supports
4554 hardware single step or vCont_supported is false.
4555 (capture_main): Set vCont_supported to zero.
4556
70b90b91
YQ
45572015-09-15 Yao Qi <yao.qi@linaro.org>
4558
4559 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4560 it to ...
4561 (linux_supports_hardware_single_step): ... New function.
4562 (linux_target_ops): Update.
4563 * lynx-low.c (lynx_target_ops): Set field
4564 supports_hardware_single_step to target_can_do_hardware_single_step.
4565 * nto-low.c (nto_target_ops): Likewise.
4566 * spu-low.c (spu_target_ops): Likewise.
4567 * win32-low.c (win32_target_ops): Likewise.
4568 * target.c (target_can_do_hardware_single_step): New function.
4569 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4570 Remove. <supports_hardware_single_step>: New field.
4571 (target_supports_conditional_breakpoints): Remove.
4572 (target_supports_hardware_single_step): New macro.
4573 (target_can_do_hardware_single_step): Declare.
4574 * server.c (handle_query): Use target_supports_hardware_single_step
4575 instead of target_supports_conditional_breakpoints.
4576
ade90bde
YQ
45772015-09-15 Yao Qi <yao.qi@linaro.org>
4578
4579 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4580 function.
4581 (struct linux_target_ops the_low_target): Install
4582 aarch64_linux_siginfo_fixup.
4583
94585166
DB
45842015-09-11 Don Breazeal <donb@codesourcery.com>
4585 Luis Machado <lgustavo@codesourcery.com>
4586
4587 * linux-low.c (linux_mourn): Static declaration.
4588 (linux_arch_setup): Move in front of
4589 handle_extended_wait.
4590 (linux_arch_setup_thread): New function.
4591 (handle_extended_wait): Handle exec events. Call
4592 linux_arch_setup_thread. Make event_lwp argument a
4593 pointer-to-a-pointer.
4594 (check_zombie_leaders): Do not check stopped threads.
4595 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4596 (linux_low_filter_event): Add lwp and thread for exec'ing
4597 non-leader thread if leader thread has been deleted.
4598 Refactor code into linux_arch_setup_thread and call it.
4599 Pass child lwp pointer by reference to handle_extended_wait.
4600 (linux_wait_for_event_filtered): Update comment.
4601 (linux_wait_1): Prevent clobbering exec event status.
4602 (linux_supports_exec_events): New function.
4603 (linux_target_ops) <supports_exec_events>: Initialize new member.
4604 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4605 new member.
4606 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4607 * server.c (report_exec_events): New global variable.
4608 (handle_query): Handle qSupported query for exec-events feature.
4609 (captured_main): Initialize report_exec_events.
4610 * server.h (report_exec_events): Declare new global variable.
4611 * target.h (struct target_ops) <supports_exec_events>: New
4612 member.
4613 (target_supports_exec_events): New macro.
4614 * win32-low.c (win32_target_ops) <supports_exec_events>:
4615 Initialize new member.
4616
0568462b
MM
46172015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4618
4619 * linux-low.c (linux_low_enable_btrace): Remove.
4620 (linux_target_ops): Replace linux_low_enable_btrace with
4621 linux_enable_btrace.
4622
39edd165
YQ
46232015-09-03 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-aarch64-low.c (aarch64_insert_point): Call
4626 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4627 returns true.
4628
1db33b5a
UW
46292015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4630
4631 * linux-low.c (check_stopped_by_breakpoint): Use
4632 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4633
ab290430
PA
46342015-08-27 Pedro Alves <palves@redhat.com>
4635
4636 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4637
8d749320
SM
46382015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4639
6711b7f8
SM
4640 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4641 the XNEW-family equivalent.
8d749320
SM
4642 (compile_bytecodes): Likewise.
4643 * dll.c (loaded_dll): Likewise.
4644 * event-loop.c (append_callback_event): Likewise.
4645 (create_file_handler): Likewise.
4646 (create_file_event): Likewise.
4647 * hostio.c (handle_open): Likewise.
4648 * inferiors.c (add_thread): Likewise.
4649 (add_process): Likewise.
4650 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4651 * linux-arm-low.c (arm_new_process): Likewise.
4652 (arm_new_thread): Likewise.
4653 * linux-low.c (add_to_pid_list): Likewise.
4654 (linux_add_process): Likewise.
4655 (handle_extended_wait): Likewise.
4656 (add_lwp): Likewise.
4657 (enqueue_one_deferred_signal): Likewise.
4658 (enqueue_pending_signal): Likewise.
4659 (linux_resume_one_lwp_throw): Likewise.
4660 (linux_resume_one_thread): Likewise.
4661 (linux_read_memory): Likewise.
4662 (linux_write_memory): Likewise.
4663 * linux-mips-low.c (mips_linux_new_process): Likewise.
4664 (mips_linux_new_thread): Likewise.
4665 (mips_add_watchpoint): Likewise.
4666 * linux-x86-low.c (initialize_low_arch): Likewise.
4667 * lynx-low.c (lynx_add_process): Likewise.
4668 * mem-break.c (set_raw_breakpoint_at): Likewise.
4669 (set_breakpoint): Likewise.
4670 (add_condition_to_breakpoint): Likewise.
4671 (add_commands_to_breakpoint): Likewise.
4672 (clone_agent_expr): Likewise.
4673 (clone_one_breakpoint): Likewise.
4674 * regcache.c (new_register_cache): Likewise.
4675 * remote-utils.c (look_up_one_symbol): Likewise.
4676 * server.c (queue_stop_reply): Likewise.
4677 (start_inferior): Likewise.
4678 (queue_stop_reply_callback): Likewise.
4679 (handle_target_event): Likewise.
4680 * spu-low.c (fetch_ppc_memory): Likewise.
4681 (store_ppc_memory): Likewise.
4682 * target.c (set_target_ops): Likewise.
4683 * thread-db.c (thread_db_load_search): Likewise.
4684 (try_thread_db_load_1): Likewise.
4685 * tracepoint.c (add_tracepoint): Likewise.
4686 (add_tracepoint_action): Likewise.
4687 (create_trace_state_variable): Likewise.
4688 (cmd_qtdpsrc): Likewise.
4689 (cmd_qtro): Likewise.
4690 (add_while_stepping_state): Likewise.
4691 * win32-low.c (child_add_thread): Likewise.
4692 (get_image_name): Likewise.
4693
ed8b7b42
YQ
46942015-08-25 Yao Qi <yao.qi@linaro.org>
4695
4696 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4697
db3cb7cb
YQ
46982015-08-25 Yao Qi <yao.qi@linaro.org>
4699
4700 * Makefile.in (aarch64-linux.o): New rule.
4701 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4702 srv_tgtobj.
4703 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4704 (aarch64_init_debug_reg_state): Make it extern.
4705 (aarch64_linux_prepare_to_resume): Remove.
4706
f6011a1c
YQ
47072015-08-25 Yao Qi <yao.qi@linaro.org>
4708
4709 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4710 lwp_arch_private_info and ptid_of_lwp.
4711
88e2cf7e
YQ
47122015-08-25 Yao Qi <yao.qi@linaro.org>
4713
4714 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4715 Find proc_info by find_process_pid. All callers updated.
4716
5e35436e
YQ
47172015-08-25 Yao Qi <yao.qi@linaro.org>
4718
4719 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4720 Remove.
4721 (debug_reg_change_callback): Remove.
4722 (aarch64_notify_debug_reg_change): Remove.
4723
4a8a7965
YQ
47242015-08-25 Yao Qi <yao.qi@linaro.org>
4725
4726 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4727 Call current_lwp_ptid.
4728
32a271ee
YQ
47292015-08-25 Yao Qi <yao.qi@linaro.org>
4730
4731 * linux-aarch64-low.c (debug_reg_change_callback): Use
4732 debug_printf.
4733
0d51c8d7
YQ
47342015-08-25 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4737
31a43dd5
YQ
47382015-08-25 Yao Qi <yao.qi@linaro.org>
4739
4740 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4741
8ee52567
YQ
47422015-08-25 Yao Qi <yao.qi@linaro.org>
4743
4744 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4745 the code.
4746
ff3f0f45
YQ
47472015-08-25 Yao Qi <yao.qi@linaro.org>
4748
4749 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4750 Remove.
4751 (debug_reg_change_callback): Remove argument entry and add argument
4752 lwp. Remove local variable thread. Don't print thread id in the
4753 debugging output. Don't check whether pid of thread equals to pid.
4754 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4755 iterate_over_lwps instead find_inferior.
4756
3d40fbb5
PA
47572015-08-24 Pedro Alves <palves@redhat.com>
4758
4759 * inferiors.c (get_first_process): New function.
4760 * inferiors.h (get_first_process): New declaration.
4761 * remote-utils.c (read_ptid): Default to the first process in the
4762 list, instead of to the current thread's process.
4763
438e1e42
PA
47642015-08-24 Pedro Alves <palves@redhat.com>
4765
4766 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4767 * event-loop.c: Likewise.
4768 * remote-utils.c: Likewise.
4769 * tracepoint.c: Likewise.
4770
a8c6d4fc
PA
47712015-08-24 Pedro Alves <palves@redhat.com>
4772
4773 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4774 ptid_get_lwp.
4775
99b0bb12
PA
47762015-08-21 Pedro Alves <palves@redhat.com>
4777
4778 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4779 instead of literal 1.
4780
f8904751
PA
47812015-08-21 Pedro Alves <palves@redhat.com>
4782
4783 * tdesc.c (default_description): Explicitly zero-initialize.
4784
465a859e
PA
47852015-08-21 Pedro Alves <palves@redhat.com>
4786
4787 PR gdb/18749
4788 * inferiors.c (remove_thread): Discard any pending stop reply for
4789 this thread.
4790 * server.c (remove_all_on_match_pid): Rename to ...
4791 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4792 instead of a pid.
4793 (discard_queued_stop_replies): Change parameter to a ptid. Now
4794 extern.
4795 (handle_v_kill, kill_inferior_callback, captured_main)
4796 (process_serial_event): Adjust.
4797 * server.h (discard_queued_stop_replies): Declare.
4798
f0db101d
PA
47992015-08-21 Pedro Alves <palves@redhat.com>
4800
4801 * linux-low.c (wait_for_sigstop): Always switch to no thread
4802 selected if the previously current thread dies.
4803 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4804 process instead of the current thread's.
4805 * remote-utils.c (input_interrupt): Don't check if there's no
4806 current thread.
4807 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4808 current thread to the general thread fails, error out.
4809 (handle_qxfer_auxv, handle_qxfer_libraries)
4810 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4811 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4812 (handle_query): Check if there's a thread selected instead of
4813 checking whether there's any thread in the thread list.
4814 (handle_qxfer_threads, handle_qxfer_btrace)
4815 (handle_qxfer_btrace_conf): Don't error out early if there's no
4816 thread in the thread list.
4817 (handle_v_cont, myresume): Don't set the current thread to the
4818 continue thread.
4819 (process_serial_event) <Hg handling>: Also set thread_id if the
4820 previous general thread is still alive.
4821 (process_serial_event) <g/G handling>: If setting the current
4822 thread to the general thread fails, error out.
4823 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4824 thread's lwp instead of the current thread's.
4825 * target.c (set_desired_thread): If the desired thread was not
4826 found, leave the current thread pointing to NULL. Return an int
4827 (boolean) indicating success.
4828 * target.h (set_desired_thread): Change return type to int.
4829
40045d91
MF
48302015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4831
4832 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4833 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4834 #includes.
4835 (ps_get_thread_area): New function.
4836
45face3b
GB
48372015-08-19 Gary Benson <gbenson@redhat.com>
4838
4839 * hostio.c (handle_pread): Do not attempt to read more data
4840 than hostio_reply_with_data can fit in a packet.
4841
16d5f642
JB
48422015-08-18 Joel Brobecker <brobecker@adacore.com>
4843
4844 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4845
a738da3a
MF
48462015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4847
4848 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4849
33ebda9d
PA
48502015-08-06 Pedro Alves <palves@redhat.com>
4851
4852 * tracepoint.c (expr_eval_result): Now an int.
4853
a44892be
PA
48542015-08-06 Pedro Alves <palves@redhat.com>
4855
4856 * gdbthread.h (struct regcache): Forward declare.
4857 (struct thread_info) <regcache_data>: Now a struct regcache
4858 pointer.
4859 * inferiors.c (inferior_regcache_data)
4860 (set_inferior_regcache_data): Now work with struct regcache
4861 pointers.
4862 * inferiors.h (struct regcache): Forward declare.
4863 (inferior_regcache_data, set_inferior_regcache_data): Now work
4864 with struct regcache pointers.
4865 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4866 (free_register_cache_thread): Remove struct regcache pointer
4867 casts.
4868
608a1e46
PA
48692015-08-06 Pedro Alves <palves@redhat.com>
4870
4871 * server.c (captured_main): On error, print the exception message
4872 to stderr, and if run_once is set, throw a quit.
4873
f0ce0d3a
PA
48742015-08-06 Pedro Alves <palves@redhat.com>
4875
4876 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4877 the current thread.
4878
bf47e248
PA
48792015-08-06 Pedro Alves <palves@redhat.com>
4880
4881 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4882 reading beyond the passed in buffer length.
4883
b6b9ffcc
PL
48842015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4885
4886 * tracepoint.c (symbol_list) <required>: Remove.
4887
863d01bd
PA
48882015-08-06 Pedro Alves <palves@redhat.com>
4889
4890 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4891 count if stopping and suspending threads.
4892 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4893 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4894 (linux_detach): Complete an ongoing step-over.
4895 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4896 throughout.
4897 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4898 (linux_wait_1): If passing a signal to the inferior after
4899 finishing a step-over, unsuspend and re-resume all lwps. If we
4900 see a single-step event but the thread should be continuing, don't
4901 pass the trap to gdb.
4902 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4903 internal_error instead of gdb_assert.
4904 (enqueue_pending_signal): New function.
4905 (check_ptrace_stopped_lwp_gone): Add debug output.
4906 (start_step_over): Use internal_error instead of gdb_assert.
4907 (complete_ongoing_step_over): New function.
4908 (linux_resume_one_thread): Don't resume a suspended thread.
4909 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4910 it stepping.
4911
00db26fa
PA
49122015-08-06 Pedro Alves <palves@redhat.com>
4913
4914 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4915 (linux_thread_alive): Use lwp_is_marked_dead.
4916 (extended_event_reported): Delete.
4917 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4918 instead of extended_event_reported.
4919 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4920 as well.
4921 (lwp_is_marked_dead): New function.
4922 (lwp_running): Use lwp_is_marked_dead.
4923 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4924 comment.
4925
ad071a30
PA
49262015-08-06 Pedro Alves <palves@redhat.com>
4927
4928 * linux-low.c (linux_wait_1): Move fork event output out of the
4929 !report_to_gdb check. Pass event_child->waitstatus to
4930 target_waitstatus_to_string instead of ourstatus.
4931
524b57e6
YQ
49322015-08-04 Yao Qi <yao.qi@linaro.org>
4933
4934 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4935 if current_thread is 32 bit.
4936
6085d6f6
YQ
49372015-08-04 Yao Qi <yao.qi@linaro.org>
4938
4939 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4940 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4941 * server.c (extended_protocol): Remove "static".
4942 * server.h (extended_protocol): Declare it.
4943
8a7e4587
YQ
49442015-08-04 Yao Qi <yao.qi@linaro.org>
4945
4946 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4947 both aarch64 and aarch32.
4948 (aarch64_set_pc): Likewise.
4949
3b53ae99
YQ
49502015-08-04 Yao Qi <yao.qi@linaro.org>
4951
4952 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4953 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4954 arm-with-neon.xml to srv_xmlfiles.
4955 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4956 (is_64bit_tdesc): New function.
4957 (aarch64_linux_read_description): New function.
4958 (aarch64_arch_setup): Call aarch64_linux_read_description.
4959 (regs_info): Rename to regs_info_aarch64.
4960 (aarch64_regs_info): Return right regs_info.
4961 (initialize_low_arch): Call initialize_low_arch_aarch32.
4962
bd9e6534
YQ
49632015-08-04 Yao Qi <yao.qi@linaro.org>
4964
4965 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4966 * linux-aarch32-low.c: New file.
4967 * linux-aarch32-low.h: New file.
4968 * linux-arm-low.c (arm_fill_gregset): Move it to
4969 linux-aarch32-low.c.
4970 (arm_store_gregset): Likewise.
4971 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4972 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4973 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4974 (regs_info): Rename to regs_info_arm.
4975 (arm_regs_info): Return regs_info_aarch32 if
4976 have_ptrace_getregset is 1 and target description is
4977 arm_with_neon or arm_with_vfpv3.
4978 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4979 Call initialize_low_arch_aarch32 instead.
4980
ded48a5e
YQ
49812015-08-04 Yao Qi <yao.qi@linaro.org>
4982
4983 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4984 * linux-low.c: ... here.
4985 * linux-low.h (have_ptrace_getregset): Declare it.
4986
96e9210f
PA
49872015-08-04 Pedro Alves <palves@redhat.com>
4988
4989 * thread-db.c (struct thread_db): Use new typedefs.
4990 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4991 CHK calls.
4992 (disable_thread_event_reporting): Cast result of dlsym to
4993 destination function pointer type.
4994 (thread_db_mourn): Use td_ta_delete_ftype.
4995
af60a1ef
SL
49962015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4997
4998 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4999 arch variant.
5000 (CDX_BREAKPOINT): Define for R2.
5001 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5002 (the_low_target): Add comments.
5003
e8b41681
YQ
50042015-07-30 Yao Qi <yao.qi@linaro.org>
5005
5006 * linux-arm-low.c (arm_hwcap): Remove it.
5007 (arm_read_description): New local variable arm_hwcap. Don't
5008 set arm_hwcap to zero.
5009
89abb039
YQ
50102015-07-30 Yao Qi <yao.qi@linaro.org>
5011
5012 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5013 Use regcache->tdesc instead.
5014 (arm_store_wmmxregset): Likewise.
5015 (arm_fill_vfpregset): Likewise.
5016 (arm_store_vfpregset): Likewise.
5017
deca266c
YQ
50182015-07-30 Yao Qi <yao.qi@linaro.org>
5019
5020 * linux-arm-low.c: Include arch/arm.h.
5021 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5022 (arm_store_gregset): Likewise.
5023
aa58a496
SM
50242015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5025
5026 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5027 ptrace's 4th parameter.
5028
50904b25
YQ
50292015-07-27 Yao Qi <yao.qi@linaro.org>
5030
5031 * configure.srv (case aarch64*-*-linux*): Don't set
5032 srv_linux_usrregs.
5033
5826e159
PA
50342015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5035
5036 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5037 sys/ptrace.h.
5038 * linux-arm-low.c: Likewise.
5039 * linux-cris-low.c: Likewise.
5040 * linux-crisv32-low.c: Likewise.
5041 * linux-low.c: Likewise.
5042 * linux-m68k-low.c: Likewise.
5043 * linux-mips-low.c: Likewise.
5044 * linux-nios2-low.c: Likewise.
5045 * linux-s390-low.c: Likewise.
5046 * linux-sparc-low.c: Likewise.
5047 * linux-tic6x-low.c: Likewise.
5048 * linux-tile-low.c: Likewise.
5049 * linux-x86-low.c: Likewise.
5050
54019719
PA
50512015-07-24 Pedro Alves <palves@redhat.com>
5052
5053 * config.in: Regenerate.
5054 * configure: Regenerate.
5055
eb7aa561
PA
50562015-07-24 Pedro Alves <palves@redhat.com>
5057
5058 * acinclude.m4: Include ../ptrace.m4.
5059 * configure.ac: Call GDB_AC_PTRACE.
5060 * config.in, configure: Regenerate.
5061
55d7b841
YQ
50622015-07-24 Yao Qi <yao.qi@linaro.org>
5063
5064 * linux-low.c (linux_create_inferior): Remove setting to
5065 proc->priv->new_inferior.
5066 (linux_attach): Likewise.
5067 (linux_low_filter_event): Likewise.
5068 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5069
c06cbd92
YQ
50702015-07-24 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-low.c (linux_arch_setup): New function.
5073 (linux_low_filter_event): If proc->tdesc is NULL and
5074 proc->attached is true, call the_low_target.arch_setup.
5075 Otherwise, keep status pending, and return.
5076 (linux_resume_one_lwp_throw): Don't call get_pc if
5077 thread->while_stepping isn't NULL. Don't call
5078 get_thread_regcache if proc->tdesc is NULL.
5079 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5080 (linux_target_ops): Install arch_setup.
5081 * server.c (start_inferior): Call the_target->arch_setup.
5082 * target.h (struct target_ops) <arch_setup>: New field.
5083 (target_arch_setup): New marco.
5084 * lynx-low.c (lynx_target_ops): Update.
5085 * nto-low.c (nto_target_ops): Update.
5086 * spu-low.c (spu_target_ops): Update.
5087 * win32-low.c (win32_target_ops): Update.
5088
5ae3ebba
YQ
50892015-07-24 Yao Qi <yao.qi@linaro.org>
5090
5091 * linux-low.c (linux_add_process): Don't set
5092 proc->priv->new_inferior.
5093 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5094 (linux_attach): Likewise.
5095
eb97750b
YQ
50962015-07-24 Yao Qi <yao.qi@linaro.org>
5097
5098 * server.c (start_inferior): Code refactor.
5099
51aee833
YQ
51002015-07-24 Yao Qi <yao.qi@linaro.org>
5101
5102 * server.c (process_serial_event): Set general_thread.
5103
af1b22f3
YQ
51042015-07-21 Yao Qi <yao.qi@linaro.org>
5105
5106 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5107 aarch64_linux_get_debug_reg_capacity.
5108
554717a3
YQ
51092015-07-17 Yao Qi <yao.qi@linaro.org>
5110
5111 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5112 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5113 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5114 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5115 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5116 (AARCH64_HWP_ALIGNMENT): Likewise.
5117 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5118 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5119 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5120 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5121 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5122 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5123 (struct aarch64_debug_reg_state): Likewise.
5124 (struct arch_lwp_info): Likewise.
5125 (aarch64_align_watchpoint): Likewise.
5126 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5127 (aarch64_watchpoint_length): Likewise.
5128 (aarch64_point_encode_ctrl_reg): Likewise
5129 (aarch64_point_is_aligned): Likewise.
5130 (aarch64_align_watchpoint): Likewise.
5131 (aarch64_linux_set_debug_regs):
5132 (aarch64_dr_state_insert_one_point): Likewise.
5133 (aarch64_dr_state_remove_one_point): Likewise.
5134 (aarch64_handle_breakpoint): Likewise.
5135 (aarch64_handle_aligned_watchpoint): Likewise.
5136 (aarch64_handle_unaligned_watchpoint): Likewise.
5137 (aarch64_handle_watchpoint): Likewise.
5138
c67ca4de
YQ
51392015-07-17 Yao Qi <yao.qi@linaro.org>
5140
5141 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5142 and don't aarch64_get_debug_reg_state. All callers update.
5143 (aarch64_handle_aligned_watchpoint): Likewise.
5144 (aarch64_handle_unaligned_watchpoint): Likewise.
5145 (aarch64_handle_watchpoint): Likewise.
5146 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5147 (aarch64_remove_point): Likewise.
5148
25abf979
YQ
51492015-07-17 Yao Qi <yao.qi@linaro.org>
5150
5151 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5152 debug_printf.
5153 (aarch64_handle_unaligned_watchpoint): Likewise.
5154
db1ff28b
JK
51552015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5156
5157 Revert the previous 3 commits:
5158 Move gdb_regex* to common/
5159 Move linux_find_memory_regions_full & co.
5160 gdbserver build-id attribute generator
5161
700ca40f
JK
51622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5163 Jan Kratochvil <jan.kratochvil@redhat.com>
5164
5165 gdbserver build-id attribute generator.
5166 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5167 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5168 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5169 (find_phdr): New.
5170 (get_dynamic): Use find_pdhr to traverse program headers.
5171 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5172 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5173 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5174 (get_hex_build_id): New.
5175 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5176 to reply XML document.
5177
9904185c
JK
51782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5179 Jan Kratochvil <jan.kratochvil@redhat.com>
5180
5181 * target.c: Include target/target-utils.h and fcntl.h.
5182 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5183 (target_fileio_read_stralloc): New functions.
5184
6e5b4429
JK
51852015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5186
5187 * Makefile.in (OBS): Add gdb_regex.o.
5188 (gdb_regex.o): New.
5189 * config.in: Rebuilt.
5190 * configure: Rebuilt.
5191
ddc98fbf
JK
51922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5193 Jan Kratochvil <jan.kratochvil@redhat.com>
5194
5195 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5196 * Makefile.in (OBS): Add target-utils.o.
5197 (linux-maps.o, target-utils.o): New.
5198 * configure.srv (srv_linux_obj): Add linux-maps.o.
5199
e57bb7a0
PL
52002015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5201
5202 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5203 function, return 1.
5204 (the_low_target): Install it.
5205
586b02a9
PA
52062015-07-14 Pedro Alves <palves@redhat.com>
5207
5208 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5209 Instead, ignore ECHILD, and throw an error for other errnos.
5210
58c1b36c
PA
52112015-07-10 Pedro Alves <palves@redhat.com>
5212
5213 * event-loop.c (struct callback_event) <data>: Change type to
5214 gdb_client_data instance instead of gdb_client_data pointer.
5215 (append_callback_event): Adjust.
5216
421530db
PL
52172015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5218
5219 * linux-aarch64-low.c: Add comments for each linux_target_ops
5220 method. Remove comments already covered in target_ops and
5221 linux_target_ops definitions.
5222 (the_low_target): Add comments for each unimplemented method.
5223
c2d65f38
YQ
52242015-07-09 Yao Qi <yao.qi@linaro.org>
5225
5226 * linux-aarch64-low.c (aarch64_regmap): Remove.
5227 (aarch64_usrregs_info): Remove.
5228 (regs_info): Set field usrregs to NULL.
5229
b20a6524
MM
52302015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5231
5232 * linux-low.c: Include "rsp-low.h"
5233 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5234 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5235 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5236 (handle_btrace_enable_pt): New.
5237 (handle_btrace_general_set): Support "pt".
5238 (handle_btrace_conf_general_set): Support "pt:size".
5239
96c97461
PL
52402015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5241
5242 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5243 Z_PACKET_SW_BP.
5244
37d66942
PL
52452015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5246
5247 * linux-aarch64-low.c: Remove comment about endianness.
5248 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5249 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5250 memcmp.
5251
dc06243f
GB
52522015-06-24 Gary Benson <gbenson@redhat.com>
5253
5254 * linux-i386-ipa.c (stdint.h): Do not include.
5255 * lynx-i386-low.c (stdint.h): Likewise.
5256 * lynx-ppc-low.c (stdint.h): Likewise.
5257 * mem-break.c (stdint.h): Likewise.
5258 * thread-db.c (stdint.h): Likewise.
5259 * tracepoint.c (stdint.h): Likewise.
5260 * win32-low.c (stdint.h): Likewise.
5261
124e13d9
SM
52622015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5263
5264 * server.c (write_qxfer_response): Update call to
5265 remote_escape_output.
5266
909c2cda
JK
52672015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5268 Jan Kratochvil <jan.kratochvil@redhat.com>
5269
5270 Merge multiple hex conversions.
5271 * gdbreplay.c (tohex): Rename to 'fromhex'.
5272 (logchar): Use fromhex.
5273
24c05f46
JK
52742015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5275
5276 * server.c (handle_qxfer_libraries): Set `version' attribute for
5277 <library-list>.
5278
14d2069a
GB
52792015-06-10 Gary Benson <gbenson@redhat.com>
5280
5281 * target.h (struct target_ops) <multifs_open>: New field.
5282 <multifs_unlink>: Likewise.
5283 <multifs_readlink>: Likewise.
5284 * linux-low.c (nat/linux-namespaces.h): New include.
5285 (linux_target_ops): Initialize the_target->multifs_open,
5286 the_target->multifs_unlink and the_target->multifs_readlink.
5287 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5288 * hostio.c (hostio_fs_pid): New static variable.
5289 (hostio_handle_new_gdb_connection): New function.
5290 (handle_setfs): Likewise.
5291 (handle_open): Use the_target->multifs_open as appropriate.
5292 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5293 (handle_readlink): Use the_target->multifs_readlink as
5294 appropriate.
5295 (handle_vFile): Handle vFile:setfs packets.
5296 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5297 after target_handle_new_gdb_connection.
5298
4b8b5e72
GB
52992015-06-10 Gary Benson <gbenson@redhat.com>
5300
5301 * configure.ac (AC_CHECK_FUNCS): Add setns.
5302 * config.in: Regenerate.
5303 * configure: Likewise.
5304 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5305 (linux-namespaces.o): New rule.
5306 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5307
3ac2e371
GB
53082015-06-09 Gary Benson <gbenson@redhat.com>
5309
5310 * hostio.c (handle_open): Process mode argument with
5311 fileio_to_host_mode.
5312
ca9b78ce
YQ
53132015-06-01 Yao Qi <yao.qi@linaro.org>
5314
5315 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5316 * linux-x86-low.c: Likewise.
5317
bfacd19d
DB
53182015-05-28 Don Breazeal <donb@codesourcery.com>
5319
5320 * linux-low.c (handle_extended_wait): Initialize
5321 thread_info.last_resume_kind for new fork children.
5322
452003ef
PA
53232015-05-15 Pedro Alves <palves@redhat.com>
5324
5325 * target.h (target_handle_new_gdb_connection): Rewrite using if
5326 wrapped in do/while.
5327
1041a03c
JB
53282015-05-14 Joel Brobecker <brobecker@adacore.com>
5329
5330 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5331 * configure, config.in: Regenerate.
5332 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5333 Declare typedef.
5334
c269dbdb
DB
53352015-05-12 Don Breazeal <donb@codesourcery.com>
5336
5337 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5338 PTRACE_EVENT_VFORK_DONE.
5339 (linux_low_ptrace_options, extended_event_reported): Add vfork
5340 events.
5341 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5342 and "vforkdone" for RSP 'T' Stop Reply Packet.
5343 * server.h (report_vfork_events): Declare
5344 global variable.
5345
3a8a0396
DB
53462015-05-12 Don Breazeal <donb@codesourcery.com>
5347
5348 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5349 (the_low_target) <new_fork>: Initialize new member.
5350 * linux-arm-low.c (arm_new_fork): New function.
5351 (the_low_target) <new_fork>: Initialize new member.
5352 * linux-low.c (handle_extended_wait): Call new target function
5353 new_fork.
5354 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5355 * linux-mips-low.c (mips_add_watchpoint): New function
5356 extracted from mips_insert_point.
5357 (the_low_target) <new_fork>: Initialize new member.
5358 (mips_linux_new_fork): New function.
5359 (mips_insert_point): Call mips_add_watchpoint.
5360 * linux-x86-low.c (x86_linux_new_fork): New function.
5361 (the_low_target) <new_fork>: Initialize new member.
5362
de0d863e
DB
53632015-05-12 Don Breazeal <donb@codesourcery.com>
5364
5365 * linux-low.c (handle_extended_wait): Implement return value,
5366 rename argument 'event_child' to 'event_lwp', handle
5367 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5368 (linux_low_ptrace_options): New function.
5369 (linux_low_filter_event): Call linux_low_ptrace_options,
5370 use different argument fo linux_enable_event_reporting,
5371 use return value from handle_extended_wait.
5372 (extended_event_reported): New function.
5373 (linux_wait_1): Call extended_event_reported and set
5374 status to report fork events.
5375 (linux_write_memory): Add pid to debug message.
5376 (reset_lwp_ptrace_options_callback): New function.
5377 (linux_handle_new_gdb_connection): New function.
5378 (linux_target_ops): Initialize new structure member.
5379 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5380 * lynx-low.c: Initialize new structure member.
5381 * remote-utils.c (prepare_resume_reply): Implement stop reason
5382 "fork" for "T" stop message.
5383 * server.c (handle_query): Call handle_new_gdb_connection.
5384 * server.h (report_fork_events): Declare global flag.
5385 * target.h (struct target_ops) <handle_new_gdb_connection>:
5386 New member.
5387 (target_handle_new_gdb_connection): New macro.
5388 * win32-low.c: Initialize new structure member.
5389
ddcbc397
DB
53902015-05-12 Don Breazeal <donb@codesourcery.com>
5391
5392 * mem-break.c (APPEND_TO_LIST): Define macro.
5393 (clone_agent_expr): New function.
5394 (clone_one_breakpoint): New function.
5395 (clone_all_breakpoints): New function.
5396 * mem-break.h: Declare new functions.
5397
89245bc0
DB
53982015-05-12 Don Breazeal <donb@codesourcery.com>
5399
5400 * linux-low.c (linux_supports_fork_events): New function.
5401 (linux_supports_vfork_events): New function.
5402 (linux_target_ops): Initialize new structure members.
5403 (initialize_low): Call linux_check_ptrace_features.
5404 * lynx-low.c (lynx_target_ops): Initialize new structure
5405 members.
5406 * server.c (report_fork_events, report_vfork_events):
5407 New global flags.
5408 (handle_query): Add new features to qSupported packet and
5409 response.
5410 (captured_main): Initialize new global variables.
5411 * target.h (struct target_ops) <supports_fork_events>:
5412 New member.
5413 <supports_vfork_events>: New member.
5414 (target_supports_fork_events): New macro.
5415 (target_supports_vfork_events): New macro.
5416 * win32-low.c (win32_target_ops): Initialize new structure
5417 members.
5418
835205d0
GB
54192015-05-12 Gary Benson <gbenson@redhat.com>
5420
5421 * server.c (handle_qxfer_exec_file): Use current process
5422 if annex is empty.
5423
21e94bd9
SL
54242015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5425
5426 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5427 Remove HAVE_PTRACE_GETREGS conditionals.
5428 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5429 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5430
45614f15
YQ
54312015-05-08 Yao Qi <yao.qi@linaro.org>
5432
5433 * linux-low.c (linux_supports_conditional_breakpoints): New
5434 function.
5435 (linux_target_ops): Install new target method.
5436 * lynx-low.c (lynx_target_ops): Install NULL hook for
5437 supports_conditional_breakpoints.
5438 * nto-low.c (nto_target_ops): Likewise.
5439 * spu-low.c (spu_target_ops): Likewise.
5440 * win32-low.c (win32_target_ops): Likewise.
5441 * server.c (handle_query): Check
5442 target_supports_conditional_breakpoints.
5443 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5444 New field.
5445 (target_supports_conditional_breakpoints): New macro.
5446
80ad801e
PA
54472015-05-06 Pedro Alves <palves@redhat.com>
5448
5449 PR server/18081
5450 * server.c (start_inferior): If the process exits, mourn it.
5451
819843c7
GB
54522015-04-21 Gary Benson <gbenson@redhat.com>
5453
5454 * hostio.c (fileio_open_flags_to_host): Factored out to
5455 fileio_to_host_openflags in common/fileio.c. Single use
5456 updated.
5457
a2d5a9d7
MF
54582015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5459
5460 * linux-xtensa-low.c (xtensa_fill_gregset)
5461 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5462 XCHAL_HAVE_LOOP.
5463
deb44829
MF
54642015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5465
5466 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5467 (regs_info): Replace usrregs pointer with NULL.
5468
e57f1de3
GB
54692015-04-17 Gary Benson <gbenson@redhat.com>
5470
5471 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5472 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5473 * server.c (handle_qxfer_exec_file): New function.
5474 (qxfer_packets): Add exec-file entry.
5475 (handle_query): Report qXfer:exec-file:read as supported packet.
5476
62828379
RN
54772015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5478
5479 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5480
b88bb450
GB
54812015-04-09 Gary Benson <gbenson@redhat.com>
5482
5483 * hostio-errno.c (errno_to_fileio_error): Remove function.
5484 Update caller to use remote_fileio_to_fio_error.
5485
c8f4bfdd
YQ
54862015-04-09 Yao Qi <yao.qi@linaro.org>
5487
5488 * linux-low.c (linux_insert_point): Call
5489 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5490 (linux_remove_point): Call remove_memory_breakpoint if type is
5491 raw_bkpt_type_sw.
5492 * linux-x86-low.c (x86_insert_point): Don't call
5493 insert_memory_breakpoint.
5494 (x86_remove_point): Don't call remove_memory_breakpoint.
5495
41f98f02
PA
54962015-04-01 Pedro Alves <palves@redhat.com>
5497 Cleber Rosa <crosa@redhat.com>
5498
5499 * server.c (gdbserver_usage): Reorganize and extend the usage
5500 message.
5501
2bf6fb9d
PA
55022015-03-24 Pedro Alves <palves@redhat.com>
5503
5504 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5505 output. Also dump TRAP_TRACE.
5506 (linux_low_filter_event): In debug output, distinguish a
5507 resume_stop SIGSTOP from a delayed SIGSTOP.
5508
369f6daa
GB
55092015-03-24 Gary Benson <gbenson@redhat.com>
5510
5511 * linux-x86-low.c (x86_linux_new_thread): Moved to
5512 nat/x86-linux.c.
5513 (x86_linux_prepare_to_resume): Likewise.
5514
8e5d4070
GB
55152015-03-24 Gary Benson <gbenson@redhat.com>
5516
5517 * Makefile.in (x86-linux-dregs.o): New rule.
5518 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5519 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5520 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5521 (x86_linux_dr_get): Likewise.
5522 (x86_linux_dr_set): Likewise.
5523 (update_debug_registers_callback): Likewise.
5524 (x86_linux_dr_set_addr): Likewise.
5525 (x86_linux_dr_get_addr): Likewise.
5526 (x86_linux_dr_set_control): Likewise.
5527 (x86_linux_dr_get_control): Likewise.
5528 (x86_linux_dr_get_status): Likewise.
5529 (x86_linux_update_debug_registers): Likewise.
5530
2b95d440
GB
55312015-03-24 Gary Benson <gbenson@redhat.com>
5532
5533 * linux-x86-low.c (x86_linux_update_debug_registers):
5534 New function, factored out from...
5535 (x86_linux_prepare_to_resume): ...this.
5536
14b0bc68
GB
55372015-03-24 Gary Benson <gbenson@redhat.com>
5538
5539 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5540 (x86_linux_dr_set): Likewise.
5541 (update_debug_registers_callback): Likewise.
5542 (x86_linux_dr_set_addr): Likewise.
5543 (x86_linux_dr_get_addr): Likewise.
5544 (x86_linux_dr_set_control): Likewise.
5545 (x86_linux_dr_get_control): Likewise.
5546 (x86_linux_dr_get_status): Likewise.
5547 (x86_linux_prepare_to_resume): Likewise.
5548
5dfe6ca8
GB
55492015-03-24 Gary Benson <gbenson@redhat.com>
5550
5551 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5552 Use perror_with_name. Pass string through gettext.
5553 (x86_linux_dr_set): Likewise.
5554
d33472ad
GB
55552015-03-24 Gary Benson <gbenson@redhat.com>
5556
5557 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5558 (x86_linux_dr_set_addr): ...this.
5559 (x86_dr_low_get_addr): Rename to...
5560 (x86_linux_dr_get_addr): ...this.
5561 (x86_dr_low_set_control): Rename to...
5562 (x86_linux_dr_set_control): ...this.
5563 (x86_dr_low_get_control): Rename to...
5564 (x86_linux_dr_get_control): ...this.
5565 (x86_dr_low_get_status): Rename to...
5566 (x86_linux_dr_get_status): ...this.
5567 (x86_dr_low): Update with new function names.
5568
4b134ca1
GB
55692015-03-24 Gary Benson <gbenson@redhat.com>
5570
5571 * Makefile.in (x86-linux.o): New rule.
5572 * configure.srv: Add x86-linux.o to relevant targets.
5573 * linux-low.c (lwp_set_arch_private_info): New function.
5574 (lwp_arch_private_info): Likewise.
5575 * linux-x86-low.c: Include nat/x86-linux.h.
5576 (arch_lwp_info): Removed structure.
5577 (update_debug_registers_callback):
5578 Use lwp_set_debug_registers_changed.
5579 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5580 and lwp_set_debug_registers_changed.
5581 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5582
34c703da
GB
55832015-03-24 Gary Benson <gbenson@redhat.com>
5584
5585 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5586 * linux-arm-low.c (arm_new_thread): Likewise.
5587 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5588 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5589 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5590 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5591
cff068da
GB
55922015-03-24 Gary Benson <gbenson@redhat.com>
5593
5594 * linux-low.c (ptid_of_lwp): New function.
5595 (lwp_is_stopped): Likewise.
5596 (lwp_stop_reason): Likewise.
5597 * linux-x86-low.c (update_debug_registers_callback):
5598 Use lwp_is_stopped.
5599 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5600 lwp_stop_reason.
5601
b2f7c7e8
GB
56022015-03-24 Gary Benson <gbenson@redhat.com>
5603
5604 * linux-low.h (linux_stop_lwp): Remove declaration.
5605
6d4ee8c6
GB
56062015-03-24 Gary Benson <gbenson@redhat.com>
5607
5608 * linux-low.h: Include nat/linux-nat.h.
5609 * linux-low.c (iterate_over_lwps_args): New structure.
5610 (iterate_over_lwps_filter): New function.
5611 (iterate_over_lwps): Likewise.
5612 * linux-x86-low.c (update_debug_registers_callback):
5613 Update signature to what iterate_over_lwps expects.
5614 Remove PID check that iterate_over_lwps now performs.
5615 (x86_dr_low_set_addr): Use iterate_over_lwps.
5616 (x86_dr_low_set_control): Likewise.
5617
70a0bb6b
GB
56182015-03-24 Gary Benson <gbenson@redhat.com>
5619
5620 * linux-x86-low.c (x86_debug_reg_state): New function.
5621 (x86_linux_prepare_to_resume): Use the above.
5622
7b669087
GB
56232015-03-24 Gary Benson <gbenson@redhat.com>
5624
5625 * linux-low.c (current_lwp_ptid): New function.
5626 * linux-x86-low.c: Include nat/linux-nat.h.
5627 (x86_dr_low_get_addr): Use current_lwp_ptid.
5628 (x86_dr_low_get_control): Likewise.
5629 (x86_dr_low_get_status): Likewise.
5630
eef49a3d
PA
56312015-03-20 Pedro Alves <palves@redhat.com>
5632
5633 * tracepoint.c (cmd_qtstatus): Make "str" const.
5634
b2333d22
PA
56352015-03-20 Pedro Alves <palves@redhat.com>
5636
5637 * server.c (handle_general_set): Make "req_str" const.
5638
23f238d3
PA
56392015-03-19 Pedro Alves <palves@redhat.com>
5640
5641 * linux-low.c (linux_resume_one_lwp): Rename to ...
5642 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5643 instead call perror_with_name.
5644 (check_ptrace_stopped_lwp_gone): New function.
5645 (linux_resume_one_lwp): Reimplement as wrapper around
5646 linux_resume_one_lwp_throw that swallows errors if the LWP is
5647 gone.
5648
91baf43f
PA
56492015-03-19 Pedro Alves <palves@redhat.com>
5650
5651 * linux-low.c (count_events_callback, select_event_lwp_callback):
5652 No longer check whether the thread has resume_stop as last resume
5653 kind.
5654
8bf3b159
PA
56552015-03-19 Pedro Alves <palves@redhat.com>
5656
5657 * linux-low.c (count_events_callback, select_event_lwp_callback):
5658 Use the lwp's status_pending_p field, not the thread's.
5659
b90fc188
PA
56602015-03-19 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (select_event_lwp_callback): Update comments to
5663 no longer mention SIGTRAP.
5664
464b0089
GB
56652015-03-18 Gary Benson <gbenson@redhat.com>
5666
5667 * server.c (handle_query): Do not report vFile:fstat as supported.
5668
aa9e327f
GB
56692015-03-11 Gary Benson <gbenson@redhat.com>
5670
5671 * hostio.c (sys/types.h): New include.
5672 (sys/stat.h): Likewise.
5673 (common-remote-fileio.h): Likewise.
5674 (handle_fstat): New function.
5675 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5676
791c0056
GB
56772015-03-11 Gary Benson <gbenson@redhat.com>
5678
5679 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5680 struct stat.st_blocks and struct stat.st_blksize.
5681 * configure: Regenerate.
5682 * config.in: Likewise.
5683 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5684 (OBS): Add common-remote-fileio.o.
5685 (common-remote-fileio.o): New rule.
5686
9a9df970
PA
56872015-03-09 Pedro Alves <palves@redhat.com>
5688
5689 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5690 'struct sockaddr' pointer in 'accept' call.
5691
9eb1356e
PA
56922015-03-09 Pedro Alves <palves@redhat.com>
5693
5694 Revert:
5695 2015-03-07 Pedro Alves <palves@redhat.com>
5696 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5697 or <winsock2.h> here. Instead include "gdb_socket.h".
5698 (remote_open): Use union gdb_sockaddr_u.
5699 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5700 or <winsock2.h> here. Instead include "gdb_socket.h".
5701 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5702 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5703 or <sys/un.h>.
5704 (init_named_socket, gdb_agent_helper_thread): Use union
5705 gdb_sockaddr_u.
5706
aac331e4
PA
57072015-03-07 Pedro Alves <palves@redhat.com>
5708
5709 * configure.ac (build_warnings): Move
5710 -Wdeclaration-after-statement to the C-specific set.
5711 * configure: Regenerate.
5712
366c75fc
PA
57132015-03-07 Pedro Alves <palves@redhat.com>
5714
5715 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5716 or <winsock2.h> here. Instead include "gdb_socket.h".
5717 (remote_open): Use union gdb_sockaddr_u.
5718 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5719 or <winsock2.h> here. Instead include "gdb_socket.h".
5720 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5721 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5722 or <sys/un.h>.
5723 (init_named_socket, gdb_agent_helper_thread): Use union
5724 gdb_sockaddr_u.
5725
492d29ea
PA
57262015-03-07 Pedro Alves <palves@redhat.com>
5727
5728 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5729 instead.
5730
60a191ed
YQ
57312015-03-06 Yao Qi <yao.qi@linaro.org>
5732
5733 * linux-aarch64-low.c (aarch64_insert_point): Use
5734 show_debug_regs as a boolean.
5735 (aarch64_remove_point): Likewise.
5736
f5771b1d
PA
57372015-03-05 Pedro Alves <palves@redhat.com>
5738
5739 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5740 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5741 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5742 * nto-low.c (nto_target_ops): Likewise.
5743 * spu-low.c (spu_target_ops): Likewise.
5744 * win32-low.c (win32_target_ops): Likewise.
5745
3e572f71
PA
57462015-03-04 Pedro Alves <palves@redhat.com>
5747
72f4393d 5748 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5749 Decide whether a breakpoint triggered based on the SIGTRAP's
5750 siginfo.si_code.
72f4393d
L
5751 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5752 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5753 (linux_low_filter_event): Check for breakpoints before checking
5754 watchpoints.
5755 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5756 siginfo.si_code.
72f4393d
L
5757 (linux_stopped_by_sw_breakpoint)
5758 (linux_supports_stopped_by_sw_breakpoint)
5759 (linux_stopped_by_hw_breakpoint)
5760 (linux_supports_stopped_by_hw_breakpoint): New functions.
5761 (linux_target_ops): Install new target methods.
3e572f71 5762
1ec68e26
PA
57632015-03-04 Pedro Alves <palves@redhat.com>
5764
5765 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5766 * server.c (swbreak_feature, hwbreak_feature): New globals.
5767 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5768 (captured_main): Clear swbreak_feature and hwbreak_feature.
5769 * server.h (swbreak_feature, hwbreak_feature): Declare.
5770 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5771 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5772 supports_stopped_by_hw_breakpoint>: New fields.
5773 (target_supports_stopped_by_sw_breakpoint)
5774 (target_stopped_by_sw_breakpoint)
5775 (target_supports_stopped_by_hw_breakpoint)
5776 (target_stopped_by_hw_breakpoint): Declare.
5777
15c66dd6
PA
57782015-03-04 Pedro Alves <palves@redhat.com>
5779
5780 enum lwp_stop_reason -> enum target_stop_reason
5781 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5782 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5783 (linux_wait_1, stuck_in_jump_pad_callback)
5784 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5785 (linux_stopped_by_watchpoint):
5786 * linux-low.h (enum lwp_stop_reason): Delete.
5787 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5788 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5789
98fc70d6
YQ
57902015-03-04 Yao Qi <yao.qi@linaro.org>
5791
5792 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5793
dd2ac174
GB
57942015-03-03 Gary Benson <gbenson@redhat.com>
5795
5796 * hostio.c (handle_vFile): Fix prefix lengths.
5797
d68e53f4
MM
57982015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5799
5800 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5801 ptr_bits.
5802
bf2d68ab
AA
58032015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5804
5805 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5806 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5807 (clean): Add "rm -f" for above C files.
5808 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5809 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5810 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5811 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5812 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5813 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5814 (init_registers_s390x_vx_linux64)
5815 (init_registers_s390x_tevx_linux64)
5816 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5817 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5818 declarations.
5819 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5820 (s390_store_vxrs_high): New functions.
5821 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5822 NT_S390_VXRS_HIGH.
5823 (s390_arch_setup): Add logic for selecting one of the new target
5824 descriptions. Activate the new vector regsets if applicable.
5825 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5826 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5827 and init_registers_s390x_tevx_linux64.
5828
c966a859
PA
58292015-03-01 Pedro Alves <palves@redhat.com>
5830
5831 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5832 parameter.
5833
4180215b
PA
58342015-02-27 Pedro Alves <palves@redhat.com>
5835
5836 * linux-x86-low.c (u_debugreg_offset): New function.
5837 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5838
749bab01
PA
58392015-02-27 Pedro Alves <palves@redhat.com>
5840
5841 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5842 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5843 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5844 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5845 (ps_lsetfpregs, ps_getpid)
5846 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5847 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5848 (ps_lsetxregs, ps_plog): Declare.
5849
3c14e5a3
PA
58502015-02-27 Pedro Alves <palves@redhat.com>
5851
5852 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5853 IP_AGENT_EXPORT_FUNC.
5854 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5855 IP_AGENT_EXPORT_FUNC.
5856 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5857 (IP_AGENT_EXPORT): Delete.
5858 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5859 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5860 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5861 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5862 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5863 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5864 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5865 (traceframe_read_count, traceframe_write_count)
5866 (traceframes_created, trace_state_variables, get_raw_reg)
5867 (get_trace_state_variable_value, set_trace_state_variable_value)
5868 (ust_loaded, helper_thread_id, cmd_buf): Use
5869 IPA_SYM_EXPORTED_NAME.
5870 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5871 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5872 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5873 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5874 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5875 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5876 EXTERN_C_PUSH/EXTERN_C_POP.
5877 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5878 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5879 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5880 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5881 (traceframe_write_count, traceframe_read_count)
5882 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5883 (about_to_request_buffer_space, get_trace_state_variable_value)
5884 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5885 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5886 EXTERN_C_PUSH/EXTERN_C_POP.
5887 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5888 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5889 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5890 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5891 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5892 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5893 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5894 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5895 Define.
5896 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5897 (IP_AGENT_EXPORT_VAR_DECL): Define.
5898 (tracing): Declare.
5899 (gdb_agent_get_raw_reg): Declare.
5900
fe978cb0
PA
59012015-02-27 Tom Tromey <tromey@redhat.com>
5902 Pedro Alves <palves@redhat.com>
5903
5904 Rename symbols whose names are reserved C++ keywords throughout.
5905
3bc3d82a
PA
59062015-02-27 Pedro Alves <palves@redhat.com>
5907
5908 * Makefile.in (COMPILER): New, get it from autoconf.
5909 (CXX): Get from autoconf instead.
5910 (COMPILE.pre): Use COMPILER.
5911 (CC-LD): Rename to ...
5912 (CC_LD): ... this. Use COMPILER.
5913 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5914 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5915 * acinclude.m4: Include build-with-cxx.m4.
5916 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5917 Disable -Werror by default if building in C++ mode.
5918 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5919 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5920 the C++ compiler. Save/restore CXXFLAGS too.
5921 * configure: Regenerate.
5922
07697489
PA
59232015-02-27 Pedro Alves <palves@redhat.com>
5924
5925 * acinclude.m4: Include libiberty.m4.
5926 * configure.ac: Call libiberty_INIT.
5927 * config.in, configure: Regenerate.
5928
9beb7c4e
PA
59292015-02-26 Pedro Alves <palves@redhat.com>
5930
5931 * linux-low.c (linux_wait_1): When incrementing the PC past a
5932 program breakpoint always use the_low_target.breakpoint_len as
5933 increment, rather than the maximum between that and
5934 the_low_target.decr_pc_after_break.
5935
8090aef2
PA
59362015-02-23 Pedro Alves <palves@redhat.com>
5937
5938 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5939 thread was doing a step-over; always adjust the PC if
5940 we stepped over a permanent breakpoint.
5941 (linux_wait_1): If we stepped over breakpoint that was on top of a
5942 permanent breakpoint, manually advance the PC past it.
5943
bc9540e8
PA
59442015-02-23 Pedro Alves <palves@redhat.com>
5945
5946 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5947 modes.
5948 (x86_fill_gregset, x86_store_gregset): Use it when handling
5949 $orig_eax.
5950
2db9a427
PA
59512015-02-20 Pedro Alves <palves@redhat.com>
5952
5953 * thread-db.c: Include "nat/linux-procfs.h".
5954 (thread_db_init): Skip listing new threads if the kernel supports
5955 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5956
afa8d396
PA
59572015-02-20 Pedro Alves <palves@redhat.com>
5958
5959 * linux-low.c (status_pending_p_callback): Use ptid_match.
5960
c9587f88
AT
59612015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5962
5963 PR breakpoints/16812
5964 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5965 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5966 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5967
b05ec7a5
AT
59682015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5969
5970 PR breakpoints/15956
5971 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5972
d33501a5
MM
59732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5974
5975 * linux-low.c (linux_low_btrace_conf): Print size.
5976 * server.c (handle_btrace_conf_general_set): New.
5977 (hanle_general_set): Call handle_btrace_conf_general_set.
5978 (handle_query): Report Qbtrace-conf:bts:size as supported.
5979
f4abbc16
MM
59802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5981
5982 * linux-low.c (linux_low_enable_btrace): Update parameters.
5983 (linux_low_btrace_conf): New.
5984 (linux_target_ops)<to_btrace_conf>: Initialize.
5985 * server.c (current_btrace_conf): New.
5986 (handle_btrace_enable): Rename to ...
5987 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5988 to target_enable_btrace. Update comment. Update users.
5989 (handle_qxfer_btrace_conf): New.
5990 (qxfer_packets): Add btrace-conf entry.
5991 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5992 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5993 (target_ops)<read_btrace_conf>: New.
5994 (target_enable_btrace): Update parameters.
5995 (target_read_btrace_conf): New.
5996
043c3577
MM
59972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5998
5999 * server.c (handle_btrace_general_set): Remove call to
6000 target_supports_btrace.
6001 (supported_btrace_packets): New.
6002 (handle_query): Call supported_btrace_packets.
6003 * target.h: include btrace-common.h.
6004 (btrace_target_info): Removed.
6005 (supports_btrace, target_supports_btrace): Update parameters.
6006
734b0e4b
MM
60072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6008
6009 * Makefile.in (SFILES): Add common/btrace-common.c.
6010 (OBS): Add common/btrace-common.o.
6011 (btrace-common.o): Add build rules.
6012 * linux-low: Include btrace-common.h.
6013 (linux_low_read_btrace): Use struct btrace_data. Call
6014 btrace_data_init and btrace_data_fini.
6015
d6c146e9
PA
60162015-02-06 Pedro Alves <palves@redhat.com>
6017
6018 * thread-db.c (find_new_threads_callback): Add debug output.
6019
20ba1ce6
PA
60202015-02-04 Pedro Alves <palves@redhat.com>
6021
6022 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6023 (resume_stopped_resumed_lwps): New function.
6024 (linux_wait_for_event_filtered): Use it.
6025
8cc73a39
SDJ
60262015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6027
6028 * Makefile.in (SFILES): Add linux-personality.c.
6029 (linux-personality.o): New rule.
6030 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6031 list of objects to be built.
6032 * linux-low.c: Include nat/linux-personality.h.
6033 (linux_create_inferior): Remove code to disable address space
6034 randomization (moved to ../nat/linux-personality.c). Create
6035 cleanup to disable address space randomization.
6036
fb23d554
SDJ
60372015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6038
6039 * Makefile.in (posix-strerror.o): New rule.
6040 (mingw-strerror.o): Likewise.
6041 * configure: Regenerated.
6042 * configure.ac: Source file ../common/common.host. Initialize new
6043 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6044
cdf43629
YQ
60452015-01-14 Yao Qi <yao@codesourcery.com>
6046
6047 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6048 (ppc-linux.o): New rule.
6049 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6050 * configure.ac: AC_CHECK_FUNCS(getauxval).
6051 * config.in: Re-generated.
6052 * configure: Re-generated.
6053 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6054 ppc64_64bit_inferior_p
6055
514c5338
YQ
60562015-01-14 Yao Qi <yao@codesourcery.com>
6057
6058 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6059 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6060 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6061 (PT_ORIG_R3, PT_TRAP): Likewise.
6062 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6063 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6064 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6065
3368c1e5
JB
60662015-01-10 Joel Brobecker <brobecker@adacore.com>
6067
6068 * i387-fp.c (i387_cache_to_xsave): In look over
6069 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6070 zmmh_low_space field by use of zmmh_high_space.
6071
582511be
PA
60722015-01-09 Pedro Alves <palves@redhat.com>
6073
6074 * linux-low.c (step_over_bkpt): Move higher up in the file.
6075 (handle_extended_wait): Don't store the stop_pc here.
6076 (get_stop_pc): Adjust comments and rename to ...
6077 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6078 stopped for a software breakpoint or hardware breakpoint.
6079 (thread_still_has_status_pending_p): New function.
6080 (status_pending_p_callback): Use
6081 thread_still_has_status_pending_p. If the event is no longer
6082 interesting, resume the LWP.
6083 (handle_tracepoints): Add assert.
6084 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6085 (wstatus_maybe_breakpoint): New function.
6086 (cancel_breakpoint): Delete function.
6087 (check_stopped_by_watchpoint): New function, factored out from
6088 linux_low_filter_event.
6089 (lp_status_maybe_breakpoint): Delete function.
6090 (linux_low_filter_event): Remove filter_ptid argument.
6091 Leave thread group exits pending here. Store the LWP's stop PC.
6092 Always leave events pending.
6093 (linux_wait_for_event_filtered): Pull all events out of the
6094 kernel, and leave them all pending.
6095 (count_events_callback, select_event_lwp_callback): Consider all
6096 events.
6097 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6098 (select_event_lwp): Only give preference to the stepping LWP in
6099 all-stop mode. Adjust comments.
6100 (ignore_event): New function.
6101 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6102 references to cancel_breakpoints. Adjust to renames. Also give
6103 equal priority to all LWPs that have had events in non-stop mode.
6104 If reporting a software breakpoint event, unadjust the LWP's PC.
6105 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6106 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6107 Adjust.
6108 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6109 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6110 (linux_stopped_by_watchpoint): Adjust.
6111 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6112 * linux-low.h (enum lwp_stop_reason): New.
6113 (struct lwp_info) <stop_pc>: Adjust comment.
6114 <stopped_by_watchpoint>: Delete field.
6115 <stop_reason>: New field.
6116 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6117 * mem-break.c (software_breakpoint_inserted_here)
6118 (hardware_breakpoint_inserted_here): New function.
6119 * mem-break.h (software_breakpoint_inserted_here)
6120 (hardware_breakpoint_inserted_here): Declare.
6121 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6122 (cancel_breakpoints): Delete.
6123 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6124 (upload_fast_traceframes): Remove references to
6125 cancel_breakpoints.
6126
a33e3959
PA
61272015-01-09 Pedro Alves <palves@redhat.com>
6128
6129 * thread-db.c (find_new_threads_callback): Ignore thread if the
6130 kernel thread ID is -1.
6131
8784d563
PA
61322015-01-09 Pedro Alves <palves@redhat.com>
6133
6134 * linux-low.c (linux_attach_fail_reason_string): Move to
6135 nat/linux-ptrace.c, and rename.
6136 (linux_attach_lwp): Update comment.
6137 (attach_proc_task_lwp_callback): New function.
6138 (linux_attach): Adjust to rename and use
6139 linux_proc_attach_tgid_threads.
6140 (linux_attach_fail_reason_string): Delete declaration.
6141
76f2b779
JB
61422015-01-01 Joel Brobecker <brobecker@adacore.com>
6143
6144 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6145 * server.c (gdbserver_version): Likewise.
6146
fafcc06a
SDJ
61472014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6148
6149 * remote-utils.c: Include ctype.h.
6150 (input_interrupt): Explicitly handle the case when the char
6151 received is the NUL byte. Improve the printing of non-ASCII
6152 characters.
6153
beed38b8
JB
61542014-12-16 Joel Brobecker <brobecker@adacore.com>
6155
6156 * linux-low.c (linux_low_filter_event): Update call to
6157 linux_enable_event_reporting following the addition of
6158 a new parameter to that function.
6159
bf330350
CU
61602014-12-16 Catalin Udma <catalin.udma@freescale.com>
6161
6162 PR server/17457
6163 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6164 (AARCH64_FPCR_REGNO): Likewise.
6165 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6166 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6167 (aarch64_store_fpregset): Likewise.
6168
5227d625
JB
61692014-12-15 Joel Brobecker <brobecker@adacore.com>
6170
6171 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6172 Remove FIXME comment about assumption about N.
6173
f93b65a0
JB
61742014-12-13 Joel Brobecker <brobecker@adacore.com>
6175
6176 * configure.ac: If large-file support is disabled in GDBserver,
6177 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6178 * configure: Regenerate.
6179
e5a9158d
AA
61802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6181
6182 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6183 warning upon ENODATA from ptrace.
6184 * linux-s390-low.c (s390_store_tdb): New.
6185 (s390_regsets): Add regset for NT_S390_TDB.
6186
feea5f36
AA
61872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6188
6189 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6190 without a fill_function.
6191 * linux-s390-low.c (s390_fill_last_break): Remove.
6192 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6193 (s390_arch_setup): Use regset's size instead of fill_function for
6194 loop end condition.
6195
098dbe61
AA
61962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6197
6198 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6199 the regset's store function when ptrace returned an error.
6200 * regcache.c (get_thread_regcache): Invalidate register cache
6201 before fetching inferior's registers.
6202
28eef672
AA
62032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6204
6205 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6206 while-loop as for-loop.
6207 (regsets_store_inferior_registers): Likewise.
6208
bdca27a2
YQ
62092014-11-28 Yao Qi <yao@codesourcery.com>
6210
6211 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6212 * config.in, configure: Re-generate.
6213 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6214 is defined.
6215
9c232dda
YQ
62162014-11-21 Yao Qi <yao@codesourcery.com>
6217
6218 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6219 (AC_CHECK_HEADERS): Remove malloc.h.
6220 * configure: Re-generated.
6221 * config.in: Re-generated.
6222 * server.h: Don't include alloca.h and malloc.h.
6223 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6224 Don't include malloc.h.
6225
43968415
JB
62262014-11-17 Joel Brobecker <brobecker@adacore.com>
6227
6228 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6229 corresponding ERRNO check in same block.
6230
40e91bc7
PA
62312014-11-12 Pedro Alves <palves@redhat.com>
6232
6233 * server.c (cont_thread): Update comment.
6234 (start_inferior, attach_inferior): No longer clear cont_thread.
6235 (handle_v_cont): No longer set cont_thread.
6236 (captured_main): Clear cont_thread each time a GDB connects.
6237
c2c118cf
PA
62382014-11-12 Pedro Alves <palves@redhat.com>
6239
6240 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6241 thread, and don't resume all threads if the Hc thread has exited.
6242
78708b7c
PA
62432014-11-12 Pedro Alves <palves@redhat.com>
6244
6245 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6246 the process group instead of to a specific LWP.
6247
a2abc7de
PA
62482014-10-15 Pedro Alves <palves@redhat.com>
6249
6250 PR server/17487
6251 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6252 parameter.
6253 (arm_set_thread_context): Delete.
6254 (the_low_target): Adjust.
6255 * win32-i386-low.c (debug_registers_changed)
6256 (debug_registers_used): Delete.
6257 (update_debug_registers_callback): New function.
6258 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6259 needing to update their debug registers.
6260 (win32_get_current_dr): New function.
6261 (x86_dr_low_get_addr, x86_dr_low_get_control)
6262 (x86_dr_low_get_status): Fetch the debug register from the thread
6263 record's context.
6264 (i386_initial_stuff): Adjust.
6265 (i386_get_thread_context): Remove current_event parameter. Don't
6266 clear debug_registers_changed nor copy DR values to
6267 debug_reg_state.
6268 (i386_set_thread_context): Delete.
6269 (i386_prepare_to_resume): New function.
6270 (i386_thread_added): Mark the thread as needing to update irs
6271 debug registers.
6272 (the_low_target): Remove i386_set_thread_context and install
6273 i386_prepare_to_resume.
6274 * win32-low.c (win32_get_thread_context): Adjust.
6275 (win32_set_thread_context): Use SetThreadContext
6276 directly.
6277 (win32_prepare_to_resume): New function.
6278 (win32_require_context): New function, factored out from ...
6279 (thread_rec): ... this.
6280 (continue_one_thread): Call win32_prepare_to_resume on each thread
6281 we're about to continue.
6282 (win32_resume): Call win32_prepare_to_resume on the event thread.
6283 * win32-low.h (struct win32_thread_info)
6284 <debug_registers_changed>: New field.
6285 (struct win32_target_ops): Change prototype of set_thread_context,
6286 delete set_thread_context and add prepare_to_resume.
6287 (win32_require_context): New declaration.
6288
a442d071
GB
62892014-10-08 Gary Benson <gbenson@redhat.com>
6290
6291 * server.h: Do not include common-exceptions.h.
6292
6f1947e8
GB
62932014-10-08 Gary Benson <gbenson@redhat.com>
6294
6295 * server.h: Do not include cleanups.h.
6296
63b434a4
JH
62972014-09-30 James Hogan <james.hogan@imgtec.com>
6298
6299 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6300 mips64-dsp-linux.c.
6301
c4d9ceb6
YQ
63022014-09-23 Yao Qi <yao@codesourcery.com>
6303
6304 * linux-low.c (lp_status_maybe_breakpoint): New function.
6305 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6306 (count_events_callback): Likewise.
6307 (select_event_lwp_callback): Likewise.
6308 (cancel_breakpoints_callback): Likewise.
6309
89a5711c
DB
63102014-09-19 Don Breazeal <donb@codesourcery.com>
6311
6312 * linux-low.c (handle_extended_wait): Call
6313 linux_ptrace_get_extended_event.
6314 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6315 linux_is_extended_waitstatus.
6316
bffc0964
JB
63172014-09-16 Joel Brobecker <brobecker@adacore.com>
6318
6319 * Makefile.in (CPPFLAGS): Define.
6320 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6321 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6322
0bfdf32f
GB
63232014-09-16 Gary Benson <gbenson@redhat.com>
6324
6325 * inferiors.h (current_inferior): Renamed as...
6326 (current_thread): New variable. All uses updated.
6327 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6328 (maybe_move_out_of_jump_pad): Likewise.
6329 (cancel_breakpoint): Likewise.
6330 (linux_low_filter_event): Likewise.
6331 (wait_for_sigstop): Likewise.
6332 (linux_resume_one_lwp): Likewise.
6333 (need_step_over_p): Likewise.
6334 (start_step_over): Likewise.
6335 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6336 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6337 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6338 and save_inferior as saved_thread.
6339 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6340 saved_thread.
6341 (regcache_invalidate_thread): Likewise.
6342 * remote-utils.c (prepare_resume_reply): Likewise.
6343 * thread-db.c (thread_db_get_tls_address): Likewise.
6344 (disable_thread_event_reporting): Likewise.
6345 (remove_thread_event_breakpoints): Likewise.
6346 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6347 as saved_thread.
6348 * target.h (set_desired_inferior): Renamed as...
6349 (set_desired_thread): New declaration. All uses updated.
6350 * server.c (myresume): Updated comment to reference thread instead
6351 of inferior.
6352 (handle_serial_event): Likewise.
6353 (handle_target_event): Likewise.
6354
361c8ade
GB
63552014-09-12 Tom Tromey <tromey@redhat.com>
6356 Gary Benson <gbenson@redhat.com>
6357
6358 * regcache.h: Include common-regcache.h.
6359 (regcache_read_pc): Don't declare.
6360 * regcache.c (get_thread_regcache_for_ptid): New function.
6361
bd9269f7
GB
63622014-09-11 Tom Tromey <tromey@redhat.com>
6363 Gary Benson <gbenson@redhat.com>
6364
6365 * symbol.c: New file.
6366 * Makefile.in (SFILES): Add symbol.c.
6367 (OBS): Add symbol.o.
6368
f8c1d06b
GB
63692014-09-11 Gary Benson <gbenson@redhat.com>
6370
6371 * target.c (target_stop_ptid, target_continue_ptid): New
6372 functions.
6373
721ec300
GB
63742014-09-11 Tom Tromey <tromey@redhat.com>
6375 Gary Benson <gbenson@redhat.com>
6376
6377 * target.h: Include target/target.h.
6378 * target.c (target_read_memory, target_read_uint32)
6379 (target_write_memory): New functions.
6380
c5e92cca
GB
63812014-09-11 Gary Benson <gbenson@redhat.com>
6382
6383 * server.h (debug_hw_points): Don't declare.
6384 * server.c (debug_hw_points): Don't define. Replace all uses
6385 with show_debug_regs.
6386 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6387 all uses with show_debug_regs.
6388
2e4bb98a
EBM
63892014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6390
6391 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6392 endianness into account.
6393 (ppc_supply_ptrace_register): Likewise.
6394
ac740bc7
JH
63952014-09-03 James Hogan <james.hogan@imgtec.com>
6396
6397 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6398 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6399
97ea6506
GB
64002014-09-03 Gary Benson <gbenson@redhat.com>
6401
6402 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6403 ALL_DEBUG_ADDRESS_REGISTERS.
6404
df7e5265
GB
64052014-09-02 Gary Benson <gbenson@redhat.com>
6406
6407 * i386-low.h: Renamed as...
6408 * x86-low.h: New file. All type, function and variable name
6409 prefixes changed from "i386_" to "x86_". All references updated.
6410 * i386-low.c: Renamed as...
6411 * x86-low.c: New file. All type, function and variable name
6412 prefixes changed from "i386_" to "x86_". All references updated.
6413
ed859da7
GB
64142014-09-02 Gary Benson <gbenson@redhat.com>
6415
6416 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6417 (x86_linux_new_thread): Likewise.
6418
860789c7
GB
64192014-08-29 Gary Benson <gbenson@redhat.com>
6420
6421 * server.h (setjmp.h): Do not include.
6422 (toplevel): Do not declare.
6423 (common-exceptions.h): Include.
6424 (cleanups.h): Likewise.
6425 * server.c (toplevel): Do not define.
6426 (exit_code): New static global.
6427 (detach_or_kill_for_exit_cleanup): New function.
6428 (main): New function. Original main renamed to...
6429 (captured_main): New function.
6430 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6431
ff55e1b5
GB
64322014-08-29 Gary Benson <gbenson@redhat.com>
6433
6434 * Makefile.in (SFILES): Add common/common-exceptions.c.
6435 (OBS): Add common-exceptions.o.
6436 (common-exceptions.o): New rule.
6437 * utils.c (prepare_to_throw_exception): New function.
6438
e9bcb658
GB
64392014-08-29 Gary Benson <gbenson@redhat.com>
6440
6441 * config.in: Regenerate.
6442 * configure: Likewise.
6443
e3180625
GB
64442014-08-29 Gary Benson <gbenson@redhat.com>
6445
6446 * Makefile.in (SFILES): Add common/cleanups.c.
6447 (OBS): cleanups.o.
6448 (cleanups.o): New rule.
6449
e3d6ba5d
GB
64502014-08-29 Gary Benson <gbenson@redhat.com>
6451
6452 * utils.c (internal_vwarning): New function.
6453
7096e886
GB
64542014-08-28 Gary Benson <gbenson@redhat.com>
6455
6456 * utils.h (fatal): Remove declaration.
6457 * utils.c (fatal): Remove function.
6458
14ce3192
GB
64592014-08-28 Gary Benson <gbenson@redhat.com>
6460
6461 * tracepoint.c (gdb_agent_init): Replace fatal with
6462 perror_with_name.
6463 (initialize_tracepoint): Likewise.
6464
50278d59
GB
64652014-08-28 Gary Benson <gbenson@redhat.com>
6466
6467 * remote-utils.c (remote_prepare): Replace fatal with error.
6468
aa96c426
GB
64692014-08-28 Gary Benson <gbenson@redhat.com>
6470
6471 * linux-low.c (linux_async): Replace fatal with warning.
6472 Tidy up and return.
6473 (linux_start_non_stop): Return -1 if linux_async failed.
6474
f7160e97
GB
64752014-08-28 Gary Benson <gbenson@redhat.com>
6476
6477 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6478 gdb_assert.
6479 (i386_dr_low_get_addr): Remove vague comment.
6480 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6481 gdb_assert.
6482
38e08fca
GB
64832014-08-28 Gary Benson <gbenson@redhat.com>
6484
6485 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6486 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6487 internal_error.
6488 (linux_resume_one_lwp): Likewise.
6489 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6490 gdb_assert.
6491 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6492 with internal_error.
6493 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6494 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6495 (find_register_by_name): Replace fatal with internal_error.
6496 (find_regno): Likewise.
6497 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6498 * thread-db.c (thread_db_create_event): Likewise.
6499 (thread_db_load_search): Likewise.
6500 (try_thread_db_load_1): Likewise.
6501 * tracepoint.c (get_jump_space_head): Replace fatal with
6502 internal_error.
6503 (claim_trampoline_space): Likewise.
6504 (have_fast_tracepoint_trampoline_buffer): Likewise.
6505 (cmd_qtstart): Likewise.
6506 (stop_tracing): Likewise.
6507 (fast_tracepoint_collecting): Likewise.
6508 (target_malloc): Likewise.
6509 (download_tracepoint): Likewise.
6510 (download_trace_state_variables): Replace check with gdb_assert.
6511 (upload_fast_traceframes): Replace fatal with internal_error.
6512
34abf635
GB
65132014-08-19 Tom Tromey <tromey@redhat.com>
6514 Gary Benson <gbenson@redhat.com>
6515
6516 * Makefile.in (SFILES): Add common/common-debug.c.
6517 (OBS): Add common-debug.o.
6518 (common-debug.o): New rule.
6519 * debug.h (debug_printf): Don't declare.
6520 * debug.c (debug_printf): Renamed and rewritten as...
6521 (debug_vprintf): New function.
6522
f6e94d78
GB
65232014-08-19 Gary Benson <gbenson@redhat.com>
6524
6525 * utils.h: Do not include print-utils.h.
6526
9239eeab
GB
65272014-08-19 Tom Tromey <tromey@redhat.com>
6528 Gary Benson <gbenson@redhat.com>
6529
6530 * server.h: Add static assertion.
6531 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6532
ef87c8bb
GB
65332014-08-19 Tom Tromey <tromey@redhat.com>
6534 Gary Benson <gbenson@redhat.com>
6535
6536 * Makefile.in (SFILES): Add common/errors.c.
6537 (OBS): Add errors.o.
6538 (IPA_OBS): Add errors-ipa.o.
6539 (errors.o): New rule.
6540 (errors-ipa.o): Likewise.
6541 * utils.h (perror_with_name, error, warning): Don't declare.
6542 * utils.c (warning): Renamed and rewritten as...
6543 (vwarning): New function.
6544 (error): Renamed and rewritten as...
6545 (verror): New function.
6546 (internal_error): Renamed and rewritten as...
6547 (internal_verror): New function.
6548
bb974a24
GB
65492014-08-07 Gary Benson <gbenson@redhat.com>
6550
6551 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6552 * configure: Regenerate.
6553 * config.in: Likewise.
6554 * server.h: Do not include errno.h.
6555 * event-loop.c: Likewise.
6556 * hostio-errno.c: Likewise.
6557 * linux-low.c: Likewise.
6558 * remote-utils.c: Likewise.
6559 * spu-low.c: Likewise.
6560 * utils.c: Likewise.
6561 * gdbreplay.c: Unconditionally include errno.h.
6562
6d3d12eb
GB
65632014-08-07 Gary Benson <gbenson@redhat.com>
6564
6565 * server.h: Do not include string.h.
6566 * event-loop.c: Likewise.
6567 * linux-low.c: Likewise.
6568 * regcache.c: Likewise.
6569 * remote-utils.c: Likewise.
6570 * spu-low.c: Likewise.
6571 * utils.c: Likewise.
6572
dccbb609
GB
65732014-08-07 Gary Benson <gbenson@redhat.com>
6574
6575 * server.h: Do not include gdb_assert.h.
6576
e76df0d0
GB
65772014-08-07 Gary Benson <gbenson@redhat.com>
6578
6579 * server.h: Do not include common-utils.h.
6580
4cb9c816
GB
65812014-08-07 Gary Benson <gbenson@redhat.com>
6582
6583 * server.h: Do not include ptid.h.
6584 * notif.h: Likewise.
6585
3995eeee
GB
65862014-08-07 Gary Benson <gbenson@redhat.com>
6587
6588 * server.h: Do not include gdb_locale.h.
6589
cb9f1a9b
GB
65902014-08-07 Gary Benson <gbenson@redhat.com>
6591
6592 * server.h: Do not include gdb/signals.h.
6593 * win32-low.c: Likewise.
6594
a5fceff8
GB
65952014-08-07 Gary Benson <gbenson@redhat.com>
6596
6597 * server.h: Do not include pathmax.h.
6598
b9391142
GB
65992014-08-07 Gary Benson <gbenson@redhat.com>
6600
6601 * server.h: Do not include libiberty.h.
6602 * linux-bfin-low.c: Likewise.
6603
0e443c87
GB
66042014-08-07 Gary Benson <gbenson@redhat.com>
6605
6606 * server.h: Do not include ansidecl.h.
6607
8ebb3f56
GB
66082014-08-07 Gary Benson <gbenson@redhat.com>
6609
6610 * linux-x86-low.c: Do not include stddef.h.
6611 * lynx-ppc-low.c: Likewise.
6612 * tracepoint.c: Likewise.
6613
8980bdf6
GB
66142014-08-07 Gary Benson <gbenson@redhat.com>
6615
6616 * server.h: Do not include stdarg.h.
6617 * nto-low.c: Likewise.
6618
d7096f71
GB
66192014-08-07 Gary Benson <gbenson@redhat.com>
6620
6621 * server.h: Do not include stdlib.h.
6622 * inferiors.c: Likewise.
6623 * linux-low.c: Likewise.
6624 * regcache.c: Likewise.
6625 * spu-low.c: Likewise.
6626 * tracepoint.c: Likewise.
6627 * utils.c: Likewise.
6628
d02f550d
GB
66292014-08-07 Gary Benson <gbenson@redhat.com>
6630
6631 * server.h: Do not include stdio.h.
6632 * linux-low.c: Likewise.
6633 * remote-utils.c: Likewise.
6634 * spu-low.c: Likewise.
6635 * utils.c: Likewise.
6636 * wincecompat.c: Likewise.
6637
87f6c4e3
GB
66382014-08-06 Gary Benson <gbenson@redhat.com>
6639
6640 * regcache.c (init_register_cache): Move conditionals inside if.
6641
7089dca4
GB
66422014-08-06 Gary Benson <gbenson@redhat.com>
6643
6644 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6645
462f517e
GB
66462014-07-31 Gary Benson <gbenson@redhat.com>
6647
6648 * ax.h: Do not include server.h.
6649 * gdbthread.h: Likewise.
6650 * lynx-low.h: Likewise.
6651 * notif.h: Likewise.
6652
976411d6
GB
66532014-07-30 Gary Benson <gbenson@redhat.com>
6654
6655 * server.h: Include common-defs.h.
6656 Do not include config.h or build-gnulib-gdbserver/config.h.
6657
d41f6d8e
GB
66582014-07-30 Gary Benson <gbenson@redhat.com>
6659
6660 * hostio-errno.c: Move server.h to top of includes list.
6661 * inferiors.c: Likewise.
6662 * linux-x86-low.c: Likewise.
6663 * notif.c: Include server.h.
6664
314c6a35
TT
66652014-07-24 Tom Tromey <tromey@redhat.com>
6666 Gary Benson <gbenson@redhat.com>
6667
6668 * server.h (CORE_ADDR): Now unsigned.
6669
69ff6be5
PA
66702014-07-16 Pedro Alves <palves@redhat.com>
6671
6672 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6673
ce9e3fe7
PA
66742014-07-15 Pedro Alves <palves@redhat.com>
6675
6676 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6677 copy.
6678
e76126e8
PA
66792014-07-11 Pedro Alves <palves@redhat.com>
6680
6681 * linux-low.c (kill_wait_lwp): New function, based on
6682 kill_one_lwp_callback, but use my_waitpid directly.
6683 (kill_one_lwp_callback, linux_kill): Use it.
6684
8e9db26e
PA
66852014-06-23 Pedro Alves <palves@redhat.com>
6686
6687 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6688 before setting DR0..DR3.
6689
698b3e08
GB
66902014-06-20 Gary Benson <gbenson@redhat.com>
6691
6692 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6693 * configure: Regenerated.
6694 * config.in: Likewise.
6695
125f8a3d
GB
66962014-06-20 Gary Benson <gbenson@redhat.com>
6697
6698 * Makefile.in (SFILES): Update locations for files moved
6699 from common to nat.
6700 (object file files): Reordered.
6701
42995dbd
GB
67022014-06-20 Gary Benson <gbenson@redhat.com>
6703
6704 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6705 (i386_dr_low_set_addr): Likewise.
6706 (i386_dr_low_get_addr): Likewise.
6707 (i386_dr_low_can_set_control): Likewise.
6708 (i386_dr_low_set_control): Likewise.
6709 (i386_dr_low_get_control): Likewise.
6710 (i386_dr_low_get_status): Likewise.
6711 (i386_get_debug_register_length): Likewise.
6712 * linux-x86-low.c (i386_dr_low_set_addr):
6713 Changed signature. Made static.
6714 (i386_dr_low_get_addr): Likewise.
6715 (i386_dr_low_set_control): Likewise.
6716 (i386_dr_low_get_control): Likewise.
6717 (i386_dr_low_get_status): Likewise.
6718 (i386_dr_low): New global variable.
6719 * win32-i386-low.c (i386_dr_low_set_addr):
6720 Changed signature. Made static.
6721 (i386_dr_low_get_addr): Likewise.
6722 (i386_dr_low_set_control): Likewise.
6723 (i386_dr_low_get_control): Likewise.
6724 (i386_dr_low_get_status): Likewise.
6725 (i386_dr_low): New global variable.
6726
e1d2394b
MS
67272014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6728
6729 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6730 * Makefile.in (AR, AR_FLAGS): Define.
6731 * configure: Regenerate.
6732
3a8ee006
GB
67332014-06-19 Gary Benson <gbenson@redhat.com>
6734
6735 * Makefile.in (i386-dregs.o): New rule.
6736 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6737 * i386-low.c (target.h): Remove include.
6738 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6739 (DR_CONTROL_SHIFT): Likewise.
6740 (DR_CONTROL_SIZE): Likewise.
6741 (DR_RW_EXECUTE): Likewise.
6742 (DR_RW_WRITE): Likewise.
6743 (DR_RW_READ): Likewise.
6744 (DR_RW_IORW): Likewise.
6745 (DR_LEN_1): Likewise.
6746 (DR_LEN_2): Likewise.
6747 (DR_LEN_4): Likewise.
6748 (DR_LEN_8): Likewise.
6749 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6750 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6751 (DR_ENABLE_SIZE): Likewise.
6752 (DR_LOCAL_SLOWDOWN): Likewise.
6753 (DR_GLOBAL_SLOWDOWN): Likewise.
6754 (DR_CONTROL_RESERVED): Likewise.
6755 (I386_DR_CONTROL_MASK): Likewise.
6756 (I386_DR_VACANT): Likewise.
6757 (I386_DR_LOCAL_ENABLE): Likewise.
6758 (I386_DR_GLOBAL_ENABLE): Likewise.
6759 (I386_DR_DISABLE): Likewise.
6760 (I386_DR_SET_RW_LEN): Likewise.
6761 (I386_DR_GET_RW_LEN): Likewise.
6762 (I386_DR_WATCH_HIT): Likewise.
6763 (i386_wp_op_t): Likewise.
6764 (i386_show_dr): Likewise.
6765 (i386_length_and_rw_bits): Likewise.
6766 (i386_insert_aligned_watchpoint): Likewise.
6767 (i386_remove_aligned_watchpoint): Likewise.
6768 (i386_handle_nonaligned_watchpoint): Likewise.
6769 i386_update_inferior_debug_regs(): Likewise.
6770 (i386_dr_insert_watchpoint): Likewise.
6771 (i386_dr_remove_watchpoint): Likewise.
6772 (i386_dr_region_ok_for_watchpoint): Likewise.
6773 (i386_dr_stopped_data_address): Likewise.
6774 (i386_dr_stopped_by_watchpoint): Likewise.
6775
8f26655c
GB
67762014-06-19 Gary Benson <gbenson@redhat.com>
6777
6778 * i386-low.c (i386_dr_show): Renamed to
6779 i386_show_dr and made static. All uses updated.
6780 (i386_dr_length_and_rw_bits): Renamed to
6781 i386_length_and_rw_bits and made static.
6782 All uses updated.
6783 (i386_dr_insert_aligned_watchpoint): Renamed to
6784 i386_insert_aligned_watchpoint and made static.
6785 All uses updated.
6786 (i386_dr_remove_aligned_watchpoint): Renamed to
6787 i386_remove_aligned_watchpoint and made static.
6788 All uses updated.
6789 (i386_dr_update_inferior_debug_regs): Renamed to
6790 i386_update_inferior_debug_regs and made static.
6791 All uses updated.
6792
b9228891
GB
67932014-06-18 Gary Benson <gbenson@redhat.com>
6794
5171def3
GB
6795 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6796 (i386_dr_low_can_set_control): Likewise.
6797 (i386_get_debug_register_length): Likewise.
6798 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6799 (i386_dr_low_can_set_control): Likewise.
6800 (i386_get_debug_register_length): Likewise.
6801
68022014-06-17 Gary Benson <gbenson@redhat.com>
6803
b9228891
GB
6804 * i386-low.h (i386-dregs.h): New include.
6805 (DR_FIRSTADDR): Now in i386-dregs.h.
6806 (DR_LASTADDR): Likewise.
6807 (DR_NADDR): Likewise.
6808 (DR_STATUS): Likewise.
6809 (DR_CONTROL): Likewise.
6810 (i386_debug_reg_state): Likewise.
6811 (i386_dr_insert_watchpoint): Likewise.
6812 (i386_dr_remove_watchpoint): Likewise.
6813 (i386_dr_region_ok_for_watchpoint): Likewise.
6814 (i386_dr_stopped_data_address): Likewise.
6815 (i386_dr_stopped_by_watchpoint): Likewise.
6816 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6817
4be83cc2
GB
68182014-06-18 Gary Benson <gbenson@redhat.com>
6819
6820 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6821 i386_dr_insert_watchpoint.
6822 (i386_low_remove_watchpoint): Renamed to
6823 i386_dr_remove_watchpoint.
6824 (i386_low_region_ok_for_watchpoint): Renamed to
6825 i386_dr_region_ok_for_watchpoint.
6826 (i386_low_stopped_data_address): Renamed to
6827 i386_dr_stopped_data_address.
6828 (i386_low_stopped_by_watchpoint): Renamed to
6829 i386_dr_stopped_by_watchpoint.
6830 * i386-low.c (i386_show_dr): Renamed to
6831 i386_dr_show and made nonstatic. All uses updated.
6832 (i386_length_and_rw_bits): Renamed to
6833 i386_dr_length_and_rw_bits and made nonstatic.
6834 All uses updated.
6835 (i386_insert_aligned_watchpoint): Renamed to
6836 i386_dr_insert_aligned_watchpoint and made nonstatic.
6837 All uses updated.
6838 (i386_remove_aligned_watchpoint): Renamed to
6839 i386_dr_remove_aligned_watchpoint and made nonstatic.
6840 All uses updated.
6841 (i386_update_inferior_debug_regs): Renamed to
6842 i386_dr_update_inferior_debug_regs and made nonstatic.
6843 All uses updated.
6844 (i386_low_insert_watchpoint): Renamed to
6845 i386_dr_insert_watchpoint. All uses updated.
6846 (i386_low_remove_watchpoint): Renamed to
6847 i386_dr_remove_watchpoint. All uses updated.
6848 (i386_low_region_ok_for_watchpoint): Renamed to
6849 i386_dr_region_ok_for_watchpoint. All uses updated.
6850 (i386_low_stopped_data_address): Renamed to
6851 i386_dr_stopped_data_address. All uses updated.
6852 (i386_low_stopped_by_watchpoint): Renamed to
6853 i386_dr_stopped_by_watchpoint. All uses updated.
6854
131aa0d4
GB
68552014-06-18 Gary Benson <gbenson@redhat.com>
6856
6857 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6858 (i386_dr_low_can_set_control): Likewise.
6859 (i386_insert_aligned_watchpoint): New check.
6860
d9305f7f
GB
68612014-06-18 Gary Benson <gbenson@redhat.com>
6862
6863 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6864 Renamed to state.
6865
e927c9fc
GB
68662014-06-18 Gary Benson <gbenson@redhat.com>
6867
6868 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6869 instead of fatal and error.
6870 (i386_handle_nonaligned_watchpoint): Likewise.
6871
1b6d4134
GB
68722014-06-18 Gary Benson <gbenson@redhat.com>
6873
6874 * i386-low.c (i386_get_debug_register_length): New macro.
6875 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6876 (i386_show_dr): Use debug_printf instead of fprintf. Use
6877 phex to format values.
6878
6e62758f
GB
68792014-06-18 Gary Benson <gbenson@redhat.com>
6880
6881 * i386-low.h: Comment changes.
6882 * i386-low.c: Likewise.
6883
fc6e2f03
GB
68842014-06-18 Gary Benson <gbenson@redhat.com>
6885
6886 * i386-low.c: Whitespace changes.
6887
f9d1eeed
TT
68882014-06-12 Tom Tromey <tromey@redhat.com>
6889
6890 * utils.c (freeargv): Remove.
6891
0b04e523
TT
68922014-06-12 Tom Tromey <tromey@redhat.com>
6893
6894 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6895 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6896 (parse_debug_format_options): Likewise.
6897 (gdbserver_usage): Likewise.
6898 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6899 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6900 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6901 against libiberty.
6902 ($(LIBGNU)): Depend on libiberty.
6903 (all-lib): Recurse into all subdirs.
6904 (install-only): Invoke "install" target in subdirs.
6905 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6906 targets.
6907 * configure: Rebuild.
6908 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6909 for vasprintf, vsnprintf, or gettimeofday.
6910 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6911 srv_tgtobj.
6912
270c9937
JB
69132014-06-05 Joel Brobecker <brobecker@adacore.com>
6914
6915 * development.sh: Delete.
6916 * Makefile.in (config.status): Adjust dependency on development.sh.
6917 * configure.ac: Adjust development.sh source call.
6918 * configure: Regenerate.
6919
0a261ed8
PA
69202014-06-02 Pedro Alves <palves@redhat.com>
6921
6922 * ax.c (gdb_free_agent_expr): New function.
6923 * ax.h (gdb_free_agent_expr): New declaration.
6924 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6925 list.
6926 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6927 static.
6928 (clear_breakpoint_conditions_and_commands): New function.
6929 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6930 (clear_breakpoint_conditions_and_commands): New declaration.
6931
e9dae05e
RR
69322014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6933
6934 * linux-aarch64-low.c (asm/ptrace.h): Include.
6935
5876f503
JK
69362014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6937
6938 Fix TLS access for -static -pthread.
6939 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6940 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6941 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6942
802e8e6d
PA
69432014-05-20 Pedro Alves <palves@redhat.com>
6944
6945 * linux-aarch64-low.c (aarch64_insert_point)
6946 (aarch64_remove_point): No longer check whether the type is
6947 supported here. Adjust to new interface.
6948 (the_low_target): Install aarch64_supports_z_point_type as
6949 supports_z_point_type method.
6950 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6951 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6952 instead of a Z packet char. Adjust.
6953 (arm_supports_z_point_type): New function.
6954 (arm_insert_point, arm_remove_point): Adjust to new interface.
6955 (the_low_target): Install arm_supports_z_point_type.
6956 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6957 (cris_insert_point, cris_remove_point): Adjust to new interface.
6958 Don't check whether the type is supported here.
6959 (the_low_target): Install cris_supports_z_point_type.
6960 * linux-low.c (linux_supports_z_point_type): New function.
6961 (linux_insert_point, linux_remove_point): Adjust to new interface.
6962 * linux-low.h (struct linux_target_ops) <insert_point,
6963 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6964 raw_breakpoint pointer parameter.
6965 <supports_z_point_type>: New method.
6966 * linux-mips-low.c (mips_supports_z_point_type): New function.
6967 (mips_insert_point, mips_remove_point): Adjust to new interface.
6968 Use mips_supports_z_point_type.
6969 (the_low_target): Install mips_supports_z_point_type.
6970 * linux-ppc-low.c (the_low_target): Install NULL as
6971 supports_z_point_type method.
6972 * linux-s390-low.c (the_low_target): Install NULL as
6973 supports_z_point_type method.
6974 * linux-sparc-low.c (the_low_target): Install NULL as
6975 supports_z_point_type method.
6976 * linux-x86-low.c (x86_supports_z_point_type): New function.
6977 (x86_insert_point): Adjust to new insert_point interface. Use
6978 insert_memory_breakpoint. Adjust to new
6979 i386_low_insert_watchpoint interface.
6980 (x86_remove_point): Adjust to remove_point interface. Use
6981 remove_memory_breakpoint. Adjust to new
6982 i386_low_remove_watchpoint interface.
6983 (the_low_target): Install x86_supports_z_point_type.
6984 * lynx-low.c (lynx_target_ops): Install NULL as
6985 supports_z_point_type callback.
6986 * nto-low.c (nto_supports_z_point_type): New.
6987 (nto_insert_point, nto_remove_point): Adjust to new interface.
6988 (nto_target_ops): Install nto_supports_z_point_type.
6989 * mem-break.c: Adjust intro comment.
6990 (struct raw_breakpoint) <raw_type, size>: New fields.
6991 <inserted>: Update comment.
6992 <shlib_disabled>: Delete field.
6993 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6994 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6995 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6996 (raw_bkpt_type_to_target_hw_bp_type): New function.
6997 (find_enabled_raw_code_breakpoint_at): New function.
6998 (find_raw_breakpoint_at): New type and size parameters. Use them.
6999 (insert_memory_breakpoint): New function, based off
7000 set_raw_breakpoint_at.
7001 (remove_memory_breakpoint): New function.
7002 (set_raw_breakpoint_at): Reimplement.
7003 (set_breakpoint): New, based on set_breakpoint_at.
7004 (set_breakpoint_at): Reimplement.
7005 (delete_raw_breakpoint): Go through the_target->remove_point
7006 instead of assuming memory breakpoints.
7007 (find_gdb_breakpoint_at): Delete.
7008 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7009 (find_gdb_breakpoint): New function.
7010 (set_gdb_breakpoint_at): Delete.
7011 (z_type_supported): New function.
7012 (set_gdb_breakpoint_1): New function, loosely based off
7013 set_gdb_breakpoint_at.
7014 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7015 (delete_gdb_breakpoint_at): Delete.
7016 (delete_gdb_breakpoint_1): New function, loosely based off
7017 delete_gdb_breakpoint_at.
7018 (delete_gdb_breakpoint): New function.
7019 (clear_gdb_breakpoint_conditions): Rename to ...
7020 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7021 breakpoint.
7022 (add_condition_to_breakpoint): Make static.
7023 (add_breakpoint_condition): Take a struct breakpoint pointer
7024 instead of an address. Adjust.
7025 (gdb_condition_true_at_breakpoint): Rename to ...
7026 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7027 z_type parameter.
7028 (gdb_condition_true_at_breakpoint): Reimplement.
7029 (add_breakpoint_commands): Take a struct breakpoint pointer
7030 instead of an address. Adjust.
7031 (gdb_no_commands_at_breakpoint): Rename to ...
7032 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7033 parameter. Return true if no breakpoint was found. Change debug
7034 output.
7035 (gdb_no_commands_at_breakpoint): Reimplement.
7036 (run_breakpoint_commands): Rename to ...
7037 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7038 and change return type to boolean.
7039 (run_breakpoint_commands): New function.
7040 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7041 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7042 breakpoint. Go through the_target->remove_point instead of
7043 assuming memory breakpoint.
7044 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7045 software and hardware breakpoints.
7046 (reinsert_raw_breakpoint): Go through the_target->insert_point
7047 instead of assuming memory breakpoint.
7048 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7049 software and hardware breakpoints.
7050 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7051 Check both software and hardware breakpoints.
7052 (validate_inserted_breakpoint): Assert the breakpoint is a
7053 software breakpoint. Set the inserted flag to -1 instead of
7054 setting shlib_disabled.
7055 (delete_disabled_breakpoints): Adjust.
7056 (validate_breakpoints): Only validate software breakpoints.
7057 Adjust to inserted flag change.
7058 (check_mem_read, check_mem_write): Skip breakpoint types other
7059 than software breakpoints. Adjust to inserted flag change.
7060 * mem-break.h (enum raw_bkpt_type): New enum.
7061 (raw_breakpoint, struct process_info): Forward declare.
7062 (Z_packet_to_target_hw_bp_type): Delete declaration.
7063 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7064 (set_gdb_breakpoint, delete_gdb_breakpoint)
7065 (clear_breakpoint_conditions): New declarations.
7066 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7067 (breakpoint_inserted_here): Update comment.
7068 (add_breakpoint_condition, add_breakpoint_commands): Replace
7069 address parameter with a breakpoint pointer parameter.
7070 (gdb_breakpoint_here): Update comment.
7071 (delete_gdb_breakpoint_at): Delete.
7072 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7073 * server.c (process_point_options): Take a struct breakpoint
7074 pointer instead of an address. Adjust.
7075 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7076 delete_gdb_breakpoint.
7077 * spu-low.c (spu_target_ops): Install NULL as
7078 supports_z_point_type method.
7079 * target.h: Include mem-break.h.
7080 (struct target_ops) <prepare_to_access_memory>: Update comment.
7081 <supports_z_point_type>: New field.
7082 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7083 instead of a char. Also take a raw breakpoint pointer.
7084 * win32-arm-low.c (the_low_target): Install NULL as
7085 supports_z_point_type.
7086 * win32-i386-low.c (i386_supports_z_point_type): New function.
7087 (i386_insert_point, i386_remove_point): Adjust to new interface.
7088 (the_low_target): Install i386_supports_z_point_type.
7089 * win32-low.c (win32_supports_z_point_type): New function.
7090 (win32_insert_point, win32_remove_point): Adjust to new interface.
7091 (win32_target_ops): Install win32_supports_z_point_type.
7092 * win32-low.h (struct win32_target_ops):
7093 <supports_z_point_type>: New method.
7094 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7095 instead of a char. Also take a raw breakpoint pointer.
7096
932539e3
PA
70972014-05-20 Pedro Alves <palves@redhat.com>
7098
7099 * mem-break.h: Include break-common.h.
7100 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7101 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7102 (Z_packet_to_target_hw_bp_type): New declaration.
7103 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7104 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7105 (Z_PACKET_ACCESS_WP): Delete macros.
7106 (Z_packet_to_hw_type): Delete function.
7107 * i386-low.h: Don't include break-common.h here.
7108 (Z_packet_to_hw_type): Delete declaration.
7109 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7110 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7111 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7112 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7113 * linux-aarch64-low.c: Don't include break-common.h here.
7114 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7115 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7116 (Z_packet_to_target_hw_bp_type): Delete function.
7117 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7118 function.
7119 (mips_insert_point, mips_remove_point): Use
7120 Z_packet_to_target_hw_bp_type.
7121
4ff0d3d8
PA
71222014-05-20 Pedro Alves <palves@redhat.com>
7123
7124 * linux-aarch64-low.c: Include break-common.h.
7125 (enum target_point_type): Delete.
7126 (Z_packet_to_point_type): Rename to ...
7127 (Z_packet_to_target_hw_bp_type): ... this, and return a
7128 target_hw_bp_type instead.
7129 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7130 instead of an enum target_point_type.
7131 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7132 breakpoint type.
7133 (aarch64_dr_state_insert_one_point)
7134 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7135 (aarch64_handle_aligned_watchpoint)
7136 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7137 Take an enum target_hw_bp_type instead of an enum
7138 target_point_type.
7139 (aarch64_supports_z_point_type): New function.
7140 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7141 use Z_packet_to_target_hw_bp_type.
7142
786dc519
JB
71432014-05-20 Joel Brobecker <brobecker@adacore.com>
7144
7145 * configure.ac: Only use -Werror by default when DEVELOPMENT
7146 is true.
7147 * configure: Regenerate.
7148
9e0aa64f
JK
71492014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7150
7151 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7152 * linux-x86-low.c (X86_64_USER_REGS): New.
7153 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7154
2b577b92
YQ
71552014-04-28 Yao Qi <yao@codesourcery.com>
7156
7157 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7158 name.
7159
94611da2
PA
71602014-04-25 Pedro Alves <palves@redhat.com>
7161
7162 PR server/16255
7163 * linux-low.c (linux_attach_fail_reason_string): New function.
7164 (linux_attach_lwp): Delete.
7165 (linux_attach_lwp_1): Rename to ...
7166 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7167 argument. Remove "initial" parameter. Return int instead of
7168 void. Don't error or warn here.
7169 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7170 failure to attach to the tgid. Call warning when failing to
7171 attach to an lwp.
7172 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7173 argument. Remove "initial" parameter. Return int instead of
7174 void. Don't error or warn here.
7175 (linux_attach_fail_reason_string): New declaration.
7176 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7177 interface change. Use linux_attach_fail_reason_string.
7178
01f9f808
MS
71792014-04-24 Michael Sturm <michael.sturm@mintel.com>
7180 Walfred Tedeschi <walfred.tedeschi@intel.com>
7181
7182 * Makefile.in: Added rules to handle new files
7183 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7184 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7185 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7186 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7187 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7188 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7189 x32-avx512-linux.o.
7190 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7191 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7192 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7193 i386/x32-avx512.xml.
7194 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7195 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7196 i386/x32-avx512-linux.xml.
7197 * i387-fp.c (num_avx512_k_registers): New constant for number
7198 of K registers.
7199 (num_avx512_zmmh_low_registers): New constant for number of
7200 lower ZMM registers (0-15).
7201 (num_avx512_zmmh_high_registers): New constant for number of
7202 higher ZMM registers (16-31).
7203 (num_avx512_ymmh_registers): New contant for number of higher
7204 YMM registers (ymm16-31 added by avx521 on x86_64).
7205 (num_avx512_xmm_registers): New constant for number of higher
7206 XMM registers (xmm16-31 added by AVX512 on x86_64).
7207 (struct i387_xsave): Add space for AVX512 registers.
7208 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7209 Add code to handle AVX512 registers.
7210 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7211 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7212 prototypei from generated file.
7213 (tdesc_amd64_avx512_linux): Likewise.
7214 (init_registers_x32_avx512_linux): Likewise.
7215 (tdesc_x32_avx512_linux): Likewise.
7216 (init_registers_i386_avx512_linux): Likewise.
7217 (tdesc_i386_avx512_linux): Likewise.
7218 (x86_64_regmap): Add AVX512 registers.
7219 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7220 mask.
7221 (initialize_low_arch): Add code to initialize AVX512 registers.
7222
51aa91f9
PA
72232014-04-23 Pedro Alves <palves@redhat.com>
7224
7225 * mem-break.c (find_gdb_breakpoint_at): Make static.
7226 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7227
a4165e94
PA
72282014-04-23 Pedro Alves <palves@redhat.com>
7229
7230 * i386-low.c: Don't include break-common.h here.
7231 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7232 prototype to take target_hw_bp_type as argument instead of a Z
7233 packet char.
7234 * i386-low.h: Include break-common.h here.
7235 (Z_packet_to_hw_type): Declare.
7236 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7237 prototypes.
7238 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7239 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7240 (x86_remove_point): Convert the packet number to a
7241 target_hw_bp_type before calling i386_low_remove_watchpoint.
7242 * win32-i386-low.c (i386_insert_point): Convert the packet number
7243 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7244 (i386_remove_point): Convert the packet number to a
7245 target_hw_bp_type before calling i386_low_remove_watchpoint.
7246
b8acf843
PA
72472014-04-23 Pedro Alves <palves@redhat.com>
7248
7249 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7250
d708bcd1
PA
72512014-04-10 Pedro Alves <palves@redhat.com>
7252
7253 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7254 Check if the condition or command is NULL before checking if the
7255 breakpoint is known. On success, return true.
7256 * mem-break.h (add_breakpoint_condition): Document return.
7257 (add_breakpoint_commands): Add describing comment.
7258 * server.c (skip_to_semicolon): New function.
7259 (process_point_options): Use it.
7260
2eec7d5b
PA
72612014-04-09 Pedro Alves <palves@redhat.com>
7262
7263 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7264 to lwpid_of.
7265
fa96cb38
PA
72662014-02-27 Pedro Alves <palves@redhat.com>
7267
7268 PR 12702
7269 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7270 macros.
7271 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7272 output.
7273 (last_thread_of_process_p): Take a PID argument instead of a
7274 thread pointer.
7275 (linux_wait_for_lwp): Delete.
7276 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7277 functions.
7278 (linux_low_filter_event): New function, party factored out from
7279 linux_wait_for_event.
7280 (linux_wait_for_event): Rename to ...
7281 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7282 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7283 sigsuspend. Check for zombie leaders.
7284 (linux_wait_for_event): Reimplement as wrapper around
7285 linux_wait_for_event_filtered.
7286 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7287 a normal or signal exit is seen, it's the whole process exiting.
7288 (wait_for_sigstop): No longer a for_each_inferior callback.
7289 Rewrite on top of linux_wait_for_event_filtered.
7290 (stop_all_lwps): Call wait_for_sigstop directly.
7291 * server.c (resume, handle_target_event): Handle
7292 TARGET_WAITKIND_NO_RESUMED.
7293
d763de10
JB
72942014-02-26 Joel Brobecker <brobecker@adacore.com>
7295
7296 * win32-low.c (psapi_get_dll_name,
7297 * win32_CreateToolhelp32Snapshot): Delete.
7298 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7299 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7300 Delete.
7301 (handle_load_dll): Add function description.
7302 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7303
850a0f76
JB
73042014-02-26 Joel Brobecker <brobecker@adacore.com>
7305
7306 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7307 Add comment.
7308 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7309 base address when calling win32_add_one_solib.
7310 (handle_load_dll): Delete local variable load_addr.
7311 Remove 0x1000 offset applied to DLL base address when calling
7312 win32_add_one_solib.
7313 (handle_unload_dll): Add comment.
7314
f25b3fc3
JB
73152014-02-26 Joel Brobecker <brobecker@adacore.com>
7316
7317 * win32-low.c (win32_add_all_dlls): Renames
7318 win32_ensure_ntdll_loaded. Rewrite function documentation.
7319 Adjust implementation to always load all DLLs.
7320 Add 0x1000 offset to DLL base address when calling
7321 win32_add_one_solib.
7322 (child_initialization_done): New static global.
7323 (do_initial_child_stuff): Set child_initialization_done to
7324 zero during child initialization, and 1 after. Replace call
7325 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7326 Add comment.
7327 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7328 (handle_unload_dll): Add function documentation.
7329 (get_child_debug_event): Ignore load and unload DLL events
7330 during child initialization.
7331
d86d4aaf
DE
73322014-02-20 Doug Evans <dje@google.com>
7333
3bc32da3 7334 Remove global all_lwps.
d86d4aaf
DE
7335 * inferiors.h (ptid_of): Move here from linux-low.h.
7336 (pid_of, lwpid_of): Ditto.
7337 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7338 parameter is a struct thread_info * now.
7339 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7340 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7341 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7342 directly.
7343 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7344 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7345 * linux-arm-low.c (update_registers_callback): Update, "entry"
7346 parameter is a struct thread_info * now.
7347 Fetch lwpid from current_inferior directly.
7348 (arm_insert_point): Pass &all_threads to find_inferior instead of
7349 &all_lwps.
7350 (arm_remove_point): Ditto.
7351 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7352 (arm_prepare_to_resume): Fetch pid from thread.
7353 (arm_read_description): Fetch lwpid from current_inferior directly.
7354 * linux-low.c (all_lwps): Delete.
7355 (delete_lwp): Delete call to remove_inferior.
7356 (handle_extended_wait): Fetch lwpid from thread.
7357 (add_lwp): Don't set lwp->entry.id. Remove call to
7358 add_inferior_to_list.
7359 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7360 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7361 (kill_one_lwp_callback): Ditto.
7362 (linux_kill): Don't dereference NULL pointer.
7363 Fetch ptid,lwpid from thread.
7364 (get_detach_signal): Fetch ptid from thread.
7365 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7366 Simplify call to regcache_invalidate_thread.
7367 (delete_lwp_callback): Update, "entry" parameter is a
7368 struct thread_info * now. Fetch pid from thread.
7369 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7370 (status_pending_p_callback): Update, "entry" parameter is a
7371 struct thread_info * now. Fetch ptid from thread.
7372 (find_lwp_pid): Update, "entry" parameter is a
7373 struct thread_info * now.
7374 (linux_wait_for_lwp): Fetch pid from thread.
7375 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7376 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7377 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7378 (dequeue_one_deferred_signal): Ditto.
7379 (cancel_breakpoint): Fetch ptid from current_inferior.
7380 (linux_wait_for_event): Pass &all_threads to find_inferior,
7381 not &all_lwps. Fetch ptid, lwpid from thread.
7382 (count_events_callback): Update, "entry" parameter is a
7383 struct thread_info * now.
7384 (select_singlestep_lwp_callback): Ditto.
7385 (select_event_lwp_callback): Ditto.
7386 (cancel_breakpoints_callback): Ditto.
7387 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7388 not &all_lwps.
7389 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7390 (unsuspend_one_lwp): Update, "entry" parameter is a
7391 struct thread_info * now.
7392 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7393 not &all_lwps.
7394 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7395 Fetch lwpid from thread, not lwp.
7396 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7397 Pass &all_threads to find_inferior, not &all_lwps.
7398 (send_sigstop): Fetch lwpid from thread, not lwp.
7399 (send_sigstop_callback): Update, "entry" parameter is a
7400 struct thread_info * now.
7401 (suspend_and_send_sigstop_callback): Ditto.
7402 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7403 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7404 struct thread_info * now.
7405 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7406 from thread, lwp.
7407 (lwp_running): Update, "entry" parameter is a
7408 struct thread_info * now.
7409 (stop_all_lwps): Fetch ptid from thread.
7410 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7411 (linux_resume_one_lwp): Fetch lwpid from thread.
7412 (linux_set_resume_request): Update, "entry" parameter is a
7413 struct thread_info * now. Fetch pid, lwpid from thread.
7414 (resume_status_pending_p): Update, "entry" parameter is a
7415 struct thread_info * now.
7416 (need_step_over_p): Ditto. Fetch lwpid from thread.
7417 (start_step_over): Fetch lwpid from thread.
7418 (linux_resume_one_thread): Update, "entry" parameter is a
7419 struct thread_info * now. Fetch lwpid from thread.
7420 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7421 (proceed_one_lwp): Update, "entry" parameter is a
7422 struct thread_info * now. Fetch lwpid from thread.
7423 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7424 struct thread_info * now.
7425 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7426 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7427 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7428 directly.
7429 (regsets_store_inferior_registers): Ditto.
7430 (fetch_register, store_register): Ditto.
7431 (linux_read_memory, linux_write_memory): Ditto.
7432 (linux_request_interrupt): Ditto.
7433 (linux_read_auxv): Ditto.
7434 (linux_xfer_siginfo): Ditto.
7435 (linux_qxfer_spu): Ditto.
7436 (linux_qxfer_libraries_svr4): Ditto.
7437 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7438 moved to inferiors.h.
7439 (get_lwp): Delete.
7440 (get_thread_lwp): Update.
7441 (struct lwp_info): Delete member "entry". Simplify comment for
7442 member "thread".
7443 (all_lwps): Delete.
7444 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7445 current_inferior directly.
7446 (update_watch_registers_callback): Update, "entry" parameter is a
7447 struct thread_info * now. Fetch pid from thread.
7448 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7449 (mips_insert_point): Fetch lwpid from current_inferior.
7450 Pass &all_threads to find_inferior, not &all_lwps.
7451 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7452 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7453 directly.
7454 (mips_stopped_data_address): Ditto.
7455 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7456 directly.
7457 * linux-tile-low.c (tile_arch_setup): Ditto.
7458 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7459 (update_debug_registers_callback): Update, "entry" parameter is a
7460 struct thread_info * now. Fetch pid from thread.
7461 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7462 Pass &all_threads to find_inferior, not &all_lwps.
7463 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7464 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7465 Pass &all_threads to find_inferior, not &all_lwps.
7466 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7467 (i386_dr_low_get_status): Ditto.
7468 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7469 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7470 (x86_linux_read_description): Ditto.
7471 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7472
3b8361aa
DE
74732014-02-20 Doug Evans <dje@google.com>
7474
7475 * inferiors.c (get_first_inferior): Fix buglet.
7476
f7667f0d
DE
74772014-02-19 Doug Evans <dje@google.com>
7478
7479 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7480 * inferiors.c (add_thread): Change result type to struct thread_info *.
7481 All callers updated.
7482 (add_lwp): Call add_thread here instead of in callers.
7483 All callers updated.
7484 * linux-low.h (get_lwp_thread): Rewrite.
7485 (struct lwp_info): New member "thread".
7486
b3312d80
DE
74872014-02-19 Doug Evans <dje@google.com>
7488
7489 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7490 All callers updated.
7491
ecc6f45c
DE
74922014-02-19 Doug Evans <dje@google.com>
7493
7494 * inferiors.c (add_thread): Fix whitespace.
7495
649ebbca
DE
74962014-02-19 Doug Evans <dje@google.com>
7497
7498 * dll.c (clear_dlls): Replace accessing list implemention details
7499 with API function.
7500 * gdbthread.h (get_first_thread): Declare.
7501 * inferiors.c (for_each_inferior_with_data): New function.
7502 (get_first_thread): New function.
7503 (find_thread_ptid): Simplify.
7504 (get_first_inferior): New function.
7505 (clear_list): Delete.
7506 (one_inferior_p): New function.
7507 (clear_inferior_list): New function.
7508 (clear_inferiors): Update.
7509 * inferiors.h (for_each_inferior_with_data): Declare.
7510 (clear_inferior_list): Declare.
7511 (one_inferior_p): Declare.
7512 (get_first_inferior): Declare.
7513 * linux-low.c (linux_wait_for_event): Replace accessing list
7514 implemention details with API function.
7515 * server.c (target_running): Ditto.
7516 (accumulate_file_name_length): New function.
7517 (emit_dll_description): New function.
7518 (handle_qxfer_libraries): Replace accessing list implemention
7519 details with API function.
7520 (handle_qxfer_threads_worker): New function.
7521 (handle_qxfer_threads_proper): Replace accessing list implemention
7522 details with API function.
7523 (handle_query): Ditto.
7524 (visit_actioned_threads_callback_ftype): New typedef.
7525 (visit_actioned_threads_data): New struct.
7526 (visit_actioned_threads): Rewrite to be find_inferior callback.
7527 (resume): Call find_inferior.
7528 (handle_status): Replace accessing list implemention
7529 details with API function.
7530 (process_serial_event): Replace accessing list implemention details
7531 with API function.
7532 * target.c (set_desired_inferior): Replace accessing list implemention
7533 details with API function.
7534 * tracepoint.c (same_process_p): New function.
7535 (gdb_agent_about_to_close): Replace accessing list implemention
7536 details with API function.
7537 * win32-low.c (child_delete_thread): Replace accessing list
7538 implemention details with API function.
7539 (match_dll_by_basename): New function.
7540 (dll_is_loaded_by_basename): New function.
7541 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7542 details call to dll_is_loaded_by_basename.
7543
80894984
DE
75442014-02-19 Doug Evans <dje@google.com>
7545
7546 * dll.h (struct dll_info): Add comment.
7547 * gdbthread.h (struct thread_info): Add comment.
7548 (current_ptid): Simplify.
7549 * inferiors.c (add_process): Update.
7550 (remove_process): Update.
7551 * inferiors.h (struct process_info): Rename member "head" to "entry".
7552 * linux-low.c (delete_lwp): Update.
7553 (add_lwp): Update.
7554 (last_thread_of_process_p): Update.
7555 (kill_one_lwp_callback, linux_kill): Update.
7556 (status_pending_p_callback): Update.
7557 (wait_for_sigstop): Update. Simplify read of ptid.
7558 (start_step_over): Update.
7559 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7560 (get_lwp_thread): Update.
7561 (struct lwp_info): Rename member "head" to "entry".
7562 * regcache.h (inferior_list_entry): Delete.
7563 * server.c (kill_inferior_callback): Update.
7564 (detach_or_kill_inferior_callback): Update.
7565 (print_started_pid): Update.
7566 (print_attached_pid): Update.
7567 (process_serial_event): Simplify read of ptid.
7568 * thread-db.c (thread_db_create_event): Update.
7569 (thread_db_get_tls_address): Update.
7570 * win32-low.c (current_inferior_ptid): Simplify.
7571
46917d26
TT
75722014-02-19 Tom Tromey <tromey@redhat.com>
7573
7574 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7575 argument.
7576 (target_supports_btrace): Update.
7577
0759a81e
YQ
75782014-02-14 Yao Qi <yao@codesourcery.com>
7579
7580 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7581 (rsp-low-ipa.o): New target.
7582
a7191e8b
TT
75832014-02-12 Tom Tromey <tromey@redhat.com>
7584
7585 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7586 convert_ascii_to_int.
7587 * regcache.c (registers_to_string): Likewise.
7588 * remote-utils.c (decode_M_packet): Likewise.
7589 * server.c (process_serial_event): Likewise.
7590
ff0e980e
TT
75912014-02-12 Tom Tromey <tromey@redhat.com>
7592
7593 * server.c (handle_query, handle_v_run): Use hex2bin, not
7594 unhexify.
7595 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7596
e9371aff
TT
75972014-02-12 Tom Tromey <tromey@redhat.com>
7598
7599 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7600 convert_int_to_ascii.
7601 * regcache.c (registers_to_string, collect_register_as_string):
7602 Likewise.
7603 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7604 Likewise.
7605 * server.c (process_serial_event): Likewise.
7606 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7607 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7608
971dc0b8
TT
76092014-02-12 Tom Tromey <tromey@redhat.com>
7610
7611 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7612 bin2hex, not hexify.
7613 * tracepoint.c (cmd_qtstatus): Likewise.
7614
0a822afb
TT
76152014-02-12 Tom Tromey <tromey@redhat.com>
7616
7617 * remote-utils.c (monitor_output): Pass explicit length to
7618 hexify.
7619
9c3d6531
TT
76202014-02-12 Tom Tromey <tromey@redhat.com>
7621
7622 * tracepoint.c: Include rsp-low.h.
7623 * server.c: Include rsp-low.h.
7624 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7625 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7626 declare.
7627 * remote-utils.c: Include rsp-low.h.
7628 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7629 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7630 (convert_int_to_ascii, convert_ascii_to_int): Move to
7631 common/rsp-low.c.
7632 * regcache.c: Include rsp-low.h.
7633 * ax.c: Include rsp-low.h.
7634 * Makefile.in (SFILES): Add common/rsp-low.c.
7635 (OBS): Add rsp-low.o.
7636 (rsp-low.o): New target.
7637
01fd3ea5
TT
76382014-02-12 Tom Tromey <tromey@redhat.com>
7639
7640 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7641 Include print-utils.h.
7642 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7643 (plongest, thirty_two, phex_nz): Remove.
7644 * Makefile.in (SFILES): Add common/print-utils.c.
7645 (OBS): Add print-utils.o.
7646 (print-utils-ipa.o): New target.
7647 (print-utils.o): New target.
7648 (IPA_OBJS): Add print-utils-ipa.o.
7649
e99dc820
TT
76502014-02-06 Tom Tromey <tromey@redhat.com>
7651
7652 * Makefile.in (SFILES): Fix indentation.
7653
ee1e2d4f
DE
76542014-02-05 Doug Evans <dje@google.com>
7655
7656 * linux-low.c (linux_wait_for_event): Improve comment.
7657 (linux_wait_1): Keep current_inferior in sync with event_child.
7658
f5a02773
DE
76592014-01-22 Doug Evans <dje@google.com>
7660
7661 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7662
87ce2a04
DE
76632014-01-22 Doug Evans <dje@google.com>
7664
7665 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7666 * configure: Regenerate.
7667 * config.in: Regenerate.
7668 * Makefile.in (SFILES): Add debug.c.
7669 (OBS): Add debug.o.
7670 * debug.c: New file.
7671 * debug.h: New file.
7672 * linux-aarch64-low.c (*): Update all debugging printfs to use
7673 debug_printf instead of fprintf.
7674 * linux-arm-low.c (*): Ditto.
7675 * linux-cris-low.c (*): Ditto.
7676 * linux-crisv32-low.c (*): Ditto.
7677 * linux-m32r-low.c (*): Ditto.
7678 * linux-sparc-low.c (*): Ditto.
7679 * linux-x86.c (*): Ditto.
7680 * linux-low.c (*): Ditto.
7681 (linux_wait_1): Add calls to debug_enter, debug_exit.
7682 (linux_wait): Remove redundant debugging printf.
7683 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7684 (linux_resume, unstop_all_lwps): Ditto.
7685 * mem-break.c (*): Update all debugging printfs to use
7686 debug_printf instead of fprintf.
7687 * remote-utils.c (*): Ditto.
7688 * thread-db.c (*): Ditto.
7689 * server.c #include <ctype.h>, "gdb_vecs.h".
7690 (debug_threads): Moved to debug.c.
7691 (*): Update all debugging printfs to use debug_printf instead of
7692 fprintf.
7693 (start_inferior): Replace call to fflush with call to debug_flush.
7694 (monitor_show_help): Mention set debug-format.
7695 (parse_debug_format_options): New function.
7696 (handle_monitor_command): Handle "monitor set debug-format".
7697 (gdbserver_usage): Mention --debug-format.
7698 (main): Parse --debug-format.
7699 * server.h (debug_threads): Declaration moved to debug.h.
7700 #include "debug.h".
7701 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7702 trace_debug_1 that uses debug_printf.
7703 (tracepoint_look_up_symbols): Update all debugging printfs to use
7704 debug_printf instead of fprintf.
7705
e671835b
BS
77062014-01-20 Baruch Siach <baruch@tkos.co.il>
7707
7708 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7709 sys/ptrace.h.
7710
b5737fa9
PA
77112014-01-17 Pedro Alves <palves@redhat.com>
7712
ea38d2a9 7713 PR build/16445
c7faa97a
PA
7714 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7715 defined after including gdb_proc_service.h.
b5737fa9 7716
40ed484e
DE
77172014-01-16 Doug Evans <dje@google.com>
7718
7719 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7720 (match_dll): Use it.
7721
969c39fb
MM
77222014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7723
7724 * target.h (target_ops) <read_btrace>: Change parameters and
7725 return type to allow error reporting.
7726 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7727 trace reading errors on.
7728 * linux-low.c (linux_low_read_btrace): Pass trace reading
7729 errors on.
7730 (linux_low_disable_btrace): New.
7731
ab7f45ba
DE
77322014-01-15 Doug Evans <dje@google.com>
7733
7734 * inferiors.c (thread_id_to_gdb_id): Delete.
7735 * inferiors.h (thread_id_to_gdb_id): Delete.
7736
66af0f44
EZ
77372014-01-13 Eli Zaretskii <eliz@gnu.org>
7738
7739 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7740 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7741 versions.
7742
9939e131
PA
77432014-01-08 Pedro Alves <palves@redhat.com>
7744
7745 * server.c (handle_status): Don't discard previous queued stop
7746 replies or thread's pending status here.
7747 (main) <disconnection>: Do it here instead.
7748
b7ea362b
PA
77492014-01-08 Pedro Alves <palves@redhat.com>
7750
7751 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7752 * server.c (visit_actioned_threads, handle_pending_status): New
7753 function.
7754 (handle_v_cont): Factor out parts to ...
7755 (resume): ... this new function. If in all-stop, and a thread
7756 being resumed has a pending status, report it without actually
7757 resuming.
7758 (myresume): Adjust to use the new 'resume' function.
7759 (clear_pending_status_callback, set_pending_status_callback)
7760 (find_status_pending_thread_callback): New functions.
7761 (handle_status): Handle the case of multiple threads having
7762 interesting statuses to report. Report threads' real last signal
7763 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7764 with an interesting thread to report the status for, instead of
7765 always reporting the status of the first thread.
7766
28498c42
JB
77672014-01-01 Joel Brobecker <brobecker@adacore.com>
7768
7769 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7770 * gdbreplay.c (gdbreplay_version): Likewise.
7771
f45c82da
YZ
77722013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7773
7774 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7775 iov.iov_len with the real length in use.
7776
379a5e2d
JB
77772013-12-13 Joel Brobecker <brobecker@adacore.com>
7778
7779 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7780 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7781 for all targets that use win32-low.c.
7782 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7783 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7784
4210d83e
PA
77852013-12-13 Pedro Alves <palves@redhat.com>
7786
7787 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7788 if equal to TARGET_WAITKIND_LOADED.
7789 * win32-low.c (cached_status): New static global.
7790 (win32_wait): Add declaration.
7791 (do_initial_child_stuff): Flush all initial pending debug events
7792 up to the initial breakpoint.
7793 (win32_wait): If CACHED_STATUS was set, return that instead
7794 of doing a real wait. Remove the code resuming the execution
7795 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7796 during the initial phase. Also remove the code changing
7797 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7798 TARGET_WAITKIND_STOPPED.
7799
e7f0d979
YQ
78002013-12-11 Yao Qi <yao@codesourcery.com>
7801
7802 * notif.c (handle_notif_ack): Return 0 if no notification
7803 matches.
7804
ebcf782c
DE
78052013-11-20 Doug Evans <dje@google.com>
7806
7807 * linux-low.c (linux_set_resume_request): Fix comment.
7808
20ad9378
DE
78092013-11-20 Doug Evans <dje@google.com>
7810
7811 * linux-low.c (resume_status_pending_p): Tweak comment.
7812
a196ebeb
WT
78132013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7814
7815 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7816 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7817 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7818 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7819 (srv_amd64_regobj): Add amd64-mpx.o.
7820 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7821 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7822 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7823 * i387-fp.c (num_pl_bnd_register) Added constant.
7824 (num_pl_bnd_cfg_registers) Added constant.
7825 (struct i387_xsave) Added reserved area and MPX fields.
7826 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7827 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7828 function.
7829 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7830 (init_registers_amd64_mpx_linux): Declare new function.
7831 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7832 (x86_64_regmap): Add MPX registers.
7833 (x86_linux_read_description): Add MPX case.
7834 (initialize_low_arch): Initialize MPX targets.
7835
0080a2f6
TT
78362013-11-18 Tom Tromey <tromey@redhat.com>
7837
7838 * configure: Rebuild.
7839 * configure.ac: Don't check for stdlib.h.
7840 * gdbreplay.c: Unconditionally include stdlib.h.
7841
2978b111
TT
78422013-11-18 Tom Tromey <tromey@redhat.com>
7843
7844 * config.in: Rebuild.
7845 * configure: Rebuild.
7846 * configure.ac: Don't use AC_HEADER_DIRENT.
7847
a3d08894
TT
78482013-11-18 Tom Tromey <tromey@redhat.com>
7849
7850 * server.h: Don't check HAVE_STRING_H.
7851 * gdbreplay.c: Don't check HAVE_STRING_H.
7852 * configure: Rebuild.
7853
0a5dd17d
TT
78542013-11-18 Tom Tromey <tromey@redhat.com>
7855
7856 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7857 LIBGNU.
7858
1bd2f0ba
TT
78592013-11-08 Tom Tromey <tromey@redhat.com>
7860
7861 * configure, config.in: Rebuild.
7862 * configure.ac: Remove unused configury.
7863
3266f10b
TT
78642013-11-08 Tom Tromey <tromey@redhat.com>
7865
7866 * acinclude.m4: Include common.m4, codeset.m4.
7867 * configure, config.in: Rebuild.
7868 * configure.ac: Use GDB_AC_COMMON.
7869
6682d959
AA
78702013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7871
7872 * linux-s390-low.c (HWCAP_S390_TE): New define.
7873 (s390_arch_setup): Consider the TE field in the HWCAP for
7874 determining 'have_regset_tdb'.
7875
fd0a4d76
SDJ
78762013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7877
7878 PR gdb/16014
7879 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7880 call to sizeof.
7881
1a3d890b
PA
78822013-10-02 Pedro Alves <palves@redhat.com>
7883
7884 * server.c (process_serial_event): Don't output "GDBserver
7885 exiting" if GDB is connected through stdio.
7886 * target.c (mywait): Likewise, be silent if GDB is connected
7887 through stdio.
7888
97ad4581
JB
78892013-10-01 Joel Brobecker <brobecker@adacore.com>
7890
7891 * lynx-low.c (lynx_add_threads_after_attach): New function.
7892 (lynx_attach): Remove call to add_thread. Add call to
7893 lynx_add_threads_after_attach instead.
7894
5b4e221c
MF
78952013-09-28 Mike Frysinger <vapier@gentoo.org>
7896
7897 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7898 * config.in, configure: Regenerated.
7899
ee47b2f8
YQ
79002013-09-18 Yao Qi <yao@codesourcery.com>
7901
7902 PR server/15959
7903 * server.c (start_inferior): Clear 'resume_info'.
7904
d6707650 79052013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7906
d6707650
JW
7907 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7908 for each register.
7909
9243dd0e 79102013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7911
9243dd0e
JW
7912 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7913 linux-tile-low.o to srv_tgtobj.
7914
c623a6ef
WN
79152013-09-16 Will Newton <will.newton@linaro.org>
7916
7917 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7918 out regs.
7919
fb71d39e
PA
79202013-09-06 Pedro Alves <palves@redhat.com>
7921
7922 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7923 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7924 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7925 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7926 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7927 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7928
8e7e9910
PA
79292013-09-06 Pedro Alves <palves@redhat.com>
7930
7931 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7932 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7933
7c3a12ca
PA
79342013-09-06 Pedro Alves <palves@redhat.com>
7935
7936 * linux-amd64-ipa.c: Include tracepoint.h.
7937 * linux-i386-ipa.c: Include tracepoint.h.
7938
8eb3d7b6
RW
79392013-09-06 Ricard Wanderlof <ricardw@axis.com>
7940
7941 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7942 (ps_get_thread_area): New function.
7943
eddddb9d
RW
79442013-09-06 Ricard Wanderlof <ricardw@axis.com>
7945
7946 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7947 (initialize_low_arch): Call init_registers_crisv32 rather than
7948 init_register_crisv32.
7949
533b0600
PA
79502013-09-05 Pedro Alves <palves@redhat.com>
7951
7952 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7953 to ...
7954 * hostio.h: ... this new file.
7955 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7956 win32-low.c: Include hostio.h.
7957
0ce3d3b5
PA
79582013-09-05 Pedro Alves <palves@redhat.com>
7959
7960 * server.h (gdb_client_data, handler_func, callback_handler_func)
7961 (delete_file_handler, add_file_handler, append_callback_event)
7962 (delete_callback_event, start_event_loop, initialize_event_loop):
7963 Move to event-loop.h and include it.
7964 * event-loop.h: New file.
7965
799cdc37
PA
79662013-09-05 Pedro Alves <palves@redhat.com>
7967
7968 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7969 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7970 (loaded_dll, unloaded_dll): Move to ...
7971 * dll.h: ... this new file.
7972 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7973
6a6bbd9d
PA
79742013-09-05 Pedro Alves <palves@redhat.com>
7975
7976 * server.h (current_process, get_thread_process, all_processes)
7977 (add_inferior_to_list, for_each_inferior, current_inferior)
7978 (remove_inferior, add_process, remove_process, find_process_pid)
7979 (have_started_inferiors_p, have_attached_inferiors_p)
7980 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7981 (clear_inferiors, find_inferior, find_inferior_id)
7982 (inferior_target_data, set_inferior_target_data)
7983 (inferior_regcache_data, set_inferior_regcache_data): Move to
7984 inferiors.h, and include it.
7985 * inferiors.h: New file.
7986
f699aaba
PA
79872013-09-05 Pedro Alves <palves@redhat.com>
7988
7989 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7990 Move ...
72f4393d 7991 * ax.h: ... here.
f699aaba 7992
c144c7a0
PA
79932013-09-05 Pedro Alves <palves@redhat.com>
7994
7995 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7996 tracepoint.h.
7997 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7998 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7999 (handle_tracepoint_general_set, handle_tracepoint_query)
8000 (tracepoint_finished_step, tracepoint_was_hit)
8001 (release_while_stepping_state_list, current_traceframe)
8002 (in_readonly_region, traceframe_read_mem)
8003 (fetch_traceframe_registers, traceframe_read_sdata)
8004 (traceframe_read_info, struct fast_tpoint_collect_status)
8005 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8006 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8007 (supply_fast_tracepoint_registers)
8008 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8009 (ipa_tdesc, claim_trampoline_space)
8010 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8011 (agent_mem_read, agent_get_trace_state_variable_value)
8012 (agent_set_trace_state_variable_value, agent_tsv_read)
8013 (agent_mem_read_string, get_raw_reg_func_addr)
8014 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8015 * tracepoint.h: ... this new file.
8016
ff42e6ab
PA
80172013-09-05 Pedro Alves <palves@redhat.com>
8018
8019 * server.h (perror_with_name, error, fatal, warning, paddress)
8020 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8021 include it.
8022 * utils.h: New file.
8023
541af0f4
PA
80242013-09-05 Pedro Alves <palves@redhat.com>
8025
8026 * server.h (remote_debug, noack_mode, transport_is_reliable)
8027 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8028 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8029 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8030 (write_enn, initialize_async_io, enable_async_io)
8031 (disable_async_io, check_remote_input_interrupt_request)
8032 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8033 (dead_thread_notify, prepare_resume_reply)
8034 (decode_address_to_semicolon, decode_address, decode_m_packet)
8035 (decode_M_packet, decode_X_packet, decode_xfer_write)
8036 (decode_search_memory_packet, unhexify, hexify)
8037 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8038 (look_up_one_symbol, relocate_instruction)
8039 (monitor_output): Move to remote-utils.h, and include it.
8040 * remote-utils.h: New file.
8041
eebdf26b
PA
80422013-09-05 Pedro Alves <palves@redhat.com>
8043
8044 * server.h (_): Delete.
8045
3aafd2ff
PA
80462013-09-02 Pedro Alves <palves@redhat.com>
8047
8048 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8049 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8050 allocated.
8051 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8052
cee83bcb
PM
80532013-09-02 Pierre Muller <muller@sourceware.org>
8054
8055 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8056 or WriteProcessMemory complete successfully and handle
8057 ERROR_PARTIAL_COPY error.
8058
9a13b2fa
PA
80592013-09-02 Pedro Alves <palves@redhat.com>
8060
8061 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8062 error instead of EIO.
8063
602e3198
JK
80642013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8065
8066 PR server/15604
8067 * linux-low.c: Include filestuff.h.
8068 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8069 * lynx-low.c: Include filestuff.h.
8070 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8071 * server.c: Include filestuff.h.
8072 (main): Call notice_open_fds.
8073 * spu-low.c: Include filestuff.h.
8074 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8075
96d7229d
LM
80762013-08-22 Luis Machado <lgustavo@codesourcery.com>
8077
8078 * Makefile.in: Explain why ../target and ../nat are not
8079 listed as include file search paths.
8080 (linux-waitpid.o): New object file rule.
8081 * configure.srv (srv_native_linux_obj): New variable.
8082 Replace all occurrences of linux native object files with
8083 $srv_native_linux_obj.
8084 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8085 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8086 (linux_enable_event_reporting): Remove declaration.
8087 (my_waitpid): Moved to common/linux-waitpid.c.
8088 (linux_wait_for_event): Pass ptid when calling
8089 linux_enable_event_reporting.
8090 (linux_supports_tracefork_flag): Remove.
8091 (linux_enable_event_reporting): Likewise.
8092 (linux_tracefork_grandchild): Remove.
8093 (STACK_SIZE): Moved to common/linux-ptrace.c.
8094 (linux_tracefork_child): Remove.
8095 (linux_test_for_tracefork): Remove.
8096 (linux_look_up_symbols): Call linux_supports_traceclone.
8097 (initialize_low): Remove call to linux_test_for_tracefork.
8098 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8099 common/linux-ptrace.h.
8100 (PTRACE_TYPE_ARG4): Likewise.
8101 Include linux-ptrace.h.
8102
32940073
PA
81032013-08-21 Pedro Alves <palves@redhat.com>
8104
8105 * config.in: Renegerate.
8106
33b60d58 81072013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8108
33b60d58
LM
8109 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8110 (SFILES): Remove $(srcdir)/common/target-common.c and
8111 add $(srcdir)/target/waitstatus.c.
8112 (OBS): Remove target-common.o and add waitstatus.o.
8113 (server_h): Remove $(srcdir)/../common/target-common.h and
8114 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8115 and $(srcdir)/../target/waitstatus.h.
8116 (target-common.o): Remove.
8117 (waitstatus.o): New target object file.
8118 * target.h: Do not include target-common.h and
8119 include target/resume.h, target/wait.h and
8120 target/waitstatus.h.
8121
b8e1b30e
LM
81222013-08-13 Luis Machado <lgustavo@codesourcery.com>
8123
8124 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8125 to PTRACE_TYPE_ARG3.
8126 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8127 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8128 PTRACE_TYPE_ARG4.
8129 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8130 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8131
7a60ad40
YQ
81322013-07-27 Jie Zhang <jie@codesourcery.com>
8133 Daniel Jacobowitz <dan@codesourcery.com>
8134 Yao Qi <yao@codesourcery.com>
8135
8136 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8137 (mips-linux-watch.o): New rule.
8138 (mips_linux_watch_h): New variable.
8139 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8140 srv_tgtobj.
8141 * linux-mips-low.c: Include mips-linux-watch.h.
8142 (struct arch_process_info, struct arch_lwp_info): New.
8143 (update_watch_registers_callback): New function.
8144 (mips_linux_new_process, mips_linux_new_thread) New functions.
8145 (mips_linux_prepare_to_resume, mips_insert_point): New
8146 functions.
8147 (mips_remove_point, mips_stopped_by_watchpoint): New
8148 functions.
8149 (rsp_bp_type_to_target_hw_bp_type): New function.
8150 (mips_stopped_data_address): New function.
8151 (the_low_target): Add watchpoint support functions.
8152
de6f69ad
YQ
81532013-07-27 Yao Qi <yao@codesourcery.com>
8154
8155 * i386-low.c: Include break-common.h.
8156 (enum target_hw_bp_type): Remove.
8157
3360c0bf
LM
81582013-07-24 Luis Machado <lgustavo@codesourcery.com>
8159
8160 * Makefile.in (SFILES): /common/target-common.c.
8161 (OBS): Add target-common.o.
8162 (server_h): Add $(srcdir)/../common/target-common.h.
8163 (target-common.o): New target.
8164 * server.c (queue_stop_reply_callback): Free
8165 status string after use.
8166 * target.c (target_waitstatus_to_string): Remove.
8167 * target.h: Include target-common.h.
8168 (resume_kind): Likewise.
8169 (target_waitkind): Likewise.
8170 (target_waitstatus): Likewise.
8171 (TARGET_WNOHANG): Likewise.
8172
bd885420
YQ
81732013-07-04 Yao Qi <yao@codesourcery.com>
8174
8175 * Makefile.in (host_alias): Use @host_noncanonical@.
8176 (target_alias): Use @target_noncanonical@.
8177 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8178 ACX_NONCANONICAL_HOST.
8179 * configure: Regenerated.
8180
8181 Revert:
8182 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8183
8184 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8185 * configure: Rebuild.
8186 * Makefile.in (version_host, version_target): Get from configure.
8187 (version.c): Use $(version_host) and $(version_target).
8188
17ef446e
PA
81892013-07-03 Pedro Alves <palves@redhat.com>
8190
8191 * Makefile.in (config.status): Depend on development.sh.
8192 * acinclude.m4: Include libmcheck.m4.
8193 * configure: Regenerate.
8194
7a9a7487
MG
81952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8196
8197 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8198 attribute inside the parentheses.
8199 (winapi_DebugSetProcessKillOnExit): Ditto.
8200 (winapi_DebugBreakProcess): Ditto.
8201 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8202
49b64de6
MG
82032013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8204
8205 * notif.h (notif_event): Add a dummy member to avoid compiler
8206 errors.
8207
d5749ee7
PA
82082013-07-01 Pedro Alves <palves@redhat.com>
8209
8210 * hostio.c (HOSTIO_PATH_MAX): Define.
8211 (require_filename, handle_open, handle_unlink, handle_readlink):
8212 Use it.
8213
d8d2a3ee
PA
82142013-07-01 Pedro Alves <palves@redhat.com>
8215
8216 * server.h: Include "pathmax.h".
8217 * linux-low.c: Don't include sys/param.h.
8218 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8219 MAXPATHLEN.
8220 * win32-low.c: Don't include sys/param.h.
8221 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8222
bc7dea8d
PA
82232013-07-01 Pedro Alves <palves@redhat.com>
8224
8225 * event-loop.c: Don't check HAVE_UNISTD_H before including
8226 <unistd.h>.
8227 * gdbreplay.c: Likewise.
8228 * remote-utils.c: Likewise.
8229 * server.c: Likewise.
8230 * configure.ac: Don't check for unistd.h.
8231 * configure: Regenerate.
8232
d6c2da54
TT
82332013-06-28 Tom Tromey <tromey@redhat.com>
8234
8235 * Makefile.in (version.c): Use version.in, not
8236 common/version.in.
8237
257b6bec
MG
82382013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8239
8240 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8241 * configure: Rebuild.
8242 * Makefile.in (version_host, version_target): Get from configure.
8243 (version.c): Use $(version_host) and $(version_target).
8244
86ebe149
DK
82452013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8246
8247 Fix trace-status to output user name without trailing colon.
8248 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8249
f30aa5af
DK
82502013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8251
8252 Fix trace-status to output proper start-time and stop-time.
8253 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8254 output start time and stop time in hex as gdb expects.
8255
28a93511
YQ
82562013-06-26 Pedro Alves <pedro@codesourcery.com>
8257
8258 * tracepoint.c (build_traceframe_info_xml): Output trace state
8259 variables present in the trace buffer.
8260
01208463
TT
82612013-06-24 Tom Tromey <tromey@redhat.com>
8262
8263 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8264 create-version.sh.
8265 (version.o): Remove.
8266 * gdbreplay.c: Include version.h.
8267 (version, host_name): Don't declare.
8268 * server.h: Include version.h.
8269 (version, host_name): Don't declare.
8270
760256f9
PA
82712013-06-12 Pedro Alves <palves@redhat.com>
8272
8273 * linux-x86-low.c (linux_is_elf64): Delete global.
8274 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8275 with local linux_pid_exe_is_elf_64_file use.
8276
030031ee
PA
82772013-06-11 Pedro Alves <palves@redhat.com>
8278
8279 * linux-low.c (regset_disabled, disable_regset): New functions.
8280 (regsets_fetch_inferior_registers)
8281 (regsets_store_inferior_registers): Use them.
8282 (initialize_regsets_info); Don't allocate the disabled_regsets
8283 array here.
8284 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8285 comment.
8286
5da6eb0a
PA
82872013-06-11 Pedro Alves <palves@redhat.com>
8288
8289 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8290 xmalloc.
8291
7e5aaa09
PA
82922013-06-11 Pedro Alves <palves@redhat.com>
8293
8294 * linux-x86-low.c (initialize_low_arch): Call
8295 init_registers_x32_avx_linux.
8296
d878444c
JK
82972013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8298
8299 Fix compatibility with Android Bionic.
8300 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8301 it is not empty.
8302
3aee8918
PA
83032013-06-07 Pedro Alves <palves@redhat.com>
8304
5f2b57b5 8305 PR server/14823
3aee8918
PA
8306 * Makefile.in (OBS): Add tdesc.o.
8307 (IPA_OBJS): Add tdesc-ipa.o.
8308 (tdesc-ipa.o): New rule.
8309 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8310 interface.
8311 * linux-low.c (new_inferior): Delete.
8312 (disabled_regsets, num_regsets): Delete.
8313 (linux_add_process): Adjust to set the new per-process
8314 new_inferior flag.
8315 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8316 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8317 was a stop. When calling arch_setup, switch the current inferior
8318 to the thread that got an event.
8319 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8320 (regsets_fetch_inferior_registers)
8321 (regsets_store_inferior_registers): New regsets_info parameter.
8322 Adjust to use it.
8323 (linux_register_in_regsets): New regs_info parameter. Adjust to
8324 use it.
8325 (register_addr, fetch_register, store_register): New usrregs_info
8326 parameter. Adjust to use it.
8327 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8328 parameter regs_info. Adjust to use it.
8329 (linux_fetch_registers): Get the current inferior's regs_info, and
8330 adjust to use it.
8331 (linux_store_registers): Ditto.
8332 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8333 (initialize_low): Don't initialize the target_regsets here. Call
8334 initialize_low_arch.
8335 * linux-low.h (target_regsets): Delete declaration.
8336 (struct regsets_info): New.
8337 (struct usrregs_info): New.
8338 (struct regs_info): New.
8339 (struct process_info_private) <new_inferior>: New field.
8340 (struct linux_target_ops): Delete the num_regs, regmap, and
8341 regset_bitmap fields. New field regs_info.
8342 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8343 * i387-fp.c (num_xmm_registers): Delete.
8344 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8345 calls to new interface.
8346 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8347 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8348 Infer the number of xmm registers from the regcache's target
8349 description.
8350 * i387-fp.h (num_xmm_registers): Delete.
8351 * inferiors.c (add_thread): Don't install the thread's regcache
8352 here.
8353 * proc-service.c (gregset_info): Fetch the current inferior's
8354 regs_info. Adjust to use it.
8355 * regcache.c: Include tdesc.h.
8356 (register_bytes, reg_defs, num_registers)
8357 (gdbserver_expedite_regs): Delete.
8358 (get_thread_regcache): If the thread doesn't have a regcache yet,
8359 create one, instead of aborting gdbserver.
8360 (regcache_invalidate_one): Rename to ...
8361 (regcache_invalidate_thread): ... this.
8362 (regcache_invalidate_one): New.
8363 (regcache_invalidate): Only invalidate registers of the current
8364 process.
8365 (init_register_cache): Add target_desc parameter, and use it.
8366 (new_register_cache): Ditto. Assert the target description has a
8367 non zero registers_size.
8368 (regcache_cpy): Add assertions. Adjust.
8369 (realloc_register_cache, set_register_cache): Delete.
8370 (registers_to_string, registers_from_string): Adjust.
8371 (find_register_by_name, find_regno, find_register_by_number)
8372 (register_cache_size): Add target_desc parameter, and use it.
8373 (free_register_cache_thread, free_register_cache_thread_one)
8374 (regcache_release, register_cache_size): New.
8375 (register_size): Add target_desc parameter, and use it.
8376 (register_data, supply_register, supply_register_zeroed)
8377 (supply_regblock, supply_register_by_name, collect_register)
8378 (collect_register_as_string, collect_register_by_name): Adjust.
8379 * regcache.h (struct target_desc): Forward declare.
8380 (struct regcache) <tdesc>: New field.
8381 (init_register_cache, new_register_cache): Add target_desc
8382 parameter.
8383 (regcache_invalidate_thread): Declare.
8384 (regcache_invalidate_one): Delete declaration.
8385 (regcache_release): Declare.
8386 (find_register_by_number, register_cache_size, register_size)
8387 (find_regno): Add target_desc parameter.
8388 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8389 declarations.
8390 * remote-utils.c: Include tdesc.h.
8391 (outreg, prepare_resume_reply): Adjust.
8392 * server.c: Include tdesc.h.
8393 (gdbserver_xmltarget): Delete declaration.
8394 (get_features_xml, process_serial_event): Adjust.
8395 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8396 declare.
8397 (struct process_info) <tdesc>: New field.
8398 (ipa_tdesc): Declare.
8399 * tdesc.c: New file.
8400 * tdesc.h: New file.
8401 * tracepoint.c: Include tdesc.h.
8402 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8403 (get_context_regcache): Adjust to pass ipa_tdesc down.
8404 (do_action_at_tracepoint): Adjust to get the register cache size
8405 from the context regcache's description.
8406 (traceframe_walk_blocks): Adjust to get the register cache size
8407 from the current trace frame's description.
8408 (traceframe_get_pc): Adjust to get current trace frame's
8409 description and pass it down.
8410 (gdb_collect): Adjust to get the register cache size from the
8411 IPA's description.
8412 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8413 (gdbserver_xmltarget): Delete.
8414 (initialize_low_tracepoint): Set the ipa's target description.
8415 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8416 (initialize_low_tracepoint): Set the ipa's target description.
8417 * linux-x86-low.c: Include tdesc.h.
8418 [__x86_64__] (is_64bit_tdesc): New.
8419 (ps_get_thread_area, x86_get_thread_area): Use it.
8420 (i386_cannot_store_register): Rename to ...
8421 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8422 (i386_cannot_fetch_register): Rename to ...
8423 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8424 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8425 to new interface.
8426 (target_regsets): Rename to ...
8427 (x86_regsets): ... this.
8428 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8429 interface.
8430 (x86_siginfo_fixup): Use is_64bit_tdesc.
8431 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8432 (tdesc_x32_avx_linux, tdesc_x32_linux)
8433 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8434 Declare.
8435 (x86_linux_update_xmltarget): Delete.
8436 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8437 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8438 (AMD64_LINUX_USER64_CS): New.
8439 (x86_linux_read_description): New, based on
8440 x86_linux_update_xmltarget.
8441 (same_process_callback): New.
8442 (x86_arch_setup_process_callback): New.
8443 (x86_linux_update_xmltarget): New.
8444 (x86_regsets_info): New.
8445 (amd64_linux_regs_info): New.
8446 (i386_linux_usrregs_info): New.
8447 (i386_linux_regs_info): New.
8448 (x86_linux_regs_info): New.
8449 (x86_arch_setup): Reimplement.
8450 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8451 (x86_emit_ops): Ditto.
8452 (the_low_target): Adjust. Install x86_linux_regs_info,
8453 x86_cannot_fetch_register, and x86_cannot_store_register.
8454 (initialize_low_arch): New.
8455 * linux-ia64-low.c (tdesc_ia64): Declare.
8456 (ia64_fetch_register): Adjust.
8457 (ia64_usrregs_info, regs_info): New globals.
8458 (ia64_regs_info): New function.
8459 (the_low_target): Adjust.
8460 (initialize_low_arch): New function.
8461 * linux-sparc-low.c (tdesc_sparc64): Declare.
8462 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8463 Adjust.
8464 (sparc_arch_setup): New function.
8465 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8466 (the_low_target): Adjust.
8467 (initialize_low_arch): New function.
8468 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8469 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8470 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8471 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8472 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8473 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8474 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8475 (tdesc_powerpc_isa205_vsx64l): Declare.
8476 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8477 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8478 (ppc_set_pc, ppc_get_hwcap): Adjust.
8479 (ppc_usrregs_info): Forward declare.
8480 (!__powerpc64__) ppc_regmap_adjusted: New global.
8481 (ppc_arch_setup): Adjust to the current process'es target
8482 description.
8483 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8484 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8485 (ppc_store_evrregset): Adjust.
8486 (target_regsets): Rename to ...
8487 (ppc_regsets): ... this, and make static.
8488 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8489 (ppc_regs_info): New function.
8490 (the_low_target): Adjust.
8491 (initialize_low_arch): New function.
8492 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8493 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8494 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8495 (tdesc_s390x_linux64v2): Declare.
8496 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8497 (s390_fill_gregset, s390_store_last_break): Adjust.
8498 (target_regsets): Rename to ...
8499 (s390_regsets): ... this, and make static.
8500 (s390_get_pc, s390_set_pc): Adjust.
8501 (s390_get_hwcap): New target_desc parameter, and use it.
8502 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8503 (s390_arch_setup): Adjust to set the current process'es target
8504 description. Don't adjust the regmap.
8505 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8506 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8507 (regs_info_3264): New globals.
8508 (s390_regs_info): New function.
8509 (the_low_target): Adjust.
8510 (initialize_low_arch): New function.
8511 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8512 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8513 [__mips64] (init_registers_mips_linux)
8514 (init_registers_mips_dsp_linux): Delete defines.
8515 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8516 (have_dsp): New global.
8517 (mips_read_description): New, based on mips_arch_setup.
8518 (mips_arch_setup): Reimplement.
8519 (get_usrregs_info): New function.
8520 (mips_cannot_fetch_register, mips_cannot_store_register)
8521 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8522 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8523 (target_regsets): Rename to ...
8524 (mips_regsets): ... this, and make static.
8525 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8526 (dsp_regs_info, regs_info): New globals.
8527 (mips_regs_info): New function.
8528 (the_low_target): Adjust.
8529 (initialize_low_arch): New function.
8530 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8531 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8532 Declare.
8533 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8534 (arm_read_description): New, with bits factored from
8535 arm_arch_setup.
8536 (arm_arch_setup): Reimplement.
8537 (target_regsets): Rename to ...
8538 (arm_regsets): ... this, and make static.
8539 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8540 (arm_regs_info): New function.
8541 (the_low_target): Adjust.
8542 (initialize_low_arch): New function.
8543 * linux-m68k-low.c (tdesc_m68k): Declare.
8544 (target_regsets): Rename to ...
8545 (m68k_regsets): ... this, and make static.
8546 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8547 (m68k_regs_info): New function.
8548 (m68k_arch_setup): New function.
8549 (the_low_target): Adjust.
8550 (initialize_low_arch): New function.
8551 * linux-sh-low.c (tdesc_sharch): Declare.
8552 (target_regsets): Rename to ...
8553 (sh_regsets): ... this, and make static.
8554 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8555 (sh_regs_info, sh_arch_setup): New functions.
8556 (the_low_target): Adjust.
8557 (initialize_low_arch): New function.
8558 * linux-bfin-low.c (tdesc_bfin): Declare.
8559 (bfin_arch_setup): New function.
8560 (bfin_usrregs_info, regs_info): New globals.
8561 (bfin_regs_info): New function.
8562 (the_low_target): Adjust.
8563 (initialize_low_arch): New function.
8564 * linux-cris-low.c (tdesc_cris): Declare.
8565 (cris_arch_setup): New function.
8566 (cris_usrregs_info, regs_info): New globals.
8567 (cris_regs_info): New function.
8568 (the_low_target): Adjust.
8569 (initialize_low_arch): New function.
8570 * linux-cris-low.c (tdesc_crisv32): Declare.
8571 (cris_arch_setup): New function.
8572 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8573 (cris_regs_info): New function.
8574 (the_low_target): Adjust.
8575 (initialize_low_arch): New function.
8576 * linux-m32r-low.c (tdesc_m32r): Declare.
8577 (m32r_arch_setup): New function.
8578 (m32r_usrregs_info, regs_info): New globals.
8579 (m32r_regs_info): Adjust.
8580 (initialize_low_arch): New function.
8581 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8582 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8583 (tic6x_usrregs_info): Forward declare.
8584 (tic6x_read_description): New function, based on ...
8585 (tic6x_arch_setup): ... this. Reimplement.
8586 (target_regsets): Rename to ...
8587 (tic6x_regsets): ... this, and make static.
8588 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8589 (tic6x_regs_info): New function.
8590 (the_low_target): Adjust.
8591 (initialize_low_arch): New function.
8592 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8593 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8594 (target_regsets): Rename to ...
8595 (xtensa_regsets): ... this, and make static.
8596 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8597 globals.
8598 (xtensa_arch_setup, xtensa_regs_info): New functions.
8599 (the_low_target): Adjust.
8600 (initialize_low_arch): New function.
8601 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8602 (nios2_arch_setup): Set the current process'es tdesc.
8603 (target_regsets): Rename to ...
8604 (nios2_regsets): ... this.
8605 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8606 (nios2_regs_info): New function.
8607 (the_low_target): Adjust.
8608 (initialize_low_arch): New function.
a261b8f5
PA
8609 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8610 (aarch64_arch_setup): Set the current process'es tdesc.
8611 (target_regsets): Rename to ...
8612 (aarch64_regsets): ... this.
8613 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8614 (aarch64_regs_info): New function.
8615 (the_low_target): Adjust.
8616 (initialize_low_arch): New function.
3aee8918
PA
8617 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8618 globals.
8619 (target_regsets): Rename to ...
8620 (tile_regsets): ... this.
8621 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8622 (tile_regs_info): New function.
8623 (tile_arch_setup): Set the current process'es tdesc.
8624 (the_low_target): Adjust.
8625 (initialize_low_arch): New function.
8626 * spu-low.c (tdesc_spu): Declare.
8627 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8628 * win32-arm-low.c (tdesc_arm): Declare.
8629 (arm_arch_setup): New function.
8630 (the_low_target): Install arm_arch_setup instead of
8631 init_registers_arm.
8632 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8633 (init_windows_x86): Rename to ...
8634 (i386_arch_setup): ... this. Set `win32_tdesc'.
8635 (the_low_target): Adjust.
8636 * win32-low.c (win32_tdesc): New global.
8637 (child_add_thread): Don't create the thread cache here.
8638 (do_initial_child_stuff): Set the new process'es tdesc.
8639 * win32-low.h (struct target_desc): Forward declare.
8640 (win32_tdesc): Declare.
8641 * lynx-i386-low.c (tdesc_i386): Declare global.
8642 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8643 * lynx-low.c (lynx_tdesc): New global.
8644 (lynx_add_process): Set the new process'es tdesc.
8645 * lynx-low.h (struct target_desc): Forward declare.
8646 (lynx_tdesc): Declare global.
8647 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8648 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8649 * nto-low.c (nto_tdesc): New global.
8650 (do_attach): Set the new process'es tdesc.
8651 * nto-low.h (struct target_desc): Forward declare.
8652 (nto_tdesc): Declare.
8653 * nto-x86-low.c (tdesc_i386): Declare.
8654 (nto_x86_arch_setup): Set `nto_tdesc'.
8655
b1fbec62
GB
86562013-06-04 Gary Benson <gbenson@redhat.com>
8657
8658 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8659 to qSupported response when appropriate.
8660 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8661 with nonzero-length annex.
8662 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8663 arguments supplied in annex.
8664
d1ec4ce7
DE
86652013-05-31 Doug Evans <dje@google.com>
8666
ac44adcb 8667 PR server/15594
d1ec4ce7
DE
8668 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8669 64 bits in 64-cross-32 environment.
8670
9b25f2d3
PA
86712013-05-28 Pedro Alves <palves@redhat.com>
8672
8673 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8674 (aarch64-without-fpu.c): Delete rule.
8675 * configure.srv (aarch64*-*-linux*): Remove references to
8676 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8677 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8678 declaration.
8679
6740dc9c
PA
86802013-05-24 Pedro Alves <palves@redhat.com>
8681
8682 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8683 instead of strchr/decode_address. Error if the range isn't split
8684 with a ','. Don't assume there's be a ':' in the action.
8685
c2d6af84
PA
86862013-05-23 Yao Qi <yao@codesourcery.com>
8687 Pedro Alves <palves@redhat.com>
8688
8689 * linux-low.c (lwp_in_step_range): New function.
8690 (linux_wait_1): If the thread was range stepping and stopped
8691 outside the stepping range, report the stop to GDB. Otherwise,
8692 continue stepping. Add range stepping debug output.
8693 (linux_set_resume_request): Copy the step range from the resume
8694 request to the lwp.
8695 (linux_supports_range_stepping): New.
8696 (linux_target_ops) <supports_range_stepping>: Set to
8697 linux_supports_range_stepping.
8698 * linux-low.h (struct linux_target_ops)
8699 <supports_range_stepping>: New field.
8700 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8701 * linux-x86-low.c (x86_supports_range_stepping): New.
8702 (the_low_target) <supports_range_stepping>: Set to
8703 x86_supports_range_stepping.
8704 * server.c (handle_v_cont): Handle 'r' action.
8705 (handle_v_requests): Append ";r" if the target supports range
8706 stepping.
8707 * target.h (struct thread_resume) <step_range_start,
8708 step_range_end>: New fields.
8709 (struct target_ops) <supports_range_stepping>:
8710 New field.
8711 (target_supports_range_stepping): New macro.
8712
58794e1a
JB
87132013-05-17 Joel Brobecker <brobecker@adacore.com>
8714
8715 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8716 confusion in comment.
8717
d631c5a7
JB
87182013-05-17 Joel Brobecker <brobecker@adacore.com>
8719
8720 * lynx-low.c (struct process_info_private): New type.
8721 (lynx_add_process): New function.
8722 (lynx_create_inferior, lynx_attach): Replace calls to
8723 add_process by calls to lynx_add_process.
8724 (lynx_resume): If PTID is null, then try using
8725 current_process()->private->last_wait_event_ptid.
8726 Add comments.
8727 (lynx_clear_inferiors): Delete. The contents of that function
8728 has been inlined in lynx_mourn;
8729 (lynx_wait_1): Save the ptid in the process's private data.
8730 (lynx_mourn): Free the process' private data. Replace call
8731 to lynx_clear_inferiors by call to clear_inferiors.
8732
96f7a20f
YQ
87332013-05-17 Yao Qi <yao@codesourcery.com>
8734
8735 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8736 the right place.
8737
db0dfaa0
LM
87382013-05-16 Luis Machado <lgustavo@codesourcery.com>
8739
8740 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8741 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8742 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8743 PT_TEXT_END_ADDR guards. Update comments.
8744 (linux_target_op) <read_offsets>: Conditionally define to
8745 linux_read_offsets if the target is UCLIBC and if it defines
8746 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8747
68f5f838
SL
87482013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8749 Andrew Jenner <andrew@codesourcery.com>
8750
8751 * Makefile.in (SFILES): Add linux-nios2-low.c.
8752 (clean): Add action to delete nios2-linux.c.
8753 (nios2-linux.c): New rule.
8754 * configure.srv: Add nios2*-*-linux*.
8755 * linux-nios2-low.c: New.
8756
1ebff1fd
HAQ
87572013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8758
8759 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8760
f6150862
HZ
87612013-04-25 Hui Zhu <hui@codesourcery.com>
8762
8763 PR gdb/15186
f6150862
HZ
8764 * ax.c (ax_printf): Add fflush.
8765
614c279d
TT
87662013-04-22 Tom Tromey <tromey@redhat.com>
8767
8768 * Makefile.in (SFILES): Add filestuff.c.
8769 (OBS): Add filestuff.o.
8770 (filestuff.o): New target.
8771 * config.in, configure: Rebuild.
8772 * configure.ac: Check for fdwalk, pipe2.
8773
7d4e5717
PA
87742013-04-17 Pedro Alves <palves@redhat.com>
8775
8776 * configure.ac (USE_THREAD_DB): Delete variable.
8777 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8778 Don't AC_SUBST USE_THREAD_DB.
8779 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8780 * config.in, configure: Regenerate.
8781
d5c93e41
PA
87822013-04-16 Pedro Alves <palves@redhat.com>
8783
8784 * linux-low.h (struct lwp_info) <thread_known>: Move under
8785 the USE_THREAD_DB #ifdef.
8786
04f5fe89
PA
87872013-04-16 Pedro Alves <palves@redhat.com>
8788
8789 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8790 (linux-low.o): Delete rule.
8791 * linux-low.h: Always include "gdb_thread_db.h" instead of
8792 conditionally including thread_db.h.
8793 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8794 HAVE_THREAD_DB_H.
8795
480b27bf
JK
87962013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8797
8798 * Makefile.in (install-only): Fix make install regression.
8799
43662968
JK
88002013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8801
8802 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8803 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8804 installation.
8805 * gdbserver.1: Remove.
8806
3e74e146
PA
88072013-03-22 Pedro Alves <palves@redhat.com>
8808
8809 * linux-low.c (handle_extended_wait): Don't call
8810 linux_enable_event_reporting.
8811
a8347a2a
TT
88122013-03-15 Tony Theodore <tonyt@logyst.com>
8813
8814 PR build/9098:
8815 * Makefile.in (SHELL): Use @SHELL@.
8816
eeb56fa7
SDJ
88172013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8818
8819 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8820 compiler warning.
8821
4fa7e2ff
JB
88222013-03-13 Joel Brobecker <brobecker@adacore.com>
8823
8824 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8825 Remove extraneous NULL element.
8826
8ddb1965
YQ
88272013-03-13 Yao Qi <yao@codesourcery.com>
8828
8829 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8830 'V' block in trace frame.
8831
9accd112
MM
88322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8833
8834 * target.h (struct target_ops): Add btrace ops.
8835 (target_supports_btrace): New macro.
8836 (target_enable_btrace): New macro.
8837 (target_disable_btrace): New macro.
8838 (target_read_btrace): New macro.
8839 * gdbthread.h (struct thread_info): Add btrace field.
8840 * server.c: Include btrace-common.h.
8841 (handle_btrace_general_set): New function.
8842 (handle_btrace_enable): New function.
8843 (handle_btrace_disable): New function.
8844 (handle_general_set): Call handle_btrace_general_set.
8845 (handle_qxfer_btrace): New function.
8846 (struct qxfer qxfer_packets[]): Add btrace entry.
8847 * inferiors.c (remove_thread): Disable btrace.
8848 * linux-low: Include linux-btrace.h.
8849 (linux_low_enable_btrace): New function.
8850 (linux_low_read_btrace): New function.
8851 (linux_target_ops): Add btrace ops.
8852 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8853 Add srv_linux_btrace=yes.
8854 (x86_64-*-linux*): Add linux-btrace.o.
8855 Add srv_linux_btrace=yes.
8856 * configure.ac: Define HAVE_LINUX_BTRACE.
8857 * config.in: Regenerated.
8858 * configure: Regenerated.
8859
5cc22e4c
MM
88602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8861
8862 * server.c (handle_qxfer): Preserve error message if -3 is
8863 returned.
8864 (qxfer): Document the -3 return value.
8865
7c97f91e
MM
88662013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8867
8868 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8869 (linux_btrace_h): New variable.
8870 (linux-btrace.o): New rule.
8871
be9a119c 88722013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8873 Hafiz Abid Qadeer <abidh@codesourcery.com>
8874
8875 * tracepoint.c (trace_buffer_size): New global.
8876 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8877 (init_trace_buffer): Change to one-argument function. Allocate
8878 trace buffer memory.
8879 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8880 handle QTBuffer:size packet.
8881 (cmd_bigqtbuffer_size): New function.
8882 (initialize_tracepoint): Call init_trace_buffer with
8883 DEFAULT_TRACE_BUFFER_SIZE.
8884 * server.c (handle_query): Add QTBuffer:size in the
8885 supported packets.
8886
e64f7499
YQ
88872013-03-07 Yao Qi <yao@codesourcery.com>
8888
8889 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8890 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8891 of -1.
8892 (cmd_qtsp): Adjust condition. Do post increment.
8893 Set cur_action and cur_step_action back to 0.
8894
f0ae6fc3
PA
88952013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8896
8897 PR server/15236
8898 * linux-low.c (linux_write_memory): Return early success if LEN is
8899 zero.
8900
b5b0b0af
CV
89012013-03-05 Corinna Vinschen <vinschen@redhat.de>
8902
334ad4a8 8903 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8904
589bc927
TT
89052013-02-28 Tom Tromey <tromey@redhat.com>
8906
8907 * configure.ac: Invoke AC_SYS_LARGEFILE.
8908 * configure, config.in: Rebuild.
8909
dfe07582
CV
89102013-02-28 Corinna Vinschen <vinschen@redhat.com>
8911
8912 * win32-low.c: Throughout, fix format strings and casts of
8913 printf-like functions to avoid type related warnings on all
8914 platforms.
8915 (get_child_debug_event): Print dwDebugEventCode as hex since
8916 that's how it's usually documented.
8917
736cd585
YQ
89182013-02-28 Yao Qi <yao@codesourcery.com>
8919
8920 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8921 pulongest.
8922
e1f58301
JW
89232013-02-27 Jiong Wang <jiwang@tilera.com>
8924
8925 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8926 (reg-tilegx32.c): New rule.
8927 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8928 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8929 different register info initializer according to elf class.
8930 (init_registers_tilgx32): New function. The tilegx32 register info
8931 initializer.
8932 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8933 (tile_store_gregset): Likewise.
8934
d171ca78
YQ
89352013-02-27 Yao Qi <yao@codesourcery.com>
8936
8937 * server.c (process_point_options): Print debug message when
8938 debug_threads is true.
8939
282bbdf3
YQ
89402013-02-26 Yao Qi <yao@codesourcery.com>
8941
8942 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8943
aca22551
PA
89442013-02-19 Pedro Alves <palves@redhat.com>
8945 Kai Tietz <ktietz@redhat.com>
8946
8947 PR gdb/15161
8948
8949 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8950 instead of strtoul to extract address from packet.
8951 (process_serial_event) <'z'>: Likewise.
8952
4f3cee1c
YQ
89532013-02-18 Yao Qi <yao@codesourcery.com>
8954
8955 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8956
8e1d55a3
PA
89572013-02-14 Pedro Alves <palves@redhat.com>
8958
8959 Plug memory leak.
8960
8961 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8962 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8963
458820da
PA
89642013-02-14 Pedro Alves <palves@redhat.com>
8965
8966 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8967
baea0dae
PA
89682013-02-14 Pedro Alves <palves@redhat.com>
8969
8970 * tracepoint.c (save_string): Delete.
8971 (add_tracepoint_action): Use savestring instead of save_string.
8972
0b1afbb3
PA
89732013-02-12 Pedro Alves <palves@redhat.com>
8974
8975 * linux-xtensa-low.c: Ditto.
8976 * xtensa-xtregs.c: Ditto.
8977
8a4ac37e
PA
89782013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8979
8980 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8981 thread_db.
8982
148de6bb
MS
89832013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8984
8985 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8986 aarch64_num_wp_regs and aarch64_num_bp_regs to
8987 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8988
55fac6e0
MS
89892013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8990
8991 * linux-aarch64-low.c (ps_get_thread_area): Replace
8992 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8993
176eb98c
MS
89942013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8995 Marcus Shawcroft <marcus.shawcroft@arm.com>
8996 Nigel Stephens <nigel.stephens@arm.com>
8997 Yufeng Zhang <yufeng.zhang@arm.com>
8998
8999 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9000 (aarch64.c, aarch64-without-fpu.c): New targets.
9001 * configure.srv (aarch64*-*-linux*): New.
9002 * linux-aarch64-low.c: New file.
9003
56f7af9c
MS
90042013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9005
43aaf8b6 9006 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9007 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9008 (dequeue_one_deferred_signal, linux_resume_one_thread)
9009 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9010 (linux_tracefork_grandchild, linux_test_for_tracefork)
9011 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9012 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9013 where the argument is 0.
9014
60f662b0
YQ
90152013-01-25 Yao Qi <yao@codesourcery.com>
9016
9017 * event-loop.c: Include "queue.h".
9018 (gdb_event_p): New typedef.
9019 (struct gdb_event) <next_event>: Remove.
9020 (event_queue): Change to QUEUE(gdb_event_p).
9021 (async_queue_event): Remove.
9022 (gdb_event_xfree): New.
9023 (initialize_event_loop): New.
9024 (process_event): Use API from QUEUE.
9025 (wait_for_event): Likewise.
9026 * server.c (main): Call initialize_event_loop.
9027 * server.h (initialize_event_loop): Declare.
9028
5ae4861a
YQ
90292013-01-18 Yao Qi <yao@codesourcery.com>
9030
9031 * ax.h (struct eval_agent_expr_context): New.
9032 (gdb_eval_agent_expr): Update declaration.
9033 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9034 TFRAME. Add new argument CTX.
9035 * server.h (struct eval_agent_expr_context): Declare.
9036 (agent_mem_read, agent_tsv_read): Update declaration.
9037 (agent_mem_read_string): Likewise.
9038 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9039 (add_traceframe_block): Add new argument TPOINT.
9040 Increase TPOINT->traceframe_usage.
9041 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9042 eval_tracepoint_agent_expr.
9043 (condition_true_at_tracepoint): Likewise.
9044 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9045 (agent_mem_read_string, agent_tsv_read): Likewise.
9046
85e00e85
YQ
90472013-01-16 Yao Qi <yao@codesourcery.com>
9048
9049 * linux-low.c (linux_resume_one_lwp): Don't check
9050 'lwp->bp_reinsert != 0'.
9051
4039cf45
JB
90522013-01-07 Joel Brobecker <brobecker@adacore.com>
9053 Pedro Alves <palves@redhat.com>
9054
9055 * lynx-low.c (ptrace_request_to_str): Define a temporary
9056 macro and use it to simplify this function's implementation.
9057
9044dee2
JB
90582013-01-07 Joel Brobecker <brobecker@adacore.com>
9059
9060 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9061 sets errno.
9062
e6352c8f
JB
90632013-01-07 Joel Brobecker <brobecker@adacore.com>
9064
9065 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9066
50681a27
JB
90672013-01-07 Joel Brobecker <brobecker@adacore.com>
9068
9069 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9070
3f6e77ef
JB
90712013-01-07 Joel Brobecker <brobecker@adacore.com>
9072
9073 * lynx-low.c (lynx_resume): Use the resume_info parameter
9074 to determine the ptid for the lynx_ptrace call, unless
9075 it is equal to minus_one_ptid, in which case we use the
9076 ptid of the current_inferior.
9077 (lynx_wait_1): After having received a thread create/exit
9078 event, resume the inferior's execution using the signaling
9079 thread's ptid, rather than the old ptid.
9080
7fda33ae
JB
90812013-01-07 Joel Brobecker <brobecker@adacore.com>
9082
9083 * lynx-low.c (lynx_resume): Delete variable ret.
9084
b9786c74
JB
90852013-01-01 Joel Brobecker <brobecker@adacore.com>
9086
9087 * gdbreplay.c (gdbreplay_version): Update copyright year.
9088 * server.c (gdbserver_version): Likewise.
9089
8b93d60f
JB
90902012-12-17 Joel Brobecker <brobecker@adacore.com>
9091
9092 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9093 new thread.
9094
037335a7
JB
90952012-12-17 Joel Brobecker <brobecker@adacore.com>
9096
9097 * lynx-low.c (ptrace_request_to_str): Add handling for
9098 PTRACE_GETTRACESIG.
9099
52d4cbd8
JB
91002012-12-17 Joel Brobecker <brobecker@adacore.com>
9101
9102 * lynx-low.c (lynx_attach): Delete variable new_process.
9103
ab8f6ca9
JB
91042012-12-17 Joel Brobecker <brobecker@adacore.com>
9105
9106 * lynx-low.c (lynx_create_inferior): Delete variable
9107 new_process.
9108
78cbc024
JB
91092012-12-17 Joel Brobecker <brobecker@adacore.com>
9110
9111 * lynx-low.c (ptrace_request_to_str): Do not handle
9112 PTRACE_GETTHREADLIST if this macro does not exist.
9113
14a00470
YQ
91142012-12-15 Yao Qi <yao@codesourcery.com>
9115
9116 * Makefile.in (OBS): Add notif.o.
9117 * notif.c, notif.h: New.
9118 * server.c: Include "notif.h".
9119 (struct vstop_notif) <next>: Remove.
9120 <base>: New field.
9121 (queue_stop_reply): Update.
9122 (push_event, send_next_stop_reply): Remove.
9123 (discard_queued_stop_replies): Update.
9124 (notif_stop): New variable.
9125 (handle_v_stopped): Remove.
9126 (handle_v_requests): Don't call handle_v_stopped. Call
9127 handle_ack_notif instead.
9128 (queue_stop_reply_callback): Call notif_event_enque instead
9129 of queue_stop_reply.
9130 (handle_status): Don't call send_next_stop_reply, call
9131 notif_write_event instead.
9132 (kill_inferior_callback): Likewise.
9133 (detach_or_kill_inferior_callback): Likewise.
9134 (main): Call initialize_notif.
9135 (process_serial_event): Call QUEUE_is_empty.
9136 (handle_target_event): Call notif_push instead of push event.
9137 * server.h (push_event): Remove declaration.
9138
61c125b9
TT
91392012-12-10 Tom Tromey <tromey@redhat.com>
9140
9141 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9142 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9143 macros.
9144 (.c.o): Rewrite.
9145 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9146 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9147 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9148 (amd64-linux-ipa.o, ax.o): Rewrite.
9149 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9150 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9151 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9152 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9153 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9154 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9155 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9156 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9157 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9158 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9159 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9160 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9161 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9162 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9163 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9164 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9165 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9166 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9167 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9168 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9169 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9170 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9171 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9172 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9173 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9174 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9175 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9176 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9177 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9178 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9179 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9180 (reg-tilegx.o): Remove.
9181 (all_object_files): New macro.
9182 Include .deps files.
9183 * aclocal.m4, configure: Rebuild.
9184 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9185 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9186 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9187
e90e9ad9
TT
91882012-12-05 Tom Tromey <tromey@redhat.com>
9189
9190 PR gdb/14917:
9191 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9192
02d403bf 91932012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9194
9195 * configure.ac: Check for linux/perf_event.h.
9196 * config.in: Regenerated.
9197 * configure: Regenerated.
9198
0270a750
PA
91992012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9200
9201 * hostio.c (handle_readlink): Decrease buffer size
9202 parameter passed to readlink by one byte.
9203
8c29b58e
YQ
92042012-11-26 Yao Qi <yao@codesourcery.com>
9205
9206 * configure.ac (build_warnings): Append '-Wempty-body'.
9207 * configure: Regenerated.
9208 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9209 body.
9210
8bdce1ff
PM
92112012-11-15 Pierre Muller <muller@sourceware.org>
9212
9213 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9214 * config.in: Regenerate.
9215 * configure: Regenerate.
9216 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9217 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9218 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9219 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9220 header.
9221 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9222 instead of <sys/wait.h> header.
9223 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9224
02d403bf 92252012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9226
9227 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9228 (various make rules): Remove -DGDBSERVER
9229
fbd5db48
YQ
92302012-11-09 Yao Qi <yao@codesourcery.com>
9231
9232 * spu-low.c (current_ptid): Move it to ..
9233 * gdbthread.h: ... here. New.
9234 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9235 * server.c (myresume, process_serial_event): Likewise.
9236 * thread-db.c (thread_db_find_new_threads): Likewise.
9237 * tracepoint.c (run_inferior_command): Likewise.
9238
b3dc46ff
AB
92392012-10-01 Andrew Burgess <aburgess@broadcom.com>
9240
9241 * server.c (handle_search_memory_1): Include access length in
9242 warning message.
9243
07c04788
HPN
92442012-09-05 Michael Brandt <michael.brandt@axis.com>
9245
9246 * linux-crisv32-low.c: Fix compile errors.
9247
918d227b
YQ
92482012-09-04 Yao Qi <yao@codesourcery.com>
9249
9250 * tracepoint.c (cmd_qtsv): Adjust debug message.
9251 Don't check CUR_TPOINT.
9252
18c1b81a
YQ
92532012-08-28 Yao Qi <yao@codesourcery.com>
9254
9255 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9256 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9257 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9258 Remove declarations of xmalloc, xreallloc, xstrdup and
9259 freeargv.
9260 * Makefile.in (libiberty_h): New.
9261 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9262 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9263
dc82f37b
YQ
92642012-08-23 Yao Qi <yao@codesourcery.com>
9265
9266 * server.h: Remove declaration of 'xsnprintf'.
9267
406b1477
KS
92682012-08-22 Keith Seitz <keiths@redhat.com>
9269
9270 * server.h: Include build-gnulib-gbserver/config.h.
9271 * gdbreplay.c: Likewise.
9272
e6712ff1
DE
92732012-08-08 Doug Evans <dje@google.com>
9274
9275 * Makefile.in (SFILES): Add gdb_vecs.c.
9276 (OBS): Add gdb_vecs.o.
9277 (gdb_vecs_h, host_defs_h): New variables.
9278 (thread-db.o): Add $(gdb_vecs_h) dependency.
9279 (gdb_vecs.o): New rule.
9280 * thread-db.c: #include "gdb_vecs.h".
9281 (thread_db_load_search): Use a vector to iterate over path elements.
9282 Handle text appearing after "$pdir".
9283
9284 * configure.ac: Add check for strstr.
9285 * config.in: Regenerate.
9286 * configure: Regenerate.
9287
7c3270ae
UW
92882012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9289
9290 * hostio.c (handle_pread): If pread fails, fall back to attempting
9291 lseek/read.
9292 (handle_pwrite): Likewise for pwrite.
9293
b62e2b27
UW
92942012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9295
9296 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9297 between unsupported TYPE and unimplementable ADDR/LEN combination.
9298 (arm_insert_point): Act on new return value.
9299
78a99e91
PA
93002012-07-31 Pedro Alves <palves@redhat.com>
9301
9302 * server.c (process_point_options): Only skip tokens if we find
9303 one that is unrecognized. Don't treat 'X' specially while
9304 skipping unrecognized tokens.
9305
fcf303ab
UW
93062012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9307
9308 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9309 to 4-byte-align HW breakpoint addresses for Thumb.
9310
7255706c
YQ
93112012-07-27 Yao Qi <yao@codesourcery.com>
9312
9313 PR remote/14161.
9314
9315 * server.h: Declare gdb_agent_about_to_close.
9316 * target.c (kill_inferior): Include "agent.h".
9317 New. Send command 'kill'.
9318 * target.h (kill_inferior): Removed macro.
9319 * tracepoint.c (gdb_agent_about_to_close): New.
9320 (gdb_agent_helper_thread): Handle command 'close'.
9321 Wait endlessly until the inferior stops.
9322 Install gdb_agent_remove_socket to atexit hook.
9323 (agent_socket_name): New static variable.
9324 (gdb_agent_socket_init): Replace local variable 'name' with
9325 'agent_socket_name'.
9326 (gdb_agent_remove_socket): New.
9327
5a3f286f
YQ
93282012-07-27 Yao Qi <yao@codesourcery.com>
9329
9330 * server.c (process_point_options): Stop at 'X' when parsing.
9331
961bd387
ME
93322012-07-19 Michael Eager <eager@eagercon.com>
9333
a261b8f5 9334 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9335 to hw_execute.
9336 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9337 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9338 hardware breakpoint.
9339
aa7c7447
JK
93402012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9341
9342 * gdbserver/linux-low.c (initialize_low): Call
9343 linux_ptrace_init_warnings.
9344
7f216e7c
DE
93452012-07-02 Doug Evans <dje@google.com>
9346
9347 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9348 pointer to int.
9349
d3ce09f5
SS
93502012-07-02 Stan Shebs <stan@codesourcery.com>
9351
9352 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9353 (ax.o): Add it to build rule.
9354 (ax-ipa.o): Ditto.
9355 (OBS): Add format.o.
9356 (IPA_OBS): Add format.o.
9357 * server.c (handle_query): Claim support for breakpoint commands.
9358 (process_point_options): Add command case.
9359 (process_serial_event): Leave running if there are printfs in
9360 effect.
9361 * mem-break.h (any_persistent_commands): Declare.
9362 (add_breakpoint_commands): Declare.
9363 (gdb_no_commands_at_breakpoint): Declare.
9364 (run_breakpoint_commands): Declare.
9365 * mem-break.c (struct point_command_list): New struct.
9366 (struct breakpoint): New field command_list.
9367 (any_persistent_commands): New function.
9368 (add_commands_to_breakpoint): New function.
9369 (add_breakpoint_commands): New function.
9370 (gdb_no_commands_at_breakpoint): New function.
9371 (run_breakpoint_commands): New function.
9372 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9373 locally.
9374 * ax.c: Include format.h.
9375 (ax_printf): New function.
9376 (gdb_eval_agent_expr): Add printf opcode.
9377
2f8f6aed
YQ
93782012-06-13 Yao Qi <yao@codesourcery.com>
9379
9380 * server.c (start_inferior): Remove duplicated writes to fields
9381 'last_resume_kind' and 'last_status' of 'current_inferior'.
9382
0c9070b3
YQ
93832012-06-12 Yao Qi <yao@codesourcery.com>
9384 Pedro Alves <palves@redhat.com>
9385
9386 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9387 comment.
9388 * server.c (handle_v_cont): Extend comment.
9389
c52daf70
YQ
93902012-06-11 Yao Qi <yao@codesourcery.com>
9391
9392 * linux-low.c (linux_attach): Add 'static'.
9393
d38bbb0a
YQ
93942012-06-06 Yao Qi <yao@codesourcery.com>
9395
9396 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9397
89dc0afd
JK
93982012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9399
9400 Fix gcc -flto compilation warning.
9401 * server.c (main): Make variable multi_mode and attach volatile.
9402
75f62ce7
TJB
94032012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9404
9405 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9406 if the platform doesn't know about it.
9407
65f479b6
PA
94082012-05-30 Jeff Kenton <jkenton@tilera.com>
9409
9410 * Makefile.in (SFILES): Add linux-tile-low.c.
9411 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9412 * configure.srv: Handle tilegx-*-linux*.
9413 * linux-tile-low.c: New file.
9414
0c5bf5a9
JK
94152012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9416
9417 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9418
a493e3e2
PA
94192012-05-24 Pedro Alves <palves@redhat.com>
9420
9421 PR gdb/7205
9422
43aaf8b6 9423 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9424
2ea28649
PA
94252012-05-24 Pedro Alves <palves@redhat.com>
9426
9427 PR gdb/7205
9428
9429 Replace target_signal with gdb_signal throughout.
9430
8d409d16
MR
94312012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9432
9433 * linux-low.c (linux_store_registers): Avoid the copying sequence
9434 when no data has been retrieved by ptrace.
9435
23512c01
MGD
94362012-05-22 Will Deacon <will.deacon@arm.com>
9437
9438 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9439 Include asm/ptrace.h.
9440 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9441 already defined.
9442
4934b29e
MR
94432012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9444
9445 * linux-low.c (linux_store_registers): Don't re-retrieve data
9446 with ptrace that has already been obtained from /proc. Always
9447 copy any data retrieved with ptrace to the buffer supplied.
9448
bde24c0a
PA
94492012-05-11 Yao Qi <yao@codesourcery.com>
9450 Pedro Alves <palves@redhat.com>
9451
9452 * linux-low.c (enum stopping_threads_kind): New.
9453 (stopping_threads): Change type to `enum stopping_threads_kind'.
9454 (handle_extended_wait): If stopping and suspending threads, leave
9455 the new_lwp suspended too.
9456 (linux_wait_for_event): Adjust.
9457 (stop_all_lwps): Set `stopping_threads' to
9458 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9459 whether we're suspending threads or just stopping them. Assert no
9460 recursion happens.
9461
623b6bdf
YQ
94622012-04-29 Yao Qi <yao@codesourcery.com>
9463
9464 * server.h: Move some code to ...
9465 * gdbthread.h: ... here. New.
9466 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9467 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9468 (nto-low.o, win32-low.o): Likewise.
9469 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9470 * regcache.c, remote-utils.c, server.c: Likewise.
9471 * target.c, tracepoint.c, win32-low.c: Likewise.
9472
f15f9948
TJB
94732012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9474
9475 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9476 (PTRACE_ARG4_TYPE): Likewise.
9477 (PTRACE_XFER_TYPE): Likewise.
9478 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9479 ptrace to PTRACE_ARG3_TYPE.
9480 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9481 (PTRACE_ARG4_TYPE): Likewise.
9482 (PTRACE_XFER_TYPE): Likewise.
9483 (linux_detach_one_lwp): Cast fourth argument of
9484 ptrace to long then PTRACE_ARG4_TYPE.
9485 (regsets_fetch_inferior_registers): Cast third argument of
9486 ptrace to long then PTRACE_ARG3_TYPE.
9487 (regsets_store_inferior_registers): Likewise.
9488
38ea300a
PA
94892012-04-20 Pedro Alves <palves@redhat.com>
9490
9491 * configure: Regenerate.
9492
c971b7fa
PA
94932012-04-19 Pedro Alves <palves@redhat.com>
9494
43aaf8b6 9495 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9496 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9497 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9498 (all, install-only, uninstall, clean-info, all-lib, clean): No
9499 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9500 (maintainer-clean realclean distclean): Use subdir_do.
9501 (subdir_do): New.
9502 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9503 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9504 * acinclude.m4: Include acx_configure_dir.m4.
9505 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9506 calls. Call AC_PROG_RANLIB. Configure gnulib using
9507 ACX_CONFIGURE_DIR.
9508 (GNULIB): New.
9509 (GNULIB_STDINT_H): Adjust.
9510 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9511 * gdbreplay.c: Include build-gnulib/config.h.
9512 * server.h: Likewise.
9513 * aclocal.m4: Regenerate.
9514 * config.in: Regenerate.
9515 * configure: Regenerate.
c971b7fa 9516
809277f8
PA
95172012-04-19 Pedro Alves <palves@redhat.com>
9518
9519 * Makefile.in (LIBGNU, INCGNU): Adjust.
9520 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9521 (all, install-only, uninstall, clean-info, all-lib, clean)
9522 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9523 * configure.ac: Adjust AC_OUTPUT output.
9524 * aclocal.m4: Regenerate.
9525 * configure: Regenerate.
9526
fd9bb8b8
PA
95272012-04-19 Pedro Alves <palves@redhat.com>
9528
9529 * Makefile.in (generated_files): New.
9530 (server_h): Remove the explicit dependency on config.h, and depend
9531 on $generated_files.
9532
1c298c66
PA
95332012-04-19 Pedro Alves <palves@redhat.com>
9534
9535 * Makefile.in (INCGNU): Add -Ignulib.
9536
57c4b50b
PA
95372012-04-19 Pedro Alves <palves@redhat.com>
9538
9539 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9540 (INCGNU): ... this, and spell out -I here.
9541 (GNULIB_LIB): Rename to ...
9542 (LIBGNU): ... this.
9543 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9544
1030e047
PA
95452012-04-19 Pedro Alves <palves@redhat.com>
9546
9547 * config.in: Regenerate.
9548
447d4319
PA
95492012-04-19 Pedro Alves <palves@redhat.com>
9550
9551 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9552 * server.h (memmem): Remove declaration.
9553 * config.in: Regenerate.
9554 * configure: Regenerate.
9555
aad9eab9
YQ
95562012-04-19 Yao Qi <yao@codesourcery.com>
9557
9558 * Makefile.in (SFILES): Add common/vec.c.
9559 (OBS): Add vec.o.
9560 (vec.o): New rule.
9561
3e10640f
YQ
95622012-04-19 Yao Qi <yao@codesourcery.com>
9563
9564 * remote-utils.c (prepare_resume_reply): Replace with macro
9565 target_core_of_thread.
9566 * server.c (handle_qxfer_threads_proper): Likewise.
9567 * target.h (traget_core_of_thread): New macro.
9568
71622373
PA
95692012-04-18 Pedro Alves <palves@redhat.com>
9570
9571 * aclocal.m4: Regenerate.
9572 * configure: Regenerate.
9573
80d26939
YQ
95742012-04-16 Yao Qi <yao@codesourcery.com>
9575
9576 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9577 duplicated on address.
9578
42476b70
YQ
95792012-04-16 Yao Qi <yao@codesourcery.com>
9580
9581 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9582 (struct tracepoint_action_ops) <send>: New field.
9583 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9584 (agent_expr_send, x_tracepoint_action_send): New.
9585 (l_tracepoint_action_send): New.
9586 (cmd_qtdp): Download and install tracepoint
9587 according to `use_agent'.
9588 (run_inferior_command): Add one more parameter `len'.
9589 Update callers.
9590 (tracepoint_send_agent): New.
9591 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9592
7bc83639
YQ
95932012-04-16 Yao Qi <yao@codesourcery.com>
9594
9595 * tracepoint.c (download_tracepoints): Moved to ...
9596 (cmd_qtstart): ... here.
9597
5f18041e
YQ
95982012-04-14 Yao Qi <yao@codesourcery.com>
9599
9600 * tracepoint.c: Include inttypes.h.
9601 (struct collect_memory_action): Use sized types.
9602 (struct tracepoint): Likewise.
9603 (cmd_qtdp, stop_tracing): Update print specifiers.
9604 (cmd_qtp, response_tracepoint): Likewise.
9605 (collect_data_at_tracepoint): Likewise.
9606 (collect_data_at_step): Likewise.
9607
55a8c076
YQ
96082012-04-14 Yao Qi <yao@codesourcery.com>
9609
9610 Import gnulib module inttypes.
9611 * aclocal.m4, config.in, configure: Regenerated.
9612
dc750257
YQ
96132012-04-14 Yao Qi <yao@codesourcery.com>
9614
9615 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9616 Makefile and config.status at last.
9617
0ab5faf9
YQ
96182012-04-13 Yao Qi <yao@codesourcery.com>
9619
9620 * tracepoint.c: Include stdint.h unconditionally.
9621
18f5fd81
TJB
96222012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9623
9624 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9625 on BFD_HAVE_SYS_PROCFS_TYPE.
9626 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9627 * configure: Regenerate.
9628 * config.in: Likewise.
9629
4d47af5c
L
96302012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9631
9632 * Makefile.in (clean): Also remove x32.c x32-linux.c
9633 x32-avx.c x32-avx-linux.c.
9634 (x32.o): New target.
9635 (x32.c): Likewise.
9636 (x32-linux.o): Likewise.
9637 (x32-linux.c): Likewise.
9638 (x32-avx.o): Likewise.
9639 (x32-avx.c): Likewise.
9640 (x32-avx-linux.o): Likewise.
9641 (x32-avx-linux.c): Likewise.
9642
9643 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9644 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9645 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9646 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9647 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9648 i386/x32-avx-linux.xml.
9649
9650 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9651 (init_registers_x32_avx_linux): Likwise.
9652 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9653 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9654
ecedbe58
PA
96552012-04-13 Pedro Alves <palves@redhat.com>
9656
9657 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9658 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9659 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9660 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9661 the sub-make.
9662
c92b5177
L
96632012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9664
9665 * linux-x86-low.c (compat_x32_clock_t): New.
9666 (compat_x32_siginfo_t): Likewise.
9667 (compat_x32_siginfo_from_siginfo): Likewise.
9668 (siginfo_from_compat_x32_siginfo): Likewise.
9669 (linux_is_elf64): Likewise.
9670 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9671 and siginfo_from_compat_x32_siginfo for x32.
9672 (x86_arch_setup): Set linux_is_elf64.
9673
214d508e
L
96742012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9675
9676 PR gdb/13969
9677 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9678 e_machine field.
9679 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9680 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9681 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9682 compatible with process.
9683
c9a1864a
YQ
96842012-04-12 Yao Qi <yao@codesourcery.com>
9685
9686 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9687 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9688 (install-only, install-info, clean): Handle sub dir gnulib.
9689 (all-lib, am--refresh): New targets.
9690 (memmem.o): Remove target.
9691 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9692 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9693 (AC_REPLACE_FUNCS): Remove memmem.
9694 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9695 (AC_OUTPUT): Generate Makefile in gnulib/.
9696 * aclocal.m4, config.in, configure: Regenerated.
9697
367ba2c2
MR
96982012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9699
9700 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9701
9d236627
PA
97022012-04-05 Pedro Alves <palves@redhat.com>
9703
9704 -Werror=strict-aliasing
9705
9706 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9707 pointer.
9708
111217b3
PA
97092012-04-04 Pedro Alves <palves@redhat.com>
9710
9711 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9712 (sparc_store_gregset_from_stack, sparc_store_gregset)
9713 (sparc_breakpoint_at): Fix formatting.
9714
8365dcf5
TJB
97152012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9716
9717 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9718 are available.
9719 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9720 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9721 * config.in: Regenerate.
9722 * configure: Likewise.
9723
689cc2ae
PA
97242012-03-29 Pedro Alves <palves@redhat.com>
9725
9726 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9727 Correct ptrace arguments.
9728
c14dfd32
PA
97292012-03-28 Pedro Alves <palves@redhat.com>
9730
9731 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9732 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9733 (IA64_FR1_REGNUM): New defines.
9734 (ia64_fetch_register): New.
9735 (the_low_target): Install it.
9736 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9737 field.
9738 * linux-low.c (linux_fetch_registers): Try the
9739 the_low_target.fetch_register hook first.
9740
9741 * linux-arm-low.c (the_low_target): Adjust.
9742 * linux-bfin-low.c (the_low_target): Adjust.
9743 * linux-cris-low.c (the_low_target): Adjust.
9744 * linux-crisv32-low.c (the_low_target): Adjust.
9745 * linux-m32r-low.c (the_low_target): Adjust.
9746 * linux-m68k-low.c (the_low_target): Adjust.
9747 * linux-mips-low.c (the_low_target): Adjust.
9748 * linux-ppc-low.c (the_low_target): Adjust.
9749 * linux-s390-low.c (the_low_target): Adjust.
9750 * linux-sh-low.c (the_low_target): Adjust.
9751 * linux-sparc-low.c (the_low_target): Adjust.
9752 * linux-tic6x-low.c (the_low_target): Adjust.
9753 * linux-x86-low.c (the_low_target): Adjust.
9754 * linux-xtensa-low.c (the_low_target): Adjust.
9755
63c88e13
PA
97562012-03-26 Pedro Alves <palves@redhat.com>
9757
9758 * server.c (handle_qxfer_libraries): Don't bail early if
9759 the_target->qxfer_libraries_svr4 is not NULL.
9760
fb723180
PA
97612012-03-26 Pedro Alves <palves@redhat.com>
9762
9763 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9764
0afae3cf
PA
97652012-03-23 Pedro Alves <palves@redhat.com>
9766
9767 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9768 "library-list-svr4" element's start tag when the the DSO list is
9769 empty.
9770
485f1ee4
PA
97712012-03-23 Pedro Alves <palves@redhat.com>
9772
9773 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9774 a variable whose type size is the same as the inferior's pointer
9775 size.
9776
a5362b9a
TS
97772012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9778
9779 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9780 struct siginfo.
9781 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9782 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9783 * linux-low.h: Include <signal.h>.
9784 (struct siginfo): Remove forward declaration.
9785 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9786 struct siginfo.
9787
d226c142
MF
97882012-03-21 Mike Frysinger <vapier@gentoo.org>
9789
9790 * .gitignore: Ignore more files.
9791
122f36ef
PA
97922012-03-19 Pedro Alves <palves@redhat.com>
9793 Jan Kratochvil <jan.kratochvil@redhat.com>
9794
9795 * server.c (cont_thread, general_thread): Add describing comments.
9796 (start_inferior): Clear `cont_thread'.
9797 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9798 of a process.
9799
fc3e5175
YQ
98002012-03-15 Yao Qi <yao@codesourcery.com>
9801
9802 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9803 handling to ...
9804 (cmd_qtdp): ... here.
9805
8d0d92cd
YQ
98062012-03-15 Yao Qi <yao@codesourcery.com>
9807
9808 * tracepoint.c (struct tracepoint_action_ops): New.
9809 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9810 (m_tracepoint_action_download): New.
9811 (r_tracepoint_action_download): New.
9812 (x_tracepoint_action_download): New.
9813 (l_tracepoint_action_download): New.
9814 (add_tracepoint_action): Install `action->ops' according type.
9815 (download_tracepoint_1): Move code `download' function pointer
9816 of various tracepoint_action_ops.
9817
87b0bb13
JK
98182012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9819
9820 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9821 linux_ptrace_attach_warnings.
9822
5f572dec
JK
98232012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9824
9825 * Makefile.in (linux-ptrace.o): New.
9826 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9827 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9828 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9829 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9830 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9831 of these targets.
9832 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9833
f4647387
YQ
98342012-03-08 Yao Qi <yao@codesourcery.com>
9835 Pedro Alves <palves@redhat.com>
9836
9837 Fix PR server/13392.
9838 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9839 offset of JMP insn.
9840 * tracepoint.c (remove_tracepoint): New.
9841 (cmd_qtdp): Call remove_tracepoint when failed to install.
9842
9b224c5e
PA
98432012-03-07 Pedro Alves <palves@redhat.com>
9844
9845 * linux-low.c (get_detach_signal): New.
9846 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9847 Pass on pending signals to PTRACE_DETACH. Check the result of the
9848 ptrace call.
9849 * server.c (program_signals, program_signals_p): New.
9850 (handle_general_set): Handle QProgramSignals.
9851 * server.h (program_signals, program_signals_p): Declare.
9852
e237a7e2
JK
98532012-03-05 Pedro Alves <palves@redhat.com>
9854 Jan Kratochvil <jan.kratochvil@redhat.com>
9855
9856 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9857 New comment why.
9858
5808517f
YQ
98592012-03-03 Yao Qi <yao@codesourcery.com>
9860
9861 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9862 agent_look_up_symbols.
9863
58b4daa5
YQ
98642012-03-03 Yao Qi <yao@codesourcery.com>
9865
9866 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9867 (linux-x86-low.o): Likewise.
9868 * server.h: Remove in_process_agent_loaded.
9869 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9870 common/agent.c.
9871 Update callers.
9872
8ffcbaaf
YQ
98732012-03-03 Yao Qi <yao@codesourcery.com>
9874
9875 * tracepoint.c (gdb_agent_capability): New global.
9876 (in_process_agent_loaded_ust): Renamed to
9877 `in_process_agent_supports_ust'.
9878 Update callers.
9879 (in_process_agent_supports_ust): Call agent_capability_check.
9880 (clear_installed_tracepoints): Assert that agent supports
9881 agent.
9882
d1feda86
YQ
98832012-03-03 Yao Qi <yao@codesourcery.com>
9884
9885 * linux-low.c (linux_supports_agent): New.
9886 (linux_target_ops): Initialize field `supports_agent' with
9887 linux_supports_agent.
9888 * target.h (struct target_ops) <supports_agent>: New.
9889 (target_supports_agent): New macro.
9890 * server.c (handle_general_set): Handle packet 'QAgent'.
9891 (handle_query): Send `QAgent+'.
9892 * Makefile.in (server.o): Depends on agent.h.
9893
2fa291ac
YQ
98942012-03-03 Yao Qi <yao@codesourcery.com>
9895
9896 * Makefile.in (OBS): Add agent.o.
9897 Add new rule for agent.o.
9898 Track dependence of tracepoint.c on agent.h.
9899 * tracepoint.c (run_inferior_command_1):
9900 (run_inferior_command): Call agent_run_command.
9901 (gdb_ust_connect_sync_socket): Deleted. Move it to
9902 common/agent.c.
9903 (resume_thread, stop_thread): Likewise.
9904 (gdb_ust_socket_init): Renamed to ...
9905 (gdb_agent_socket_init): ... New.
9906 (gdb_ust_thread): Renamed to ...
9907 (gdb_agent_helper_thread): ... New.
9908 (gdb_ust_init): Move some code to ...
9909 (gdb_agent_init): ... here. New.
9910 [HAVE_UST]: Call gdb_ust_init.
9911 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9912 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9913 * config.in, configure: Regenerated.
9914
05044653
PA
99152012-03-02 Pedro Alves <palves@redhat.com>
9916
9917 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9918 * linux-low.c (struct simple_pid_list): New.
9919 (stopped_pids): New a struct simple_pid_list pointer.
9920 (add_to_pid_list, pull_pid_from_list): New.
9921 (handle_extended_wait): Don't assume the first signal new children
9922 report is SIGSTOP. Adjust call to pull_pid_from_list.
9923 (linux_wait_for_lwp): Adjust.
9924
8d00225b
YQ
99252012-03-02 Yao Qi <yao@codesourcery.com>
9926
9927 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9928 debug log.
9929
19560ba5
YQ
99302012-03-02 Yao Qi <yao@codesourcery.com>
9931
9932 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9933 `stop_pc' and `tpoint'. Update caller.
9934
1faeff08
MR
99352012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9936
9937 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9938 * linux-low.c (use_linux_regsets): New macro.
9939 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9940 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9941 (linux_register_in_regsets): New function.
9942 (usr_fetch_inferior_registers): Skip registers covered by
9943 regsets.
9944 (usr_store_inferior_registers): Likewise.
9945 (usr_fetch_inferior_registers): New macro.
9946 (usr_store_inferior_registers): Likewise.
9947 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9948 (linux_store_registers): Likewise.
9949 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9950 prototype.
9951 (init_registers_mips64_dsp_linux): Likewise.
9952 (init_registers_mips_linux): New macro.
9953 (init_registers_mips_dsp_linux): Likewise.
9954 (mips_dsp_num_regs): Likewise.
9955 (DSP_BASE, DSP_CONTROL): New fallback macros.
9956 (mips_base_regs): New macro.
9957 (mips_regmap): Use it. Fix the size.
9958 (mips_dsp_regmap): New variable.
9959 (mips_dsp_regset_bitmap): Likewise.
9960 (mips_arch_setup): New function.
9961 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9962 than mips_regmap.
9963 (mips_cannot_store_register): Likewise.
9964 (the_low_target): Update .arch_setup, .num_regs and .regmap
9965 initializers. Add .regset_bitmap initializer.
9966 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9967 initializer.
9968 * linux-bfin-low.c (the_low_target): Likewise.
9969 * linux-cris-low.c (the_low_target): Likewise.
9970 * linux-crisv32-low.c (the_low_target): Likewise.
9971 * linux-ia64-low.c (the_low_target): Likewise.
9972 * linux-m32r-low.c (the_low_target): Likewise.
9973 * linux-m68k-low.c (the_low_target): Likewise.
9974 * linux-ppc-low.c (the_low_target): Likewise.
9975 * linux-s390-low.c (the_low_target): Likewise.
9976 * linux-sh-low.c (the_low_target): Likewise.
9977 * linux-sparc-low.c (the_low_target): Likewise.
9978 * linux-tic6x-low.c (the_low_target): Likewise.
9979 * linux-x86-low.c (the_low_target): Likewise.
9980 * linux-xtensa-low.c (the_low_target): Likewise.
9981 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9982 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9983 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9984 srv_xmlfiles.
9985 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9986 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9987
c03e6ccc
YQ
99882012-02-29 Yao Qi <yao@codesourcery.com>
9989 Pedro Alves <palves@redhat.com>
9990
9991 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9992 `step_over_finished' is true.
9993
644cebc9
PA
99942012-02-27 Pedro Alves <palves@redhat.com>
9995
9996 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9997 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9998
c14d7ab2
PA
99992012-02-27 Pedro Alves <palves@redhat.com>
10000
10001 PR server/9684
10002 * linux-low.c (pid_is_stopped): New.
10003 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10004
412c89dd
LM
100052012-02-25 Luis Machado <lgustavo@codesourcery.com>
10006
10007 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10008 of conditions.
10009
b745defe
MR
100102012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10011
10012 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10013
9f3a5c85
LM
100142012-02-24 Luis Machado <lgustavo@codesourcery>
10015
10016 * server.c (handle_query): Advertise support for target-side
10017 breakpoint condition evaluation.
10018 (process_point_options): New function.
10019 (process_serial_event): When inserting a breakpoint, check for
10020 a target-side condition that should be evaluated.
10021
10022 * mem-break.c: Include regcache.h and ax.h.
10023 (point_cond_list_t): New data structure.
10024 (breakpoint) <cond_list>: New field.
10025 (find_gdb_breakpoint_at): Make non-static.
10026 (delete_gdb_breakpoint_at): Clear any target-side
10027 conditions.
10028 (clear_gdb_breakpoint_conditions): New function.
10029 (add_condition_to_breakpoint): Likewise.
10030 (add_breakpoint_condition): Likewise.
10031 (gdb_condition_true_at_breakpoint): Likewise.
10032 (gdb_breakpoint_here): Return result directly instead
10033 of going through a local variable.
10034
10035 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10036 (clear_gdb_breakpoint_conditions): Likewise.
10037 (add_breakpoint_condition): Likewise.
10038 (gdb_condition_true_at_breakpoint): Likewise.
10039
10040 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10041 (need_step_over_p): Take target-side breakpoint condition into
10042 consideration.
10043
5e1dc496
LM
100442012-02-24 Luis Machado <lgustavo@codesourcery>
10045
10046 * server.h: Include tracepoint.h.
10047 (agent_mem_read, agent_get_trace_state_variable_value,
10048 agent_set_trace_state_variable_value,
10049 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10050 get_set_tsv_func_addr): New prototypes.
10051
10052 * ax.h: New include file.
10053 * ax.c: New source file.
10054
10055 * tracepoint.c: Include ax.h.
10056 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10057 agent_expr, eval_result_type): Move to ax.h.
10058 (parse_agent_expr): Rename to ...
10059 (gdb_parse_agent_expr): ... this, make it non-static and move
10060 to ax.h.
10061 (unparse_agent_expr) Rename to ...
10062 (gdb_unparse_agent_expr): ... this, make it non-static and move
10063 to ax.h.
10064 (eval_agent_expr): Rename to ...
10065 (eval_tracepoint_agent_expr): ... this.
10066 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10067 forward declarations.
10068 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10069 (agent_get_trace_state_variable_value): New function.
10070 (agent_set_trace_state_variable_value): New function.
10071 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10072 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10073 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10074 (condition_true_at_tracepoint): Likewise.
10075 (parse_agent_expr): Rename to ...
10076 (gdb_parse_agent_expr): ... this and move to ax.c.
10077 (unparse_agent_expr): Rename to ...
10078 (gdb_unparse_agent_expr): ... this and move to ax.c.
10079 (gdb_agent_op_name): Move to ax.c.
10080 (eval_agent_expr): Rename to ...
10081 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10082 and move to ax.c.
10083 (eval_tracepoint_agent_expr): New function.
10084 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10085 non-static.
5e1dc496
LM
10086 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10087 ax.c.
10088 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10089 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10090 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10091 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10092 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10093 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10094 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10095 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10096 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10097 (compile_bytecodes): Remove forward declaration.
10098 (is_goto_target): Move to ax.c.
10099 (compile_bytecodes): Move to ax.c and call
10100 agent_get_trace_state_variable_value (...) and
10101 agent_set_trace_state_variable_value (...).
10102
10103 * Makefile.in: Update ax.c and IPA dependencies.
10104
277e4e52
PA
101052012-02-24 Pedro Alves <palves@redhat.com>
10106
10107 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10108 (cmd_bigqtbuffer_circular): ... this. Only handle
10109 'QTBuffer:circular:'.
10110 (handle_tracepoint_general_set): Adjust.
10111
bf4c19f7
YQ
101122012-02-16 Yao Qi <yao@codesourcery.com>
10113
10114 * inferiors.c: Move code to ...
10115 * dll.c: .... here. New.
10116 * server.h: Declare clear_dlls.
10117 * Makefile.in (SFILES): Add dll.c.
10118 (OBS): Add dll.o
10119 (dll.o): New rule.
10120
d73f2619
YQ
101212012-02-11 Yao Qi <yao@codesourcery.com>
10122
10123 * server.c: (handle_monitor_command): Add a new parameter
10124 `own_buf'.
10125 (handle_query): Update caller.
10126
f8255c2a
JB
101272012-02-09 Joel Brobecker <brobecker@adacore.com>
10128
10129 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10130 * configure, config.in: Regenerate.
10131 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10132 is not defined.
10133
da84f473
PA
101342012-02-02 Pedro Alves <palves@redhat.com>
10135
10136 Try SIGKILL first, then PTRACE_KILL.
10137 * linux-low.c (linux_kill_one_lwp): New.
10138 (linux_kill_one_lwp): Rename to ...
10139 (kill_one_lwp_callback): ... this. Use the new
10140 linux_kill_one_lwp.
10141
e886a173
PA
101422012-02-02 Pedro Alves <palves@redhat.com>
10143
10144 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10145 inferior.
10146
be07f1a2
PA
101472012-01-27 Pedro Alves <palves@redhat.com>
10148
10149 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10150 (elf_64_file_p): Make static.
10151 (linux_pid_exe_is_elf_64_file): New.
10152 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10153 Delete declarations.
10154 (linux_pid_exe_is_elf_64_file): Declare.
10155 * linux-x86-low.c (x86_arch_setup): Use
10156 linux_pid_exe_is_elf_64_file.
10157
d8301ad1
JK
101582012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10159
10160 * linux-low.c (linux_wait_for_event_1): Rename to ...
10161 (linux_wait_for_event): ... here and merge it with former
10162 linux_wait_for_event - new variable wait_ptid, use it.
10163 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10164
01b17894
PA
101652012-01-23 Pedro Alves <palves@redhat.com>
10166
10167 * server.c (main): Avoid yet another case of infinite loop while
10168 detaching/killing after a longjmp.
10169
e825046f
JK
101702012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10171
10172 Code cleanup.
10173 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10174
b9e7b9c3
UW
101752012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10176
10177 * hostio.c (handle_readlink): New function.
10178 (handle_vFile): Call it to handle "vFile:readlink" packets.
10179
901f9912
UW
101802012-01-20 Pedro Alves <palves@redhat.com>
10181 Ulrich Weigand <ulrich.weigand@linaro.org>
10182
10183 * server.c (handle_v_requests): Only support vAttach and vRun to
10184 start multiple processes when in extended protocol mode.
10185
fc1ab1a0
PA
101862012-01-17 Pedro Alves <palves@redhat.com>
10187
10188 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10189 memalign plus mprotect to allocate the scratch buffer.
10190
7d5d4e98
PA
101912012-01-13 Pedro Alves <palves@redhat.com>
10192
10193 * server.c (attach_inferior): Clear `cont_thread'.
10194
f128d5e9
PA
101952012-01-13 Pedro Alves <palves@redhat.com>
10196
10197 * server.c (main): Avoid infinite loop while detaching/killing
10198 after a longjmp.
10199
06db92f0
DE
102002012-01-09 Doug Evans <dje@google.com>
10201
10202 * server.c (start_inferior): Set last_ptid in --wrapper case.
10203
32d92999
YQ
102042012-01-06 Yao Qi <yao@codesourcery.com>
10205
10206 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10207 defined.
10208 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10209
5e0a92a9
YQ
102102012-01-04 Yao Qi <yao@codesourcery.com>
10211
10212 * tracepoint.c (cmd_qtdp): Print debug message
10213 for static tracepoint.
10214
ae639e8c
YQ
102152012-01-04 Yao Qi <yao@codesourcery.com>
10216
10217 * tracepoint.c (trace_vdebug): Differentiate debug message
10218 between gdbserver and IPA.
10219
f72429c5
YQ
102202012-01-03 Yao Qi <yao@codesourcery.com>
10221
10222 * tracepoint.c (tracepoint_was_hit): Don't collect for
10223 static tracepoint.
10224
12c3e59c
JB
102252012-01-02 Joel Brobecker <brobecker@adacore.com>
10226
10227 * terminal.h: Reformat copyright header.
10228
67827812
JB
102292012-01-02 Joel Brobecker <brobecker@adacore.com>
10230
10231 * server.c (gdbserver_version): Update copyright year.
10232 * gdbreplay.c (gdbreplay_version): Likewise.
10233
3e52c33d
JK
102342011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10235
10236 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10237
10238 Revert:
10239 2011-12-18 Hui Zhu <teawater@gmail.com>
10240 * linux-low.c (linux_create_inferior): Save return value to ret.
10241
66f1260e
HZ
102422011-12-18 Hui Zhu <teawater@gmail.com>
10243
10244 * linux-low.c (linux_create_inferior): Save return value to ret.
10245
e77616d7
DE
102462011-12-16 Doug Evans <dje@google.com>
10247
e7b06c57
DE
10248 * linux-low.c (linux_create_inferior): If stdio connection,
10249 redirect stdin from /dev/null, stdout to stderr.
10250 * remote-utils.c (remote_is_stdio): New static global.
10251 (remote_connection_is_stdio): New function.
10252 (remote_prepare): Handle stdio connection.
10253 (remote_open): Ditto.
10254 (remote_close): Don't close stdin for stdio connections.
10255 (read_prim,write_prim): New functions. Replace all calls to
10256 read/write to these.
10257 * server.c (main): Watch for "-" argument. Move call to
10258 remote_prepare before start_inferior.
10259 * server.h (STDIO_CONNECTION_NAME): New macro.
10260 (remote_connection_is_stdio): Declare.
10261
e77616d7
DE
10262 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10263 in debugging output.
10264
82067193
YQ
102652011-12-15 Yao Qi <yao@codesourcery.com>
10266
10267 * tracepoint.c: Include sys/syscall.h.
10268 (gdb_ust_thread): Remove preprocessor conditional.
10269
82bfbe7e
PA
102702011-12-14 Pedro Alves <pedro@codesourcery.com>
10271
10272 * linux-low.c (linux_detach_one_lwp): Call
10273 the_low_target.prepare_to_resume before detaching.
10274
712c6575
YQ
102752011-12-14 Yao Qi <yao@codesourcery.com>
10276
10277 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10278 of write.
10279
d54d1edf
YQ
102802011-12-14 Yao Qi <yao@codesourcery.com>
10281
10282 * i386-low.c (i386_low_stopped_data_address): Initialize local
10283 variable `control'.
10284
6210a125
PA
102852011-12-13 Pedro Alves <pedro@codesourcery.com>
10286
10287 PR remote/13492
10288
10289 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10290 DR_CONTROL unless necessary. Extend comments.
10291 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10292 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10293
2ece8244
YQ
102942011-12-13 Yao Qi <yao@codesourcery.com>
10295
10296 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10297 macros.
10298 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10299
784867a5
JK
103002011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10301
10302 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10303 Print new debug message for such case.
10304
6bf36717
JK
103052011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10306
10307 Fix overlapping memcpy.
10308 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10309 the read_inferior_memory transfer.
10310 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10311 write_inferior_memory transfer.
10312 (set_fast_tracepoint_jump): New variable buf. Use it for the
10313 read_inferior_memory and write_inferior_memory transfers.
10314 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10315 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10316 Use it for the write_inferior_memory transfer.
10317 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10318 buffers.
10319
50275556
MR
103202011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10321
10322 * linux-low.c (fetch_register, store_register): Make code
10323 consistent, fix formatting.
10324
7325beb4
MR
103252011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10326
10327 * linux-low.c (usr_store_inferior_registers): Factor out code
10328 to handle individual registers into...
10329 (store_register): ... this new function.
10330
c642a434
UW
103312011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10332
10333 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10334 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10335 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10336 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10337 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10338 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10339 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10340 (srv_xmlfiles): Add new XML files.
10341
10342 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10343 and <sys/uio.h>.
10344 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10345 (init_registers_s390_linux32v1): Add prototype.
10346 (init_registers_s390_linux32v2): Likewise.
10347 (init_registers_s390_linux64v1): Likewise.
10348 (init_registers_s390_linux64v2): Likewise.
10349 (init_registers_s390x_linux64v1): Likewise.
10350 (init_registers_s390x_linux64v2): Likewise.
10351 (s390_num_regs): Increment to 52.
10352 (s390_regmap): Add orig_r2 register.
10353 (s390_num_regs_3264): Increment to 68.
10354 (s390_regmap_3264): Add orig_r2 register.
10355 (s390_collect_ptrace_register): Handle orig_r2 register.
10356 (s390_supply_ptrace_register): Likewise.
10357 (s390_fill_last_break): New function.
10358 (s390_store_last_break): Likewise.
10359 (s390_fill_system_call): New function.
10360 (s390_store_system_call): Likewise.
10361 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10362 register sets.
10363 (s390_check_regset): New function.
10364 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10365 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10366 Update target_regsets for available register sets.
10367
2268b414
JK
103682011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10369 Jan Kratochvil <jan.kratochvil@redhat.com>
10370
10371 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10372 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10373 New.
10374 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10375 * linux-low.h (struct process_info_private): New member r_debug.
10376 * server.c (handle_qxfer_libraries): Call
10377 the_target->qxfer_libraries_svr4.
10378 (handle_qxfer_libraries_svr4): New function.
10379 (qxfer_packets): New entry "libraries-svr4".
10380 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10381 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10382 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10383 PACKET_qXfer_libraries_svr4.
10384
d6db1fab
UW
103852011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10386
10387 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10388 PSW address/mask between 8-byte and 16-byte formats.
10389 (s390_supply_ptrace_register): Likewise.
10390 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10391 basic addressing mode bit.
10392
242f5f1c
SS
103932011-11-24 Stan Shebs <stan@codesourcery.com>
10394
10395 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10396
f196051f
SS
103972011-11-17 Stan Shebs <stan@codesourcery.com>
10398
10399 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10400 (tracing_start_time): New global.
10401 (tracing_stop_time): New global.
10402 (tracing_user_name): New global.
10403 (tracing_notes): New global.
10404 (tracing_stop_note): New global.
10405 (cmd_qtstart): Set traceframe_usage, start_time.
10406 (stop_tracing): Set stop_time.
10407 (cmd_qtstatus): Report additional status.
10408 (cmd_qtp): New function.
10409 (handle_tracepoint_query): Call it.
10410 (cmd_qtnotes): New function.
10411 (handle_tracepoint_general_set): Call it.
10412 (get_timestamp): Rename from tsv_get_timestamp.
10413
405f8e94
SS
104142011-11-14 Stan Shebs <stan@codesourcery.com>
10415 Kwok Cheung Yeung <kcy@codesourcery.com>
10416
10417 * linux-x86-low.c (small_jump_insn): New.
10418 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10419 trampoline and error message, build a trampoline and issue a small
10420 jump instruction to it.
10421 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10422 trampoline and error message.
10423 (x86_get_min_fast_tracepoint_insn_len): New.
10424 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10425 * linux-low.h (struct linux_target_ops): Add arguments to
10426 install_fast_tracepoint_jump_pad operation, add new operation.
10427 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10428 arguments.
10429 (linux_get_min_fast_tracepoint_insn_len): New function.
10430 (linux_target_op): Add new operation.
10431 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10432 (gdb_trampoline_buffer_end): Ditto.
10433 (gdb_trampoline_buffer_error): Ditto.
10434 (struct ipa_sym_addresses): Add fields for new IPA variables.
10435 (symbol_list): Add entries for new IPA variables.
10436 (struct tracepoint): Add fields to hold the address range of the
10437 trampoline used by the tracepoint.
10438 (trampoline_buffer_head): New static variable.
10439 (trampoline_buffer_tail): Ditto.
10440 (claim_trampoline_space): New function.
10441 (have_fast_tracepoint_trampoline_buffer): New function.
10442 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10443 structure.
10444 (install_fast_tracepoint): Ditto, also add error buffer argument.
10445 (cmd_qtminftpilen): New function.
10446 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10447 (fast_tracepoint_from_trampoline_address): New function.
10448 (fast_tracepoint_collecting): Handle trampoline as part of jump
10449 pad space.
10450 (set_trampoline_buffer_space): New function.
10451 (initialize_tracepoint): Initialize new IPA variables.
10452 * target.h (struct target_ops): Add arguments to
10453 install_fast_tracepoint_jump_pad operation, add new
10454 get_min_fast_tracepoint_insn_len operation.
10455 (target_get_min_fast_tracepoint_insn_len): New.
10456 (install_fast_tracepoint_jump_pad): Add arguments.
10457 * server.h (IPA_BUFSIZ): Define.
10458 * linux-i386-ipa.c: Include extra header files.
10459 (initialize_fast_tracepoint_trampoline_buffer): New function.
10460 (initialize_low_tracepoint): Call it.
10461 * server.h (set_trampoline_buffer_space): Declare.
10462 (claim_trampoline_space): Ditto.
10463 (have_fast_tracepoint_trampoline_buffer): Ditto.
10464
1e4d1764
YQ
104652011-11-14 Yao Qi <yao@codesourcery.com>
10466
10467 * server.c (handle_query): Handle InstallInTrace for qSupported.
10468 * tracepoint.c (add_tracepoint): Sort list.
10469 (install_tracepoint, download_tracepoint): New.
10470 (cmd_qtdp): Call them to install and download tracepoints.
10471 (sort_tracepoints): Removed.
10472 (cmd_qtstart): Update.
10473
5c73ff4e
YQ
104742011-11-14 Yao Qi <yao@codesourcery.com>
10475
10476 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10477 * mem-break.h: Declare.
10478 * tracepoint.c (cmd_qtstart): Move some code to ...
10479 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10480 New.
10481 (download_tracepoints): Move some code to ...
10482 (download_tracepoint_1): ... here. New.
10483
86a30030
YQ
104842011-11-08 Yao Qi <yao@codesourcery.com>
10485
10486 * remote-utils.c (relocate_instruction): A comment fix.
10487
8d26e50c
JB
104882011-11-07 Joel Brobecker <brobecker@adacore.com>
10489
10490 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10491 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10492 dr_status_mirror and dr_control_mirror from debug_reg_state.
10493 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10494 (i386_initial_stuff): Remove use of deleted globals.
10495 (i386_get_thread_context, i386_set_thread_context,
10496 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10497 from debug_reg_state.
10498
a59306a3
YQ
104992011-11-05 Yao Qi <yao@codesourcery.com>
10500
10501 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10502 address as TPOINT's.
10503
3065dfb6
SS
105042011-11-02 Stan Shebs <stan@codesourcery.com>
10505
10506 * tracepoint.c (agent_mem_read_string): New function.
10507 (eval_agent_expr): Call it for tracenz.
10508 * server.c (handle_query): Report support for tracenz.
10509
fd0d8c7c
YQ
105102011-11-02 Yao Qi <yao@codesourcery.com>
10511
10512 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10513
609086b1
YQ
105142011-11-02 Yao Qi <yao@codesourcery.com>
10515
10516 * target.h: Fix a typo in comment.
10517
b9fd1791
PA
105182011-10-31 Pedro Alves <pedro@codesourcery.com>
10519
10520 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10521 clobber the breakpoints' shadows with fast tracepoint jumps.
10522 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10523 * target.c (write_inferior_memory): Also pass MYADDR down to
10524 check_mem_write.
10525
03583c20
UW
105262011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10527
10528 * configure.ac: Check support for personality routine.
10529 * configure: Regenerate.
10530 * config.in: Likewise.
10531 * linux-low.c: Include <sys/personality.h>.
10532 Define ADDR_NO_RANDOMIZE if necessary.
10533 (linux_create_inferior): Disable address space randomization when
10534 forking inferior, if requested.
10535 (linux_supports_disable_randomization): New function.
10536 (linux_target_ops): Install it.
10537 * server.h (disable_randomization): Declare.
10538 * server.c (disable_randomization): New global variable.
10539 (handle_general_set): Handle QDisableRandomization.
10540 (handle_query): Likewise for qSupported.
10541 (main): Support --disable-randomization and --no-disable-randomization
10542 command line arguments.
10543 * target.h (struct target_ops): Add supports_disable_randomization.
10544 (target_supports_disable_randomization): New macro.
10545
723b724b
MF
105462011-09-29 Mike Frysinger <vapier@gentoo.org>
10547
10548 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10549 ifdef check.
10550 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10551 [!PT_GETDSBT] (target_loadmap): New definition.
10552 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10553 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10554 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10555 and PT_GETDSBT to LINUX_LOADMAP.
10556 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10557 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10558
55329a5c 105592011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10560
10561 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10562 (arm_linux_hwbp_cap): New static variable.
10563 (arm_linux_get_hwbp_cap): Replace by ...
10564 (arm_linux_init_hwbp_cap): ... this new function.
10565 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10566 (arm_linux_get_hw_watchpoint_count): Likewise.
10567 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10568 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10569 (arm_prepare_to_resume): Use perror_with_name instead of error.
10570
55329a5c 105712011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10572
10573 * linux-arm-low.c: Include <signal.h>.
10574 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10575 (struct arm_linux_hwbp_cap): New data type.
10576 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10577 (struct arm_linux_hw_breakpoint): New data type.
10578 (MAX_BPTS, MAX_WPTS): Define.
10579 (struct arch_process_info, struct arch_lwp_info): New data types.
10580 (arm_linux_get_hwbp_cap): New function.
10581 (arm_linux_get_hw_breakpoint_count): Likewise.
10582 (arm_linux_get_hw_watchpoint_count): Likewise.
10583 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10584 (arm_hwbp_control_initialize): Likewise.
10585 (arm_hwbp_control_is_enabled): Likewise.
10586 (arm_hwbp_control_is_initialized): Likewise.
10587 (arm_hwbp_control_disable): Likewise.
10588 (arm_linux_hw_breakpoint_equal): Likewise.
10589 (arm_linux_hw_point_initialize): Likewise.
10590 (struct update_registers_data): New data structure.
10591 (update_registers_callback: New function.
10592 (arm_insert_point): Likewise.
10593 (arm_remove_point): Likewise.
10594 (arm_stopped_by_watchpoint): Likewise.
10595 (arm_stopped_data_address): Likewise.
10596 (arm_new_process): Likewise.
10597 (arm_new_thread): Likewise.
10598 (arm_prepare_to_resume): Likewise.
10599 (the_low_target): Register arm_insert_point, arm_remove_point,
10600 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10601 arm_new_thread, and arm_prepare_to_resume.
10602
6b9801d4
SS
106032011-09-15 Stan Shebs <stan@codesourcery.com>
10604
10605 * server.h (struct emit_ops): Add compare-goto fields.
10606 * tracepoint.c (gdb_agent_op_sizes): New table.
10607 (emit_eq_goto): New function.
10608 (emit_ne_goto): New function.
10609 (emit_lt_goto): New function.
10610 (emit_le_goto): New function.
10611 (emit_gt_goto): New function.
10612 (emit_ge_goto): New function.
10613 (is_goto_target): New function.
10614 (compile_bytecodes): Recognize special cases of compare-goto
10615 combinations and call specialized emitters for them.
10616 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10617 (amd64_emit_ne_goto): New function.
10618 (amd64_emit_lt_goto): New function.
10619 (amd64_emit_le_goto): New function.
10620 (amd64_emit_gt_goto): New function.
10621 (amd64_emit_ge_goto): New function.
10622 (amd64_emit_ops): Add the new functions.
10623 (i386_emit_eq_goto): New function.
10624 (i386_emit_ne_goto): New function.
10625 (i386_emit_lt_goto): New function.
10626 (i386_emit_le_goto): New function.
10627 (i386_emit_gt_goto): New function.
10628 (i386_emit_ge_goto): New function.
10629 (i386_emit_ops): Add the new functions.
10630
bf15cbda
SS
106312011-09-08 Stan Shebs <stan@codesourcery.com>
10632
10633 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10634 (i386_emit_epilogue): Restore %ebx.
10635
943ca1dd
JZ
106362011-08-31 Jie Zhang <jzhang918@gmail.com>
10637
10638 * server.c (step_thread): Remove definition.
10639 (process_serial_event): Don't handle Hs.
10640 * server.h (step_thread): Remove declaration.
10641 * target.c (set_desired_inferior): Remove use of step_thread.
10642
e3deef73
LM
106432011-08-24 Luis Machado <lgustavo@codesourcery.com>
10644
10645 * linux-low.c: Include linux-procfs.h.
10646 (linux_attach_lwp_1): Update comments.
10647 (linux_attach): Scan for existing threads when attaching to a
10648 process that is the tgid.
10649 * Makefile.in: Update dependencies.
10650
13da1c97
LM
106512011-08-24 Luis Machado <lgustavo@codesourcery.com>
10652
10653 * configure.srv: Add linux-procfs.o dependencies.
10654
881127c9
YQ
106552011-08-14 Yao Qi <yao@codesourcery.com>
10656
10657 * target.h (struct target_ops): Fix indent.
10658 * win32-low.c (win32_target_ops): Fix comment.
10659
58dbd541
YQ
106602011-08-14 Andrew Jenner <andrew@codesourcery.com>
10661 Yao Qi <yao@codesourcery.com>
10662
10663 * Makefile.in (clean): Remove tic6x-*.c files.
10664 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10665 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10666 (tic6x-c64xp-linux.c): Likewise.
10667 * configure.srv: Add support for tic6x-*-uclinux.
10668 * linux-tic6x-low.c: New.
10669 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10670
78d85199
YQ
106712011-08-14 Andrew Stubbs <ams@codesourcery.com>
10672 Yao Qi <yao@codesourcery.com>
10673
10674 * target.h (struct target_ops): Add read_loadmap.
10675 * linux-low.c (struct target_loadseg): New type.
10676 (struct target_loadmap): New type.
10677 (linux_read_loadmap): New function.
10678 (linux_target_ops): Add linux_read_loadmap.
10679 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10680 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10681 to NULL.
78d85199 10682
a959a88d
EZ
106832011-08-05 Eli Zaretskii <eliz@gnu.org>
10684
10685 * win32-low.c: Include <stdint.h>.
10686
1ced966e
PA
106872011-07-22 Pedro Alves <pedro@codesourcery.com>
10688
10689 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10690 to the inferior here.
10691 (i386_remove_aligned_watchpoint): Ditto.
10692 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10693 fit part of the watchpoint in the debug registers.
10694 (i386_update_inferior_debug_regs): New.
10695 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10696 registers, and only update the inferior on success.
10697 (i386_low_remove_watchpoint): Ditto.
10698
d26e3629
KY
106992011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10700
10701 * linux-low.c (compare_ints, unique, list_threads, show_process,
10702 linux_core_of_thread): Delete.
10703 (linux_target_ops): Change linux_core_of_thread to
10704 linux_common_core_of_thread.
10705 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10706 * utils.c (malloc_failure): Change type of argument.
10707 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10708 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10709 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10710 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10711 (IPA_OBJS): Add common-utils-ipa.o.
10712 (ptid_h, linux_osdata_h): New macros.
10713 (server_h): Add common/common-utils.h, common/xml-utils.h,
10714 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10715 common/ptid.h.
10716 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10717 ptid.o, buffer.o): New rules.
10718 (linux-low.o): Add common/linux-osdata.h as a dependency.
10719 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10720 * configure.ac: Add AC_HEADER_DIRENT check.
10721 * config.in: Regenerate.
10722 * configure: Regenerate.
10723 * remote-utils.c (xml_escape_text): Delete.
10724 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10725 buffer_xml_printf): Move to common/buffer.c.
10726 * server.c (main): Remove call to initialize_inferiors.
10727 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10728 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10729 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10730 internal_error, gdb_assert, gdb_assert_fail): Delete.
10731 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10732 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10733 common/buffer.h.
10734 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10735 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10736 initialize_inferiors): Delete.
10737
2275a1a7
PA
107382011-07-20 Pedro Alves <pedro@codesourcery.com>
10739
10740 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10741 symbol error.
10742
0a5b1e09
PA
107432011-05-31 Pedro Alves <pedro@codesourcery.com>
10744
10745 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10746 assertion.
10747 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10748
6938fd34
YQ
107492011-05-26 Yao Qi <yao@codesourcery.com>
10750
10751 * Makefile.in (thread-db.o): Track dependence to
10752 common/gdb_thread_db.h.
10753 * thread-db.c: include gdb_thread_db.h from right place.
10754
b481f9e0
TT
107552011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10756
10757 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10758 __FILE__ and __LINE__ to internal_error.
10759
98a5dd13
DE
107602011-05-13 Doug Evans <dje@google.com>
10761
10762 * thread-db.c (try_thread_db_load_from_sdir): New function.
10763 (try_thread_db_load_from_dir): New function.
10764 (thread_db_load_search): Handle $sdir, ignore $pdir.
10765 Remove trying of system directories if search of
10766 libthread-db-search-path fails, that is now done via $sdir.
10767
d248b706
KY
107682011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10769
10770 * server.c (handle_query): Add EnableDisableTracepoints to the list
10771 of supported features.
43aaf8b6 10772 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10773 tracepoints.
43aaf8b6
PA
10774 (cmd_qtenable_disable): New.
10775 (cmd_qtstart): Install tracepoints even if disabled.
10776 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10777 receiving a QTEnable or QTDisable packet.
10778 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10779 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10780 tracepoints.
10781 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10782
84e578fb
DE
107832011-05-10 Doug Evans <dje@google.com>
10784
10785 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10786
71f55dd8
DE
107872011-05-04 Doug Evans <dje@google.com>
10788
10789 * linux-low.c (linux_join): Skip process lookup.
10790 * spu-low.c (spu_join): Ditto.
10791 * server.c (join_inferiors_callback): Delete.
10792 (process_serial_event): For 'D' packet (detach) call join_inferior
10793 directly.
10794
4d393d60
JM
107952011-05-04 Joseph Myers <joseph@codesourcery.com>
10796
10797 * README: Don't mention xscale*-*-linux*.
10798 * configure.srv (xscale*-*-linux*): Don't handle target.
10799
b00ad6ff
NF
108002011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10801
10802 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10803 casting pointers.
10804 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10805 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10806 (i386_emit_void_call_2): Likewise.
10807
af96c192
YQ
108082011-04-26 Yao Qi <yao@codesourcery.com>
10809
43aaf8b6
PA
10810 * linux-low.c: Move common macros to linux-ptrace.h.
10811 Include linux-ptrace.h.
af96c192
YQ
10812 * Makefile.in (linux_ptrace_h): New.
10813 (linux-low.o): Depends on linux-ptrace.h.
10814
03f2bd59
JK
108152011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10816
10817 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10818 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10819 (remote_prepare): New function with most of the TCP code from ...
10820 (remote_open): ... here. Detect PORT here unconditionally. Move also
10821 setting transport_is_reliable.
10822 * server.c (run_once): New variable.
10823 (gdbserver_usage): Document it.
10824 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10825 the first run if RUN_ONCE.
10826 * server.h (run_once, remote_prepare): New declarations.
10827
7a9dd1b2
TT
108282011-04-19 Tom Tromey <tromey@redhat.com>
10829
10830 * win32-low.c (handle_load_dll): Remove duplicate "the".
10831
81239425
PM
108322011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10833
10834 Remove support for old Cygwin 1.5 versions.
10835 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10836 function to avoid warning.
10837 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10838 warning.
10839
9e0627f1
PM
108402011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10841
10842 * gdbserver/server.h (Macro _): Define it if not available.
10843
588eebee
MS
108442011-03-14 Michael Snyder <msnyder@vmware.com>
10845
348af9f7 10846 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10847
43f70d4c
JB
108482011-03-10 Joel Brobecker <brobecker@adacore.com>
10849
10850 * Makefile.in (maintainer-clean realclean distclean): Remove
10851 "make ... subdir_do" command.
10852
348af9f7
MS
108532011-03-10 Michael Snyder <msnyder@vmware.com>
10854
10855 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10856
10857 * server.c (handle_v_run): Free alloced buffer on early return.
10858
e637a4f5
YQ
108592011-03-09 Yao Qi <yao@codesourcery.com>
10860
10861 Revert:
10862 2011-03-04 Yao Qi <yao@codesourcery.com>
10863
10864 * Makefile.in: Remove GNU make feature --directory.
10865
10866 2011-03-05 Yao Qi <yao@codesourcery.com>
10867
10868 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10869 (subdir_do): New make target. Copied from gdb/Makefile.
10870 (maintainer-clean, realclean, distclean, clean): Call corresponding
10871 make targets in common/Makefile.
10872
10873 2011-02-11 Yao Qi <yao@codesourcery.com>
10874
10875 * configure.ac: Call AC_PROG_RANLIB.
10876 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10877 * configure: Regenerate.
10878
e6edda56
JK
108792011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10880
10881 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10882
e5141119
JB
108832011-03-06 Yao Qi <yao@codesourcery.com>
10884
10885 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10886
64794aa4
JB
108872011-03-05 Yao Qi <yao@codesourcery.com>
10888
10889 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10890 (subdir_do): New make target. Copied from gdb/Makefile.
10891 (maintainer-clean, realclean, distclean, clean): Call corresponding
10892 make targets in common/Makefile.
10893
7a762829
YQ
108942011-03-04 Yao Qi <yao@codesourcery.com>
10895
10896 * Makefile.in: Remove GNU make feature --directory.
10897
348af9f7
MS
108982011-03-04 Michael Snyder <msnyder@vmware.com>
10899
10900 * server.c (queue_stop_reply): Call xmalloc not malloc.
10901
109022011-03-02 Michael Snyder <msnyder@vmware.com>
10903
10904 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10905
9f72fee2
MS
109062011-02-28 Michael Snyder <msnyder@vmware.com>
10907
588eebee
MS
10908 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10909 (cmd_qtframe): Ditto.
10910 (cmd_qtbuffer): Ditto.
10911 (cmd_bigqtbuffer): Ditto.
10912
9f72fee2
MS
10913 * utils.c (decimal2str): Initialize 'width' to nine, then
10914 don't mess with it.
10915
8040bd49
UW
109162011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10917
10918 * hostio.c (require_data): Free *data, not data.
10919
7e52cbd0
JK
109202011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10921
10922 * hostio.c (require_data): Use free, not xfree.
10923
9130f83e
MS
109242011-02-27 Michael Snyder <msnyder@vmware.com>
10925
4b812f4e
MS
10926 * server.c (handle_query): Discard unused value.
10927
9130f83e
MS
10928 * hostio.c (require_data): Free malloc memory before returning
10929 error.
10930
69d37113
MS
109312011-02-26 Michael Snyder <msnyder@vmware.com>
10932
10933 * linux-low.c (list_threads): Call closedir for dirent.
10934
35f5825a
MS
109352011-02-27 Michael Snyder <msnyder@vmware.com>
10936
2a589cef
MS
10937 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10938 a case statement falls through.
10939
0adea5f7
MS
10940 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10941
35f5825a
MS
10942 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10943 in comparison.
10944
238f1c74
MS
109452011-02-26 Michael Snyder <msnyder@vmware.com>
10946
10947 * utils.c (decimal2str): Eliminate dead code and dead param.
10948 (pulongest): Drop dead param from call to decimal2str.
10949 (plongest): Ditto.
10950
633ff500
JB
109512011-02-24 Joel Brobecker <brobecker@adacore.com>
10952
10953 Revert the following patch (not approved yet):
10954 2011-02-21 Hui Zhu <teawater@gmail.com>
10955 * tracepoint.c (tp_printf): New function.
10956 (eval_agent_expr): Handle gdb_agent_op_printf.
10957
f9c6ff72
HZ
109582011-02-21 Hui Zhu <teawater@gmail.com>
10959
10960 * tracepoint.c (tp_printf): New function.
10961 (eval_agent_expr): Handle gdb_agent_op_printf.
10962
94d5e490
TT
109632011-02-18 Tom Tromey <tromey@redhat.com>
10964
10965 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10966 (tracepoint.o): Likewise.
10967 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10968 (gdb_agent_op_names): Likewise.
10969
c7f96d2b
TT
109702011-02-18 Tom Tromey <tromey@redhat.com>
10971
10972 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10973 gdb_agent_op_rot>: New constants.
10974 (gdb_agent_op_names): Add pick and roll.
10975 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10976 cases.
10977
0feedb2c
JK
109782011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10979
10980 * aclocal.m4: Regenerated with aclocal-1.11.1.
10981
b3b9301e
PA
109822011-02-14 Pedro Alves <pedro@codesourcery.com>
10983
10984 * server.c (handle_qxfer_traceframe_info): New.
10985 (qxfer_packets): Register "traceframe-info".
10986 (handle_query): Report support for qXfer:traceframe-info:read+.
10987 * tracepoint.c (match_blocktype): New.
10988 (traceframe_find_block_type): Rename to ...
10989 (traceframe_walk_blocks): ... this. Add callback filter argument,
10990 and use it.
10991 (traceframe_find_block_type): New, reimplemented on top of
10992 traceframe_walk_blocks.
10993 (build_traceframe_info_xml): New.
10994 (traceframe_read_info): New.
10995 * server.h (traceframe_read_info): Declare.
10996
4f3e6fb7
YQ
109972011-02-11 Yao Qi <yao@codesourcery.com>
10998
10999 * configure.ac: Call AC_PROG_RANLIB.
11000 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11001 * configure: Regenerate.
11002
764880b7
PA
110032011-02-07 Pedro Alves <pedro@codesourcery.com>
11004
11005 * server.c (gdb_read_memory): Change return semantics to allow
11006 partial transfers.
11007 (handle_search_memory_1): Adjust.
11008 (process_serial_event) <'m' packet>: Handle partial transfers.
11009 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11010
1c79eb8a
PA
110112011-01-28 Pedro Alves <pedro@codesourcery.com>
11012
11013 * regcache.c (init_register_cache): Initialize
11014 regcache->register_status.
11015 (free_register_cache): Release regcache->register_status.
11016 (regcache_cpy): Copy register_status.
11017 (registers_to_string): Print 'x's for unavailable registers.
11018 (supply_register): Mark the register's status valid or
11019 unavailable, depending on whether a buffer was passed in or not.
11020 (supply_register_zeroed): New.
11021 (supply_regblock): Mark the registers' status valid or
11022 unavailable, depending on whether a buffer was passed in or not.
11023 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11024 (struct regcache): New `register_status' field.
11025 (supply_register_zeroed): Declare.
11026 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11027 supply_register_zeroed, rather than passing a NULL buffer to
11028 supply_register.
11029 * tracepoint.c (fetch_traceframe_registers): Update comment.
11030
85724a0e
PA
110312011-01-28 Pedro Alves <pedro@codesourcery.com>
11032
11033 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11034 buffer explicit.
11035
d08aafef
PA
110362011-01-25 Pedro Alves <pedro@codesourcery.com>
11037
11038 * server.h (decode_xfer_write): Change prototype.
11039 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11040 and don't extract the annex here.
11041 * server.c (decode_xfer_read): Remove `annex' parameter,
11042 and don't extract the annex here.
11043 (decode_xfer): New.
11044 (struct qxfer): New.
11045 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11046 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11047 (handle_qxfer_statictrace): New functions, abstracted out from
11048 handle_query, and made to use the struct qxfer interface.
11049 (handle_threads_qxfer_proper): Rename to ...
11050 (handle_qxfer_threads_proper): ... this.
11051 (handle_threads_qxfer): Rename to ...
11052 (handle_qxfer_threads): ... this. Adjust.
11053 (qxfer_packets): New array.
11054 (handle_qxfer): New function.
11055 (handle_query): Use handle_qxfer.
11056
493e2a69
MS
110572011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11058
11059 * gdbreplay.c: Shorten lines of >= 80 columns.
11060 * linux-low.c: Ditto.
11061 * linux-ppc-low.c: Ditto.
11062 * linux-s390-low.c: Ditto.
11063 * linux-sparc-low.c: Ditto.
11064 * linux-x86-low.c: Ditto.
11065 * linux-xtensa-low.c: Ditto.
11066 * mem-break.c: Ditto.
11067 * nto-low.c: Ditto.
11068 * regcache.h: Ditto.
11069 * remote-utils.c: Ditto.
11070 * server.c: Ditto.
11071 * server.h: Ditto.
11072 * thread-db.c: Ditto.
11073 * tracepoint.c: Ditto.
11074 * utils.c: Ditto.
11075 * win32-low.h: Ditto.
11076
44944448
JB
110772011-01-05 Joel Brobecker <brobecker@adacore.com>
11078
11079 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11080 update.
11081
71ce852c
JB
110822011-01-01 Joel Brobecker <brobecker@adacore.com>
11083
11084 * server.c (gdbserver_version): Update copyright year in version
11085 output.
11086 * gdbreplay.c (gdbreplay_version): Ditto.
11087
eb826dc6
MF
110882010-12-29 Jie Zhang <jie.zhang@analog.com>
11089
11090 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11091 * linux-bfin-low.c: New file.
11092 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11093 PT_DATA_ADDR for BFIN targets.
11094 * Makefile.in (SFILES): Add linux-bfin-low.c.
11095 (clean): Remove reg-bfin.c.
11096 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11097 * README: Mention supported Blackfin targets.
11098
39ab222a
MF
110992010-12-23 Mike Frysinger <vapier@gentoo.org>
11100
11101 * .gitignore: New file.
11102
a1f2ce7d
MF
111032010-11-16 Mike Frysinger <vapier@gentoo.org>
11104
11105 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11106
f474844c
JZ
111072010-10-22 Jie Zhang <jie@codesourcery.com>
11108
11109 * Makefile.in: Add FLAGS_TO_PASS variable.
11110 (install): Remove dependency of install-only and recursively
11111 invoke make for install-only.
11112
f1048712
DE
111132010-10-04 Doug Evans <dje@google.com>
11114
11115 * Makefile.in (uninstall): Use $(DESTDIR).
11116
b53a1623
PA
111172010-09-24 Pedro Alves <pedro@codesourcery.com>
11118
e6ee044d
PA
11119 PR gdb/11842
11120
b53a1623
PA
11121 * linux-x86-low.c (compat_siginfo_from_siginfo)
11122 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11123 si_code is < 0. Check for si_code == SI_TIMER before checking for
11124 si_code < 0.
11125
fa1bd1e4
JB
111262010-09-13 Joel Brobecker <brobecker@adacore.com>
11127
11128 * lynx-i386-low.c: New file.
11129 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11130
47fac8f8
JB
111312010-09-13 Joel Brobecker <brobecker@adacore.com>
11132
11133 * lynx-low.c (ptrace_request_to_str): Remove handling for
11134 request values that have been removed in LynxOS 5.x.
11135
1adfc54d
JB
111362010-09-13 Joel Brobecker <brobecker@adacore.com>
11137
11138 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11139 <ptrace.h>
11140
c2a66c29
NS
111412010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11142
11143 * configure.ac: Add --enable-inprocess-agent option.
11144 * configure: Rebuilt.
11145
32fcada3
YQ
111462010-09-06 Yao Qi <yao@codesourcery.com>
11147
11148 * linux-low.c (linux_kill): Remove unused variable.
11149 (linux_stabilize_threads): Likewise.
11150 * server.c (start_inferior): Likewise.
11151 (queue_stop_reply_callback): Likewise.
11152 * tracepoint.c (do_action_at_tracepoint): Likewise.
11153
0cccb683
YQ
111542010-09-06 Yao Qi <yao@codesourcery.com>
11155
11156 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11157 on return.
11158
423ec54c
JK
111592010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11160
11161 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11162
12ac6819
PA
111632010-09-06 Pedro Alves <pedro@codesourcery.com>
11164
11165 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11166 "$(IPA_DEPFILES)".
11167
8ed54b31
JB
111682010-09-01 Joel Brobecker <brobecker@adacore.com>
11169
11170 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11171 gdbserver/lynx-ppc-low.c: New files.
11172 * Makefile.in (lynx_low_h): New variable.
11173 (lynx-low.o, lynx-ppc-low.o): New rules.
11174 * configure.ac: On LynxOS, link with -lnetinet.
11175 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11176 * configure: regenerate.
11177
bb0116a4
JB
111782010-09-01 Joel Brobecker <brobecker@adacore.com>
11179
11180 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11181 * configure.ac: Add check for vasprintf and vsnprintf.
11182 * configure, config.in: Regenerate.
11183 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11184
a778ab81 111852010-09-01 Joel Brobecker <brobecker@adacore.com>
11186
11187 * gdbreplay.c: Move include of alloca.h up, next to include of
11188 malloc.h.
11189 * server.h: Add include of malloc.h.
11190 * mem-break.c: Remove include of malloc.h.
11191 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11192
8b034a19 111932010-09-01 Joel Brobecker <brobecker@adacore.com>
11194
11195 * Makefile.in (memmem.o): Build with -Wno-error.
11196
111972010-09-01 Joel Brobecker <brobecker@adacore.com>
11198
11199 * utils.c (xsnprintf): Make non-static.
11200 * server.h: Add xsnprintf declaration.
11201 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11202 replace calls to snprintf by calls to xsnprintf throughout.
11203
112042010-09-01 Joel Brobecker <brobecker@adacore.com>
11205
11206 * configure.ac: Add configure check for alloca.
11207 * configure, config.in: Regenerate.
11208 * server.h: Include alloca.h if it exists.
11209 * gdbreplay.c: Include alloca.h if it exists.
11210
1a981360
PA
112112010-08-28 Pedro Alves <pedro@codesourcery.com>
11212
11213 * linux-low.c (__SIGRTMIN): Define if not already defined.
11214 (linux_create_inferior): Check for __ANDROID__ rather than
11215 __SIGRTMIN.
11216 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11217 are already deferred.
11218 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11219 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11220 stopped and already has a pending signal to report.
11221 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11222 a pending signal to report or is moving out of a jump pad.
11223 (linux_init_signals): Check for __ANDROID__ rather than
11224 __SIGRTMIN.
11225
b4d51a55
PA
112262010-08-28 Pedro Alves <pedro@codesourcery.com>
11227
11228 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11229 debug_threads check. Avoid a linear search when not doing debug
11230 output.
11231
ec48365d
PA
112322010-08-27 Pedro Alves <pedro@codesourcery.com>
11233
11234 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11235 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11236 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11237 (process_event): Change local fd's type to gdb_fildes_t.
11238 (create_file_handler): Adjust prototype.
11239 (delete_file_handler): Adjust prototype.
11240 (handle_file_event): Adjust prototype. Use pfildes.
11241 (create_file_event): Adjsut prototype.
11242 * remote-utils.c (remote_desc, listen_desc): Change type to
11243 gdb_fildes_t.
11244 * server.h: New gdb_fildes_t typedef.
11245 [USE_WIN32API]: Include winsock2.h.
11246 (delete_file_handler, add_file_handler): Adjust prototypes.
11247 (pfildes): Declare.
11248 * utils.c (pfildes): New.
11249
854d88f0
PA
112502010-08-27 Pedro Alves <pedro@codesourcery.com>
11251
11252 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11253 * configure: Regenerate.
11254
0146f85b
PA
112552010-08-27 Pedro Alves <pedro@codesourcery.com>
11256
11257 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11258 (linux_done_accessing_memory): ... this.
11259 (linux_target_ops): Adjust.
11260 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11261 * nto-low.c (nto_target_ops): Adjust comment.
11262 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11263 * spu-low.c (spu_target_ops): Adjust comment.
11264 * target.h (target_ops): Rename unprepare_to_access_memory field
11265 to done_accessing_memory.
11266 (unprepare_to_access_memory): Rename to ...
11267 (done_accessing_memory): ... this.
11268
90d74c30
PA
112692010-08-26 Pedro Alves <pedro@codesourcery.com>
11270
11271 * linux-low.c (linux_prepare_to_access_memory): New.
11272 (linux_unprepare_to_access_memory): New.
11273 (linux_target_ops): Install them.
11274 * server.c (read_memory): Rename to ...
11275 (gdb_read_memory): ... this. Use
11276 prepare_to_access_memory/prepare_to_access_memory.
11277 (write_memory): Rename to ...
11278 (gdb_write_memory): ... this. Use
11279 prepare_to_access_memory/prepare_to_access_memory.
11280 (handle_search_memory_1): Adjust.
11281 (process_serial_event): Adjust.
11282 * target.h (struct target_ops): New fields
11283 prepare_to_access_memory and unprepare_to_access_memory.
11284 (prepare_to_access_memory, unprepare_to_access_memory): New.
11285 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11286 prepare_to_access_memory/prepare_to_access_memory.
11287 * nto-low.c (nto_target_ops): Adjust.
11288 * spu-low.c (spu_target_ops): Adjust.
11289 * win32-low.c (win32_target_ops): Adjust.
11290
fd467969
PA
112912010-08-26 Pedro Alves <pedro@codesourcery.com>
11292
11293 * Makefile.in (WARN_CFLAGS): Get it from configure.
11294 (WERROR_CFLAGS): New.
11295 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11296 * configure.ac: Introduce --enable-werror, which adds -Werror to
11297 the compiler command line. Enabled by default. Disable with
11298 --disable-werror. Add -Wdeclaration-after-statement
11299 Wpointer-arith and -Wformat-nonliteral to warning flags.
11300 * configure: Regenerate.
11301
331e2f5f
PA
113022010-08-26 Pedro Alves <pedro@codesourcery.com>
11303
11304 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11305
e581f2b4
PA
113062010-08-26 Pedro Alves <pedro@codesourcery.com>
11307
11308 * gdbreplay.c (remote_error): New.
11309 (gdbchar): New.
11310 (expect): Use gdbchar. Check for error reading from GDB.
11311 Clarify sync error output.
11312 (play): Check for errors writing to GDB.
11313 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11314 * remote-utils.c (getpkt): Check for errors writing to the remote
11315 descriptor.
11316
3c11dd79
PA
113172010-08-25 Pedro Alves <pedro@codesourcery.com>
11318
11319 * linux-low.c (linux_wait_1): Move non-debugging code out of
11320 `debug_threads' control.
11321
d20a8ad9
PA
113222010-08-25 Pedro Alves <pedro@codesourcery.com>
11323
11324 * linux-low.c (linux_wait_1): Don't set last_status here.
11325 * server.c (push_event, queue_stop_reply_callback): Assert we're
11326 not pushing a TARGET_WAITKIND_IGNORE event.
11327 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11328 (myresume, handle_target_event): Set the thread's last_resume_kind
11329 and last_status from the target returned status.
11330
964e4306
PA
113312010-08-25 Pedro Alves <pedro@codesourcery.com>
11332
11333 PR threads/10729
11334
11335 * linux-x86-low.c (update_debug_registers_callback): New.
11336 (i386_dr_low_set_addr): Use it.
11337 (i386_dr_low_get_addr): New.
11338 (i386_dr_low_set_control): Use update_debug_registers_callback.
11339 (i386_dr_low_get_control): New.
11340 (i386_dr_low_get_status): Adjust.
11341 * linux-low.c (linux_stop_lwp): New.
11342 * linux-low.h (linux_stop_lwp): Declare.
11343
11344 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11345 argument instead of a i386_debug_reg_state.
11346 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11347 a i386_debug_reg_state.
11348 (i386_insert_aligned_watchpoint): Adjust.
11349 (i386_remove_aligned_watchpoint): Adjust.
11350 (i386_low_stopped_data_address): Read the debug registers from the
11351 inferior instead of from the mirrors.
11352 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11353 (i386_dr_low_get_addr): Declare.
11354 (i386_dr_low_get_control): Declare.
11355 (i386_dr_low_get_status): Change prototype.
11356
11357 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11358 (i386_dr_low_get_addr): New.
11359 (i386_dr_low_get_control): New.
11360 (i386_dr_low_get_status): Adjust prototype. Return
11361 dr_status_mirror.
11362 (i386_initial_stuff): Clear dr_status_mirror and
11363 dr_control_mirror.
11364 (i386_get_thread_context): Adjust.
11365 (i386_set_thread_context): Adjust.
11366 (i386_thread_added): Adjust.
11367
5f21a75b
PA
113682010-08-24 Pedro Alves <pedro@codesourcery.com>
11369
11370 * linux-low.h (linux_thread_area): Delete declaration.
11371
3e4c1235
TS
113722010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11373
11374 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11375 after its termination.
11376
1971b033
PA
113772010-08-09 Pedro Alves <pedro@codesourcery.com>
11378
11379 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11380 (gdb_wants_all_stopped): Delete.
11381 (linux_wait_1): Don't call them.
11382 * server.c (handle_v_cont): Tag all threads as want-stopped.
11383 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11384 stopped as "client-wants-stopped".
11385
310444ac
PA
113862010-07-31 Pedro Alves <pedro@codesourcery.com>
11387
11388 * Makefile.in (signals_h): New.
11389 (server_h): Depend on it.
11390 (server.o): Don't depend on $(signals_def).
11391 (signals.o): Depend on $(signals_def).
11392
a19cae16
JK
113932010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11394
11395 * Makefile.in (signals_def): New.
11396 (server_h): Append include/gdb/signals.h and signals_def.
11397 (server.o): Append signals_def.
11398
30d50328
JK
113992010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11400
11401 * server.c (handle_target_event): Use target_signal_to_host for
11402 resume_info.sig initialization.
11403 * target.h (struct thread_resume) <sig>: New comment.
11404
5c3216e2
OS
114052010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11406
c6f46ca0
OS
11407 * server.c (handle_query): strcpy() the returned string from paddress()
11408 instead of sprintf().
5c3216e2
OS
11409 * utils.c (paddress): Return phex_nz().
11410
6bd31874
JB
114112010-07-07 Joel Brobecker <brobecker@adacore.com>
11412
11413 * server.c (handle_v_cont): Call mourn_inferior if process
11414 just exited.
11415 (myresume): Likewise.
11416
0fb4aa4b
PA
114172010-07-01 Pedro Alves <pedro@codesourcery.com>
11418
11419 Static tracepoints, and integration with UST.
11420
11421 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11422 * mem-break.c (uninsert_all_breakpoints)
11423 (reinsert_all_breakpoints): New.
11424 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11425 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11426 (gdb_agent_ust_loaded, helper_thread_id)
11427 (gdb_agent_helper_thread_id): New macros.
11428 (struct ipa_sym_addresses): Add addr_ust_loaded,
11429 addr_helper_thread_id, addr_cmd_buf.
11430 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11431 (in_process_agent_loaded_ust): New.
11432 (write_e_ust_not_loaded): New.
11433 (maybe_write_ipa_ust_not_loaded): New.
11434 (struct collect_static_trace_data_action): New.
11435 (enum tracepoint_type) <static_tracepoint>: New.
11436 (struct tracepoint) <handle>: Mention static tracepoints.
11437 (struct static_tracepoint_ctx): New.
11438 (CMD_BUF_SIZE): New.
11439 (add_tracepoint_action): Handle static tracepoint actions.
11440 (unprobe_marker_at): New.
11441 (clear_installed_tracepoints): Handle static tracepoints.
11442 (cmd_qtdp): Handle static tracepoints.
11443 (probe_marker_at): New.
11444 (cmd_qtstart): Handle static tracepoints.
11445 (response_tracepoint): Handle static tracepoints.
11446 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11447 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11448 (get_context_regcache): Handle static tracepoints.
11449 (do_action_at_tracepoint): Handle static tracepoint actions.
11450 (traceframe_find_block_type): Handle static trace data blocks.
11451 (traceframe_read_sdata): New.
11452 (download_tracepoints): Download static tracepoint actions.
11453 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11454 (GDB_PROBE_NAME): New.
11455 (ust_ops): New.
11456 (GET_UST_SYM): New.
11457 (USTF): New.
11458 (dlsym_ust): New.
11459 (ust_marker_to_static_tracepoint): New.
11460 (gdb_probe): New.
11461 (collect_ust_data_at_tracepoint): New.
11462 (gdb_ust_probe): New.
11463 (UNIX_PATH_MAX, SOCK_DIR): New.
11464 (gdb_ust_connect_sync_socket): New.
11465 (resume_thread, stop_thread): New.
11466 (run_inferior_command): New.
11467 (init_named_socket): New.
11468 (gdb_ust_socket_init): New.
11469 (cstr_to_hexstr): New.
11470 (next_st): New.
11471 (first_marker, next_marker): New.
11472 (response_ust_marker): New.
11473 (cmd_qtfstm, cmd_qtsstm): New.
11474 (unprobe_marker_at, probe_marker_at): New.
11475 (cmd_qtstmat, gdb_ust_thread): New.
11476 (gdb_ust_init): New.
11477 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11478 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11479 (ST_REGENTRY): New.
11480 (x86_64_st_collect_regmap): New.
11481 (X86_64_NUM_ST_COLLECT_GREGS): New.
11482 (AMD64_RIP_REGNUM): New.
11483 (supply_static_tracepoint_registers): New.
11484 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11485 (ST_REGENTRY): New.
11486 (i386_st_collect_regmap): New.
11487 (i386_NUM_ST_COLLECT_GREGS): New.
11488 (supply_static_tracepoint_registers): New.
11489 * server.c (handle_query): Handle qXfer:statictrace:read.
11490 <qSupported>: Report support for StaticTracepoints, and
11491 qXfer:statictrace:read features.
11492 * server.h (traceframe_read_sdata)
11493 (supply_static_tracepoint_registers): Declare.
11494 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11495 (unpack_varlen_hex): Include in IPA build.
11496 * Makefile.in (ustlibs, ustinc): New.
11497 (IPA_OBJS): Add remote-utils-ipa.o.
11498 ($(IPA_LIB)): Link -ldl and -lpthread.
11499 (UST_CFLAGS): New.
11500 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11501 * config.in, configure: Regenerate.
11502
9e4344e5
PA
115032010-06-20 Ian Lance Taylor <iant@google.com>
11504 Pedro Alves <pedro@codesourcery.com>
11505
11506 * linux-x86-low.c (always_true): Delete.
11507 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11508 trying to fool the compiler with always_true.
11509
c6beb2cb
PA
115102010-06-20 Pedro Alves <pedro@codesourcery.com>
11511
11512 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11513 conditions in gdbserver.
11514
d2ed6730
UW
115152010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11516
11517 * spu-low.c (spu_read_memory): Wrap around local store limit.
11518 (spu_write_memory): Likewise.
11519
4e29fb54
PA
115202010-06-15 Pedro Alves <pedro@codesourcery.com>
11521
11522 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11523 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11524 LONGEST uses.
11525 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11526 uses.
11527 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11528 uses with LONGEST uses.
11529
6a271cae
PA
115302010-06-14 Stan Shebs <stan@codesourcery.com>
11531 Pedro Alves <pedro@codesourcery.com>
11532
11533 Bytecode compiler.
11534
11535 * linux-x86-low.c: Include limits.h.
11536 (add_insns): New.
11537 (always_true): New.
11538 (EMIT_ASM): New.
11539 (EMIT_ASM32): New.
11540 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11541 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11542 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11543 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11544 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11545 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11546 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11547 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11548 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11549 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11550 (amd64_emit_void_call_2): New.
11551 (amd64_emit_ops): New.
11552 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11553 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11554 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11555 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11556 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11557 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11558 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11559 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11560 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11561 (i386_emit_stack_adjust, i386_emit_int_call_1)
11562 (i386_emit_void_call_2): New.
11563 (i386_emit_ops): New.
11564 (x86_emit_ops): New.
11565 (the_low_target): Install x86_emit_ops.
11566 * server.h (struct emit_ops): New.
11567 (get_raw_reg_func_addr): Declare.
11568 (current_insn_ptr, emit_error): Declare.
11569 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11570 (set_trace_state_variable_value): New defines.
11571 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11572 addr_get_trace_state_variable_value and
11573 addr_set_trace_state_variable_value.
11574 (symbol_list): New fields for get_raw_reg,
11575 get_trace_state_variable_value and set_trace_state_variable_value.
11576 (condfn): New typedef.
11577 (struct tracepoint): New field `compiled_cond'.
11578 (do_action_at_tracepoint): Clear compiled_cond.
11579 (get_trace_state_variable_value, set_trace_state_variable_value):
11580 Export in the IPA.
11581 (condition_true_at_tracepoint): If there's a compiled condition,
11582 run that.
11583 (current_insn_ptr, emit_error): New globals.
11584 (struct bytecode_address): New.
11585 (get_raw_reg_func_addr): New.
11586 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11587 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11588 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11589 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11590 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11591 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11592 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11593 (compile_tracepoint_condition, compile_bytecodes): New.
11594 * target.h (emit_ops): Forward declare.
11595 (struct target_ops): New field emit_ops.
11596 (target_emit_ops): New.
11597 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11598 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11599 * linux-low.c (linux_emit_ops): New.
11600 (linux_target_ops): Install it.
11601 * linux-low.h (struct linux_target_ops): New field emit_ops.
11602
92b72907
UW
116032010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11604
11605 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11606 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11607
fa593d66
PA
116082010-06-01 Pedro Alves <pedro@codesourcery.com>
11609 Stan Shebs <stan@codesourcery.com>
11610
11611 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11612 (all): Depend on $(extra_libraries).
11613 (install-only): Install the IPA.
11614 (IPA_OBJS, IPA_LIB): New.
11615 (clean): Remove the IPA lib.
11616 (IPAGENT_CFLAGS): New.
11617 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11618 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11619 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11620 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11621 * configure.ac: Check for atomic builtins support in the compiler.
11622 (IPA_DEPFILES, extra_libraries): Define.
11623 * configure.srv (ipa_obj): Add description.
11624 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11625 (i[34567]86-*-linux*): Set ipa_obj.
11626 (x86_64-*-linux*): Set ipa_obj.
11627 * linux-low.c (stabilizing_threads): New.
11628 (supports_fast_tracepoints): New.
11629 (linux_detach): Stabilize threads before detaching.
11630 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11631 the lwp is either not stabilizing, or is moving out of a jump pad.
11632 (linux_fast_tracepoint_collecting): New.
11633 (maybe_move_out_of_jump_pad): New.
11634 (enqueue_one_deferred_signal): New.
11635 (dequeue_one_deferred_signal): New.
11636 (linux_wait_for_event_1): If moving out of a jump pad, defer
11637 pending signals to later.
11638 (linux_stabilize_threads): New.
11639 (linux_wait_1): Check if threads need moving out of jump pads, and
11640 do it if so.
11641 (stuck_in_jump_pad_callback): New.
11642 (move_out_of_jump_pad_callback): New.
11643 (lwp_running): New.
11644 (linux_resume_one_lwp): Handle moving out of jump pads.
11645 (linux_set_resume_request): Dequeue deferred signals.
11646 (need_step_over_p): Also step over fast tracepoint jumps.
11647 (start_step_over): Also uninsert fast tracepoint jumps.
11648 (finish_step_over): Also reinsert fast tracepoint jumps.
11649 (linux_install_fast_tracepoint_jump): New.
11650 (linux_target_ops): Install linux_stabilize_threads and
11651 linux_install_fast_tracepoint_jump_pad.
11652 * linux-low.h (linux_target_ops) <get_thread_area,
11653 install_fast_tracepoint_jump_pad>: New fields.
11654 (struct lwp_info) <collecting_fast_tracepoint,
11655 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11656 (linux_get_thread_area): Declare.
11657 * linux-x86-low.c (jump_insn): New.
11658 (x86_get_thread_area): New.
11659 (append_insns): New.
11660 (push_opcode): New.
11661 (amd64_install_fast_tracepoint_jump_pad): New.
11662 (i386_install_fast_tracepoint_jump_pad): New.
11663 (x86_install_fast_tracepoint_jump_pad): New.
11664 (the_low_target): Install x86_get_thread_area and
11665 x86_install_fast_tracepoint_jump_pad.
11666 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11667 (struct fast_tracepoint_jump): New.
11668 (fast_tracepoint_jump_insn): New.
11669 (fast_tracepoint_jump_shadow): New.
11670 (find_fast_tracepoint_jump_at): New.
11671 (fast_tracepoint_jump_here): New.
11672 (delete_fast_tracepoint_jump): New.
11673 (set_fast_tracepoint_jump): New.
11674 (uninsert_fast_tracepoint_jumps_at): New.
11675 (reinsert_fast_tracepoint_jumps_at): New.
11676 (set_breakpoint_at): Use write_inferior_memory.
11677 (uninsert_raw_breakpoint): Use write_inferior_memory.
11678 (check_mem_read): Mask out fast tracepoint jumps.
11679 (check_mem_write): Mask out fast tracepoint jumps.
11680 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11681 (set_fast_tracepoint_jump): Declare.
11682 (delete_fast_tracepoint_jump)
11683 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11684 (reinsert_fast_tracepoint_jumps_at): Declare.
11685 * regcache.c: Don't compile many functions when building the
11686 in-process agent library.
11687 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11688 the register buffer in the heap.
11689 (free_register_cache): If the register buffer isn't owned by the
11690 regcache, don't free it.
11691 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11692 pre-existing register caches.
11693 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11694 type.
11695 (convert_ascii_to_int): : Constify `from' parameter type.
11696 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11697 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11698 the needed buffer in-place.
11699 (relocate_instruction): New.
11700 * server.c (handle_query) <qSymbols>: If the target supports
11701 tracepoints, give it a chance of looking up symbols. Report
11702 support for fast tracepoints.
11703 (handle_status): Stabilize threads.
11704 (process_serial_event): Adjust.
11705 * server.h (struct fast_tracepoint_jump): Forward declare.
11706 (struct process_info) <fast_tracepoint_jumps>: New field.
11707 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11708 (decode_X_packet, decode_M_packet): Adjust.
11709 (relocate_instruction): Declare.
11710 (in_process_agent_loaded): Declare.
11711 (tracepoint_look_up_symbols): Declare.
11712 (struct fast_tpoint_collect_status): Declare.
11713 (fast_tracepoint_collecting): Declare.
11714 (force_unlock_trace_buffer): Declare.
11715 (handle_tracepoint_bkpts): Declare.
11716 (initialize_low_tracepoint)
11717 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11718 * target.h (struct target_ops) <stabilize_threads,
11719 install_fast_tracepoint_jump_pad>: New fields.
11720 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11721 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11722 [HAVE_STDINT_H]: Include stdint.h.
11723 (trace_debug_1): Rename to ...
11724 (trace_vdebug): ... this.
11725 (trace_debug): Rename to ...
11726 (trace_debug_1): ... this. Add `level' parameter.
11727 (trace_debug): New.
11728 (ATTR_USED, ATTR_NOINLINE): New.
11729 (IP_AGENT_EXPORT): New.
11730 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11731 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11732 (about_to_request_buffer_space, trace_buffer_is_full)
11733 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11734 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11735 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11736 (traceframe_write_count, traceframes_created)
11737 (trace_state_variables)
11738 New renaming defines.
11739 (struct ipa_sym_addresses): New.
11740 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11741 (symbol_list): New.
11742 (ipa_sym_addrs): New.
11743 (all_tracepoint_symbols_looked_up): New.
11744 (in_process_agent_loaded): New.
11745 (write_e_ipa_not_loaded): New.
11746 (maybe_write_ipa_not_loaded): New.
11747 (tracepoint_look_up_symbols): New.
11748 (debug_threads) [IN_PROCESS_AGENT]: New.
11749 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11750 (UNKNOWN_SIDE_EFFECTS): New.
11751 (stop_tracing): New.
11752 (flush_trace_buffer): New.
11753 (stop_tracing_bkpt): New.
11754 (flush_trace_buffer_bkpt): New.
11755 (read_inferior_integer): New.
11756 (read_inferior_uinteger): New.
11757 (read_inferior_data_pointer): New.
11758 (write_inferior_data_pointer): New.
11759 (write_inferior_integer): New.
11760 (write_inferior_uinteger): New.
11761 (struct collect_static_trace_data_action): Delete.
11762 (enum tracepoint_type): New.
11763 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11764 <actions_str, step_actions, step_actions_str>: Only include in
11765 GDBserver.
fa593d66
PA
11766 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11767 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11768 (tracepoints): Use IP_AGENT_EXPORT.
11769 (last_tracepoint): Don't include in the IPA.
11770 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11771 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11772 (alloced_trace_state_variables): New.
11773 (trace_state_variables): Use IP_AGENT_EXPORT.
11774 (traceframe_t): Delete unused variable.
11775 (circular_trace_buffer): Don't include in the IPA.
11776 (trace_buffer_start): Delete.
11777 (struct trace_buffer_control): New.
11778 (trace_buffer_free): Delete.
11779 (struct ipa_trace_buffer_control): New.
11780 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11781 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11782 New.
11783 (trace_buffer_ctrl): New.
11784 (TRACE_BUFFER_CTRL_CURR): New.
11785 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11786 Reimplement as macros.
11787 (trace_buffer_wrap): Delete.
11788 (traceframe_write_count, traceframe_read_count)
11789 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11790 (struct tracepoint_hit_ctx) <type>: New field.
11791 (struct fast_tracepoint_ctx): New.
11792 (memory_barrier): New.
11793 (cmpxchg): New.
11794 (record_tracepoint_error): Update atomically in the IPA.
11795 (clear_inferior_trace_buffer): New.
11796 (about_to_request_buffer_space): New.
11797 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11798 updating the same buffer.
11799 (add_tracepoint): Default the tracepoint's type to trap
11800 tracepoint, and orig_size to -1.
11801 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11802 internal variables.
11803 (create_trace_state_variable): New parameter `gdb'. Handle it.
11804 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11805 (cmd_qtdp): Handle fast tracepoints.
11806 (cmd_qtdv): Adjust.
11807 (max_jump_pad_size): New.
11808 (gdb_jump_pad_head): New.
11809 (get_jump_space_head): New.
11810 (claim_jump_space): New.
11811 (sort_tracepoints): New.
11812 (MAX_JUMP_SIZE): New.
11813 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11814 IPA.
11815 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11816 support. Upload fast traceframes, and delete internal IPA
11817 breakpoints.
11818 (stop_tracing_handler): New.
11819 (flush_trace_buffer_handler): New.
11820 (cmd_qtstop): Upload fast tracepoints.
11821 (response_tracepoint): Handle fast tracepoints.
11822 (tracepoint_finished_step): Upload fast traceframes. Set the
11823 tracepoint hit context's tracepoint type.
11824 (handle_tracepoint_bkpts): New.
11825 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11826 type. Add comment about fast tracepoints.
11827 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11828 non-existing action_str field.
11829 (get_context_regcache): Handle fast tracepoints.
11830 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11831 to the regcache.
11832 (fast_tracepoint_from_jump_pad_address): New.
11833 (fast_tracepoint_from_ipa_tpoint_address): New.
11834 (collecting_t): New.
11835 (force_unlock_trace_buffer): New.
11836 (fast_tracepoint_collecting): New.
11837 (collecting): New.
11838 (gdb_collect): New.
11839 (write_inferior_data_ptr): New.
11840 (target_tp_heap): New.
11841 (target_malloc): New.
11842 (download_agent_expr): New.
11843 (UALIGN): New.
11844 (download_tracepoints): New.
11845 (download_trace_state_variables): New.
11846 (upload_fast_traceframes): New.
11847 (IPA_FIRST_TRACEFRAME): New.
11848 (IPA_NEXT_TRACEFRAME_1): New.
11849 (IPA_NEXT_TRACEFRAME): New.
11850 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11851 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11852 (gdb_jump_pad_buffer_end): New.
11853 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11854 (initialize_tracepoint): Adjust.
11855 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11856 buffer. Initialize the low module.
11857 * utils.c (PREFIX, TOOLNAME): New.
11858 (malloc_failure): Use PREFIX.
11859 (error): In the IPA, an error causes an exit.
11860 (fatal, warning): Use PREFIX.
11861 (internal_error): Use TOOLNAME.
11862 (NUMCELLS): Increase to 10.
11863 * configure, config.in: Regenerate.
11864
d149dd1d
PA
118652010-06-01 Pedro Alves <pedro@codesourcery.com>
11866
11867 * server.c (handle_query) <qSupported>: Do two passes over the
11868 qSupported string to avoid nesting strtok.
11869
f6528abd
JK
118702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11871
11872 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11873 (CDEPS): New.
11874 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11875 -Wl,--dynamic-list.
11876 * configure: Regenerate.
11877 * proc-service.list: New.
11878
ca2a87a0
JK
118792010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11880
11881 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11882 New comment.
11883
363a6e9f
OS
118842010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11885
11886 * gdbreplay.c (remote_open): Check error return from socket() call by
11887 its equality to -1 not by it being negative.
11888 * remote-utils.c (remote_open): Likewise.
11889
d23b6cb1
PA
118902010-05-23 Pedro Alves <pedro@codesourcery.com>
11891
11892 * config.h: Regenerate.
11893
28d3cf85
MK
118942010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11895
11896 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11897 doesn't provide PTRACE_GET_THREAD_AREA.
11898
fea36a59
MK
118992010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11900
11901 * linux-m68k-low.c: Include <asm/ptrace.h>
11902 (ps_get_thread_area): Implement.
11903
24b066ba
DE
119042010-05-03 Doug Evans <dje@google.com>
11905
11906 * event-loop.c (struct callback_event): New struct.
11907 (callback_list): New global.
11908 (append_callback_event, delete_callback_event): New functions.
11909 (process_callback): New function.
11910 (start_event_loop): Call it.
11911 * remote-utils.c (NOT_SCHEDULED): Define.
11912 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11913 moved out of readchar.
11914 (readchar): Rewrite. Call reschedule before returning.
11915 (reset_readchar): New function.
11916 (remote_close): Call it.
11917 (process_remaining, reschedule): New functions.
11918 * server.h (callback_handler_func): New typedef.
11919 (append_callback_event, delete_callback_event): Declare.
11920
9836d6ea
PA
119212010-05-03 Pedro Alves <pedro@codesourcery.com>
11922
11923 * proc-service.c (ps_pglobal_lookup): Use
11924 thread_db_look_up_one_symbol.
11925 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11926 parameter. Use it instead of all_symbols_looked_up.
11927 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11928 field.
11929 (all_symbols_looked_up): Don't declare.
11930 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11931 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11932 field.
11933 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11934 Set all_symbols_looked_up here.
11935 (thread_db_look_up_one_symbol): New.
11936 (thread_db_get_tls_address): Adjust.
11937 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11938 thread_db object on the heap, and tentatively set it in the
11939 process structure.
11940 (thread_db_init): Don't set all_symbols_looked_up here.
11941 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11942
7984d532
PA
119432010-05-03 Pedro Alves <pedro@codesourcery.com>
11944
11945 * linux-low.c (linux_kill, linux_detach): Adjust.
11946 (status_pending_p_callback): Remove redundant statement. Check
11947 for !TARGET_WAITIKIND_IGNORE, instead of
11948 TARGET_WAITKIND_STOPPED.
11949 (handle_tracepoints): Make sure LWP is locked. Adjust.
11950 (linux_wait_for_event_1): Adjust.
11951 (linux_cancel_breakpoints): New.
11952 (unsuspend_one_lwp): New.
11953 (unsuspend_all_lwps): New.
11954 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11955 (send_sigstop_callback): Change return type to int, add new
11956 `except' parameter and handle it.
11957 (suspend_and_send_sigstop_callback): New.
11958 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11959 pass them down. If SUSPEND, also increment the lwp's suspend
11960 count.
11961 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11962 (need_step_over_p): Don't consider suspended LWPs.
11963 (start_step_over): Adjust.
11964 (proceed_one_lwp): Change return type to int, add new `except'
11965 parameter and handle it.
11966 (unsuspend_and_proceed_one_lwp): New.
11967 (proceed_all_lwps): Use find_inferior instead of
11968 for_each_inferior.
11969 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11970 also decrement the suspend count of LWPs. Pass `except' down,
11971 instead of hacking its suspend count.
11972 (linux_pause_all): Add `freeze' parameter. Adjust.
11973 (linux_unpause_all): New.
11974 (linux_target_ops): Install linux_unpause_all.
11975 * server.c (handle_status): Adjust.
11976 * target.h (struct target_ops): New fields `unpause_all' and
11977 `cancel_breakpoints'. Add new parameter to `pause_all'.
11978 (pause_all): Add new `freeze' parameter.
11979 (unpause_all): New.
11980 (cancel_breakpoints): New.
11981 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11982 cancel breakpoints.
11983 (cmd_qtstart): Pause threads.
11984 (stop_tracing): Pause threads, and cancel breakpoints.
11985 * win32-low.c (win32_target_ops): Adjust.
11986
e471f25b
PA
119872010-05-03 Pedro Alves <pedro@codesourcery.com>
11988
11989 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11990 the inferior right away from here...
11991 (linux_wait_1): ... to here, and adjust to check the thread's
11992 last_resume_kind instead of the lwp's step or stop_expected flags.
11993
1915ef4f
PA
119942010-05-02 Pedro Alves <pedro@codesourcery.com>
11995
11996 * README: Use consistent `GDB' and `GDBserver' spellings.
11997
f9e39928
PA
119982010-05-02 Pedro Alves <pedro@codesourcery.com>
11999
12000 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12001 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12002 (linux_detach_one_lwp): Assume the lwp is stopped.
12003 (any_thread_of): Delete.
12004 (linux_detach): Stop all lwps here. Don't blindly delete all
12005 breakpoints.
12006 (delete_lwp_callback): New.
12007 (linux_mourn): Delete all lwps of the process that is gone.
12008 (linux_wait_1): Don't delete the last lwp of the process here.
12009 * mem-break.h (mark_breakpoints_out): Declare.
12010 * mem-break.c (mark_breakpoints_out): New.
12011 (free_all_breakpoints): Use it.
12012 * server.c (handle_target_event): If the process is gone, mark
12013 breakpoints out.
12014 * thread-db.c (struct thread_db) <create_bp>: New field.
12015 (thread_db_enable_reporting): Fix prototype. Store a thread event
12016 breakpoint reference in the thread_db struct.
12017 (thread_db_load_search): Clear the thread_db object.
12018 (try_thread_db_load_1): Ditto.
12019 (switch_to_process): New.
12020 (disable_thread_event_reporting): Use it.
12021 (remove_thread_event_breakpoints): New.
12022 (thread_db_detach, thread_db_mourn): Use it.
12023
1e7fc18c
PA
120242010-05-01 Pedro Alves <pedro@codesourcery.com>
12025
12026 * linux-low.c (linux_enable_event_reporting): New.
12027 (linux_wait_for_event_1, handle_extended_wait): Use it.
12028
02fc4de7
PA
120292010-04-30 Pedro Alves <pedro@codesourcery.com>
12030
12031 * linux-low.c (linux_kill_one_lwp, linux_kill)
12032 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12033 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12034 SIGSTOP even if the LWP is stopped.
12035 (send_sigstop_callback): New.
12036 (stop_all_lwps): Use send_sigstop_callback instead.
12037 (linux_resume_one_thread): Adjust.
12038 (proceed_one_lwp): Still proceed an LWP that the client has
12039 requested to stop, if we haven't reported it as stopped yet. Make
12040 sure that LWPs the client want stopped, have a pending SIGSTOP.
12041
bc3b5632
DE
120422010-04-26 Doug Evans <dje@google.com>
12043
ae1ada35
DE
12044 * server.c (handle_general_set): Make static.
12045
bc3b5632
DE
12046 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12047 Print received char after testing for error/eof instead of before.
12048 (input_interrupt): Tweak comment.
12049
65730243
DE
120502010-04-23 Doug Evans <dje@google.com>
12051
12052 * server.c (start_inferior): Print inferior argv if --debug.
12053
a8ae7dc0
AR
120542010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12055
12056 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12057 * nto-x86-low.c: Include server.h
12058
1c07cc19
PM
120592010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12060
12061 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12062 be consistent with other sources of this directory.
12063 (init_registers_amd64): Correct name of source file of this function
12064 in the comment.
12065
e0a61e09
PM
120662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12067
12068 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12069 64-bit executables.
12070
54709339
PM
120712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12072
12073 * win32-i386-low.c: Add 64-bit support.
12074 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12075 (init_registers_amd64): Declare.
12076 (mappings): Add 64-bit version of array.
12077 (init_windows_x86): New function.
12078 (the_low_target): Change init_arch field to init_windows_x86.
12079
e8f0053d
PM
120802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12081
12082 * win32-low.c: Adapt to support also 64-bit architecture.
12083 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12084 (get_image_name): Use SIZE_T type for local variable `done'.
12085 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12086 (toolhelp_get_dll_name): Idem.
12087 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12088 Use uintptr_t typecast to avoid warning.
12089 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12090 (handle_exception): Use phex_nz to avoid warning.
12091 (win32_wait): Remove unused local variable `process'.
12092
c481e77e
PM
120932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12094
12095 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12096 `amd64-avx.o'.
12097
12ea4b69
PM
120982010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12099
12100 * configure.ac: Use `ws2_32' library for srv_mingw.
12101 * configure: Regenerate.
12102 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12103 * remote-utils.c: Likewise.
12104
f6d1620c
L
121052010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12106
12107 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12108 if __x86_64__ is defined.
12109
8e642873
PM
121102010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12111
12112 * configure: Regenerate.
12113
711e434b
PM
121142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12115
12116 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12117 * target.h (target_ops): New get_tib_address field.
12118 * win32-low.h (win32_thread_info): Add thread_local_base field.
12119 * win32-low.c (child_add_thread): Add tlb argument.
12120 Set thread_local_base field to TLB.
12121 (get_child_debug_event): Adapt to child_add_thread change.
12122 (win32_get_tib_address): New function.
12123 (win32_target_ops): Set get_tib_address field to
12124 win32_get_tib_address.
12125 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12126
505106cd
PA
121272010-04-12 Pedro Alves <pedro@codesourcery.com>
12128
505106cd
PA
12129 * linux-low.c (linux_mourn): Also remove the process.
12130 * server.c (handle_target_event): Don't remove the process here.
12131 * nto-low.c (nto_mourn): New.
12132 (nto_target_ops): Install it.
12133 * spu-low.c (spu_mourn): New.
12134 (spu_target_ops): Install it.
12135 * win32-low.c (win32_mourn): New.
12136 (win32_target_ops): Install it.
12137
e8470a06
PA
121382010-04-12 Pedro Alves <pedro@codesourcery.com>
12139
12140 * server.h (buffer_xml_printf): Remove redundant `;'.
12141
45ba0d02
PA
121422010-04-12 Pedro Alves <pedro@codesourcery.com>
12143
12144 * regcache.c (set_register_cache): Invalidate regcaches before
12145 changing the register cache layout.
12146 (regcache_invalidate_one): Allow a NULL regcache.
12147 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12148 regcaches before changing the register cache layout or the target
12149 regsets.
12150
59e04013
L
121512010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12152
12153 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12154 variable warning on Linux/x86-64.
12155
8336d594
PA
121562010-04-11 Pedro Alves <pedro@codesourcery.com>
12157
12158 GDBserver disconnected tracing support.
12159
12160 * linux-low.c (linux_remove_process): Delete.
12161 (add_lwp): Don't set last_resume_kind here.
12162 (linux_kill): Use `mourn'.
12163 (linux_detach): Use `thread_db_detach', and `mourn'.
12164 (linux_mourn): New.
12165 (linux_attach_lwp_1): Adjust comment.
12166 (linux_attach): last_resume_kind moved the thread_info; adjust.
12167 (status_pending_p_callback): Adjust.
12168 (linux_wait_for_event_1): Adjust.
12169 (count_events_callback, select_singlestep_lwp_callback)
12170 (select_event_lwp_callback, cancel_breakpoints_callback)
12171 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12172 (proceed_one_lwp): Adjust.
12173 (linux_async): Add debug output.
12174 (linux_thread_stopped): New.
12175 (linux_pause_all): New.
12176 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12177 linux_pause_all.
12178 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12179 (thread_db_free): Delete declaration.
12180 (thread_db_detach, thread_db_mourn): Declare.
12181 * thread-db.c (thread_db_init): Use thread_db_mourn.
12182 (thread_db_free): Delete, split in two.
12183 (disable_thread_event_reporting): New.
12184 (thread_db_detach): New.
12185 (thread_db_mourn): New.
12186
12187 * server.h (struct thread_info) <last_resume_kind>: New field.
12188 <attached>: Add comment.
12189 <gdb_detached>: New field.
12190 (handler_func): Change return type to int.
12191 (handle_serial_event, handle_target_event): Ditto.
12192 (gdb_connected): Declare.
12193 (tracing): Delete.
12194 (disconnected_tracing): Declare.
12195 (stop_tracing): Declare.
12196
12197 * server.c (handle_query) <qSupported>: Report support for
12198 disconnected tracing.
12199 (queue_stop_reply_callback): Account for running threads.
12200 (gdb_wants_thread_stopped): New.
12201 (gdb_wants_all_threads_stopped): New.
12202 (gdb_reattached_process): New.
12203 (handle_status): Clear the `gdb_detached' flag of all processes.
12204 In all-stop, stop all threads.
12205 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12206 (process_serial_event): If the remote connection breaks, or if an
12207 exit was forced with "monitor exit", force an event loop exit.
12208 Handle disconnected tracing on detach.
12209 (handle_serial_event): Adjust.
12210 (handle_target_event): If GDB isn't connected, forward events back
12211 to the inferior, unless the last process exited, in which case,
12212 exit gdbserver. Adjust interface.
12213
12214 * remote-utils.c (remote_open): Don't block in accept. Instead
12215 register an event loop source on the listen socket file
12216 descriptor. Refactor bits into ...
12217 (listen_desc): ... this new global.
12218 (gdb_connected): ... this new function.
12219 (enable_async_notification): ... this new function.
12220 (handle_accept_event): ... this new function.
12221 (remote_close): Clear remote_desc.
12222
12223 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12224
12225 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12226 New fields.
12227 (mourn_inferior): Define.
12228 (target_process_qsupported): Avoid the dangling else problem.
12229 (thread_stopped): Define.
12230 (pause_all): Define.
12231 (target_waitstatus_to_string): Declare.
12232 * target.c (target_waitstatus_to_string): New.
12233
12234 * tracepoint.c (tracing): Make extern.
12235 (disconnected_tracing): New.
12236 (stop_tracing): Make extern. Handle tracing stops due to GDB
12237 disconnecting.
12238 (cmd_qtdisconnected): New.
12239 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12240 (handle_tracepoint_general_set): Handle QTDisconnected.
12241
12242 * event-loop.c (event_handler_func): Change return type to int.
12243 (process_event): Bail out if the event handler wants the event
12244 loop to stop.
12245 (handle_file_event): Ditto.
12246 (start_event_loop): Bail out if the event handler wants the event
12247 loop to stop.
12248
12249 * nto-low.c (nto_target_ops): Adjust.
12250 * spu-low.c (spu_wait): Don't remove the process here.
12251 (spu_target_ops): Adjust.
12252 * win32-low.c (win32_wait): Don't remove the process here.
12253 (win32_target_ops): Adjust.
12254
5d267c4c
PA
122552010-04-11 Pedro Alves <pedro@codesourcery.com>
12256
12257 * regcache.c (realloc_register_cache): Invalidate inferior's
12258 regcache before recreating it.
12259
623ccd72
PA
122602010-04-09 Pedro Alves <pedro@codesourcery.com>
12261
12262 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12263
219f2f23
PA
122642010-04-09 Stan Shebs <stan@codesourcery.com>
12265 Pedro Alves <pedro@codesourcery.com>
12266
12267 * server.h (LONGEST): New.
12268 (struct thread_info) <while_stepping>: New field.
12269 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12270 Declare.
12271 (initialize_tracepoint, handle_tracepoint_general_set)
12272 (handle_tracepoint_query, tracepoint_finished_step)
12273 (tracepoint_was_hit, release_while_stepping_state_list):
12274 (current_traceframe): Declare.
12275 * server.c (handle_general_set): Handle tracepoint packets.
12276 (read_memory): New.
12277 (write_memory): New.
12278 (handle_search_memory_1): Use read_memory.
12279 (handle_query): Report support for conditional tracepoints, trace
12280 state variables, and tracepoint sources. Handle tracepoint
12281 queries.
12282 (main): Initialize the tracepoints module.
12283 (process_serial_event): Handle traceframe reads/writes.
12284
12285 * linux-low.c (handle_tracepoints): New.
12286 (linux_wait_1): Call it.
12287 (linux_resume_one_lwp): Handle while-stepping.
12288 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12289 (linux_target_ops): Install them.
12290 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12291 New field.
12292 * linux-x86-low.c (x86_supports_tracepoints): New.
12293 (the_low_target). Install it.
12294
12295 * mem-break.h (delete_breakpoint): Declare.
12296 * mem-break.c (delete_breakpoint): Make external.
12297
12298 * target.h (struct target_ops): Add `supports_tracepoints',
12299 `read_pc', and `write_pc' fields.
12300 (target_supports_tracepoints): Define.
12301 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12302 (phex_nz): New.
12303
12304 * regcache.h (struct regcache) <registers_owned>: New field.
12305 (init_register_cache, regcache_cpy): Declare.
12306 (regcache_read_pc, regcache_write_pc): Declare.
12307 (register_cache_size): Declare.
12308 (supply_regblock): Declare.
12309 * regcache.c (init_register_cache): New.
12310 (new_register_cache): Use it.
12311 (regcache_cpy): New.
12312 (register_cache_size): New.
12313 (supply_regblock): New.
12314 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12315
219f2f23
PA
12316 * tracepoint.c: New.
12317
12318 * Makefile.in (OBS): Add tracepoint.o.
12319 (tracepoint.o): New rule.
12320
3a13a53b
L
123212010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12322
12323 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12324 (i386-mmx.o): New.
12325 (i386-mmx.c): Likewise.
12326 (i386-mmx-linux.o): Likewise.
12327 (i386-mmx-linux.c): Likewise.
12328
12329 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12330 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12331 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12332 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12333
12334 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12335 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12336 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12337
1570b33e
L
123382010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12339
12340 * Makefile.in (clean): Updated.
12341 (i386-avx.o): New.
12342 (i386-avx.c): Likewise.
12343 (i386-avx-linux.o): Likewise.
12344 (i386-avx-linux.c): Likewise.
12345 (amd64-avx.o): Likewise.
12346 (amd64-avx.c): Likewise.
12347 (amd64-avx-linux.o): Likewise.
12348 (amd64-avx-linux.c): Likewise.
12349
12350 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12351 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12352 (srv_amd64_regobj): Add amd64-avx.o.
12353 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12354 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12355 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12356 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12357 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12358 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12359 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12360
12361 * i387-fp.c: Include "i386-xstate.h".
12362 (i387_xsave): New.
12363 (i387_cache_to_xsave): Likewise.
12364 (i387_xsave_to_cache): Likewise.
12365 (x86_xcr0): Likewise.
12366
12367 * i387-fp.h (i387_cache_to_xsave): Likewise.
12368 (i387_xsave_to_cache): Likewise.
12369 (x86_xcr0): Likewise.
12370
12371 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12372 * linux-crisv32-low.c (target_regsets): Likewise.
12373 * linux-m68k-low.c (target_regsets): Likewise.
12374 * linux-mips-low.c (target_regsets): Likewise.
12375 * linux-ppc-low.c (target_regsets): Likewise.
12376 * linux-s390-low.c (target_regsets): Likewise.
12377 * linux-sh-low.c (target_regsets): Likewise.
12378 * linux-sparc-low.c (target_regsets): Likewise.
12379 * linux-xtensa-low.c (target_regsets): Likewise.
12380
12381 * linux-low.c: Include <sys/uio.h>.
12382 (regsets_fetch_inferior_registers): Support nt_type.
12383 (regsets_store_inferior_registers): Likewise.
12384 (linux_process_qsupported): New.
12385 (linux_target_ops): Add linux_process_qsupported.
12386
12387 * linux-low.h (regset_info): Add nt_type.
12388 (linux_target_ops): Add process_qsupported.
12389
12390 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12391 and <sys/uio.h>.
12392 (init_registers_i386_avx_linux): New.
12393 (init_registers_amd64_avx_linux): Likewise.
12394 (xmltarget_i386_linux_no_xml): Likewise.
12395 (xmltarget_amd64_linux_no_xml): Likewise.
12396 (PTRACE_GETREGSET): Likewise.
12397 (PTRACE_SETREGSET): Likewise.
12398 (x86_fill_xstateregset): Likewise.
12399 (x86_store_xstateregset): Likewise.
12400 (use_xml): Likewise.
12401 (x86_linux_update_xmltarget): Likewise.
12402 (x86_linux_process_qsupported): Likewise.
12403 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12404 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12405 init_registers_i386_linux here. Call
12406 x86_linux_update_xmltarget.
12407 (the_low_target): Add x86_linux_process_qsupported.
12408
12409 * server.c (handle_query): Call target_process_qsupported.
12410
12411 * target.h (target_ops): Add process_qsupported.
12412 (target_process_qsupported): New.
12413
fc7238bb
PA
124142010-04-03 Pedro Alves <pedro@codesourcery.com>
12415
12416 * inferiors.c (add_thread): Set last_status kind to
12417 TARGET_WAITKIND_IGNORE.
12418 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12419 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12420 (linux_wait_1): Move `thread' local definition to block that uses
12421 it. Don't NULL initialize `event_child'.
12422 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12423 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12424 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12425
bdabb078
PA
124262010-04-01 Pedro Alves <pedro@codesourcery.com>
12427
12428 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12429 an extended waitstatus, or by a watchpoint.
12430 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12431 thread was stepping or has been stopped by a watchpoint.
12432
d3bbe7a0
PA
124332010-04-01 Pedro Alves <pedro@codesourcery.com>
12434
12435 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12436 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12437 of another, then delete the previous, and validate all
12438 breakpoints.
12439 (validate_inserted_breakpoint): New.
12440 (delete_disabled_breakpoints): New.
12441 (validate_breakpoints): New.
12442 (check_mem_read): Validate breakpoints before trusting their
12443 shadow. Delete disabled breakpoints.
12444 (check_mem_write): Validate breakpoints before trusting they
12445 should be inserted. Delete disabled breakpoints.
12446 * mem-break.h (validate_breakpoints):
12447 * server.c (handle_query): Validate breakpoints when we see a
12448 qSymbol query.
12449
8b07ae33
PA
124502010-04-01 Pedro Alves <pedro@codesourcery.com>
12451
12452 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12453 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12454 if we could tell there's a GDB breakpoint at stop_pc.
12455 (need_step_over_p): Don't do a step over if we find a GDB
12456 breakpoint at the resume PC.
12457
12458 * mem-break.c (struct raw_breakpoint): New.
12459 (enum bkpt_type): New type `gdb_breakpoint'.
12460 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12461 fields. New field `raw'.
12462 (find_raw_breakpoint_at): New.
12463 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12464 breakpoint instead.
12465 (set_breakpoint_at): Adjust.
12466 (delete_raw_breakpoint): New.
12467 (release_breakpoint): New.
12468 (delete_breakpoint): Rename to...
12469 (delete_breakpoint_1): ... this. Add proc parameter. Use
12470 release_breakpoint. Return ENOENT.
12471 (delete_breakpoint): Reimplement.
12472 (find_breakpoint_at): Delete.
12473 (find_gdb_breakpoint_at): New.
12474 (delete_breakpoint_at): Delete.
12475 (set_gdb_breakpoint_at): New.
12476 (delete_gdb_breakpoint_at): New.
12477 (gdb_breakpoint_here): New.
12478 (set_reinsert_breakpoint): Use release_breakpoint.
12479 (uninsert_breakpoint): Rename to ...
12480 (uninsert_raw_breakpoint): ... this.
12481 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12482 (reinsert_raw_breakpoint): Change parameter type to
12483 raw_breakpoint.
12484 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12485 instead.
12486 (check_breakpoints): Adjust. Use release_breakpoint.
12487 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12488 (breakpoint_inserted_here): Ditto.
12489 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12490 Don't trust the breakpoint's shadow if it is not inserted.
12491 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12492 (delete_all_breakpoints): Adjust.
12493 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12494 use delete_breakpoint_1.
12495
12496 * mem-break.h (breakpoints_supported): Delete declaration.
12497 (set_gdb_breakpoint_at): Declare.
12498 (gdb_breakpoint_here): Declare.
12499 (delete_breakpoint_at): Delete.
12500 (delete_gdb_breakpoint_at): Declare.
12501
12502 * server.h (struct raw_breakpoint): Forward declare.
12503 (struct process_info): New field `raw_breakpoints'.
12504
12505 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12506 breakpoints.
12507
6bf5e0ba
PA
125082010-03-24 Pedro Alves <pedro@codesourcery.com>
12509
12510 * linux-low.c (status_pending_p_callback): Fix comment.
12511 (linux_wait_for_event_1): Move most of the internal breakpoint
12512 handling from here...
12513 (linux_wait_1): ... to here.
12514 (count_events_callback): New.
12515 (select_singlestep_lwp_callback): New.
12516 (select_event_lwp_callback): New.
12517 (cancel_breakpoints_callback): New.
12518 (select_event_lwp): New.
12519 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12520 priority to all LWPs that have had events that should be reported
12521 to the client. Cancel breakpoints when about to reporting the
12522 event to the client, not while stopping lwps. No longer cancel
12523 finished single-steps here.
12524 (cancel_finished_single_step): Delete.
12525 (cancel_finished_single_steps): Delete.
12526
414a389f
PA
125272010-03-24 Pedro Alves <pedro@codesourcery.com>
12528
12529 * mem-break.c (enum bkpt_type): New.
12530 (struct breakpoint): New field `type'.
12531 (set_breakpoint_at): Change return type to struct breakpoint
12532 pointer. Set type to `other_breakpoint' by default.
12533 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12534 in the breakpoint list.
12535 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12536 (reinsert_breakpoint): Rename to ...
12537 (reinsert_raw_breakpoint): ... this.
12538 (reinsert_breakpoints_at): Adjust.
12539 * mem-break.h (struct breakpoint): Declare.
12540 (set_breakpoint_at): Change return type to struct breakpoint
12541 pointer.
12542
2280c721
PA
125432010-03-24 Pedro Alves <pedro@codesourcery.com>
12544
12545 * server.c (handle_query): Assign, not compare.
12546
d50171e4
PA
125472010-03-24 Pedro Alves <pedro@codesourcery.com>
12548
12549 Teach linux gdbserver to step-over-breakpoints.
12550
12551 * linux-low.c (can_hardware_single_step): New.
12552 (supports_breakpoints): New.
12553 (handle_extended_wait): If stopping threads, read the stop pc of
12554 the new cloned LWP.
12555 (get_pc): New.
12556 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12557 low target doesn't support retrieving the PC.
12558 (add_lwp): Set last_resume_kind to resume_continue.
12559 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12560 (linux_attach): Don't clear stop_expected. Set the lwp's
12561 last_resume_kind to resume_stop.
12562 (linux_detach_one_lwp): Don't check for removed breakpoints.
12563 (check_removed_breakpoint): Delete.
12564 (status_pending_p): Rename to ...
12565 (status_pending_p_callback): ... this. Don't check for removed
12566 breakpoints. Don't consider threads that are stopped from GDB's
12567 perspective.
12568 (linux_wait_for_lwp): Always read the stop_pc here.
12569 (cancel_breakpoint): New.
12570 (step_over_bkpt): New global.
12571 (linux_wait_for_event_1): Implement stepping over breakpoints.
12572 (gdb_wants_lwp_stopped): New.
12573 (gdb_wants_all_stopped): New.
12574 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12575 single-step traps here. Store the thread's last reported target
12576 wait status.
12577 (send_sigstop): Don't clear stop_expected. Always set it,
12578 instead.
12579 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12580 (cancel_finished_single_step): New.
12581 (cancel_finished_single_steps): New.
12582 (wait_for_sigstop): Don't cancel finished single-step traps here.
12583 (linux_resume_one_lwp): Don't check for removed breakpoints.
12584 Don't set `step' on non-hardware step archs.
12585 (linux_set_resume_request): Ignore resume_stop requests if already
12586 stopping or stopped. Set the lwp's last_resume_kind.
12587 (resume_status_pending_p): Don't check for removed breakpoints.
12588 (need_step_over_p): New.
12589 (start_step_over): New.
12590 (finish_step_over): New.
12591 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12592 requests. Clear the thread's last reported target waitstatus.
12593 Don't use the `suspended' flag. Don't consider pending breakpoints.
12594 (linux_resume): Start a step-over if necessary.
12595 (proceed_one_lwp): New.
12596 (proceed_all_lwps): New.
12597 (unstop_all_lwps): New.
12598 * linux-low.h (struct lwp_info): Rewrite comment for the
12599 `suspended' flag. Add the `stop_pc' field. Delete the
12600 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12601 Add `'last_resume_kind' and `need_step_over' fields.
12602 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12603 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12604 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12605 (set_raw_breakpoint_at): New.
12606 (set_breakpoint_at): Rewrite to use it.
12607 (reinsert_breakpoint_handler): Delete.
12608 (set_reinsert_breakpoint): New.
12609 (reinsert_breakpoint_by_bp): Delete.
12610 (delete_reinsert_breakpoints): New.
12611 (uninsert_breakpoint): Rewrite.
12612 (uninsert_breakpoints_at): New.
12613 (reinsert_breakpoint): Rewrite.
12614 (reinsert_breakpoints_at): New.
12615 (check_breakpoints): Rewrite.
12616 (breakpoint_here): New.
12617 (breakpoint_inserted_here): New.
12618 (check_mem_read): Adjust.
12619 * mem-break.h (breakpoints_supported, breakpoint_here)
12620 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12621 (reinsert_breakpoint_by_bp): Delete declaration.
12622 (delete_reinsert_breakpoints): Declare.
12623 (reinsert_breakpoint): Delete declaration.
12624 (reinsert_breakpoints_at): Declare.
12625 (uninsert_breakpoint): Delete declaration.
12626 (uninsert_breakpoints_at): Declare.
12627 (check_breakpoints): Adjust prototype.
12628 * server.h: Adjust include order.
12629 (struct thread_info): Declare here. Add a `last_status' field.
12630
30ba68cb
MS
126312010-03-23 Michael Snyder <msnyder@vmware.com>
12632
12633 * server.c (crc32): New function.
12634 (handle_query): Add handling for 'qCRC:' request.
12635
b9a881c2
PA
126362010-03-23 Pedro Alves <pedro@codesourcery.com>
12637
12638 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12639 lwp had been stopped by a watchpoint.
12640
e92d13d5
PA
126412010-03-16 Pedro Alves <pedro@codesourcery.com>
12642
12643 * server.h (internal_error): Declare.
12644 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12645 * utils.c (internal_error): New function.
12646
64daa791
AS
126472010-03-15 Andreas Schwab <schwab@redhat.com>
12648
12649 * configure.srv: Fix typo setting srv_regobj.
12650
f52cd8cd
PA
126512010-03-15 Pedro Alves <pedro@codesourcery.com>
12652
12653 * linux-low.c (fetch_register): Avoid passing a non string literal
12654 format to `error'.
12655 (usr_store_inferior_registers): Ditto.
12656
93ae6fdc
PA
126572010-03-14 Pedro Alves <pedro@codesourcery.com>
12658
12659 * linux-low.c (linux_write_memory): Bail out early if peeking
12660 memory failed.
12661
c3adc08c
PA
126622010-03-14 Pedro Alves <pedro@codesourcery.com>
12663
12664 * linux-low.h (struct lwp_info): New fields
12665 `stopped_by_watchpoint' and `stopped_data_address'.
12666 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12667 here, and cache them in the lwp object.
12668 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12669 directly.
12670 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12671 field.
12672 (linux_stopped_by_watchpoint): Rewrite.
12673 (linux_stopped_data_address): Rewrite.
12674
bce522a2
PA
126752010-03-06 Simo Melenius <simo.melenius@iki.fi>
12676
12677 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12678 switching the current inferior, not before.
12679
90884b2b
L
126802010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12681
12682 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12683 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12684 i386-linux.c and amd64-linux.c.
12685 (reg-i386.o): Removed.
12686 (reg-i386.c): Likewise.
12687 (reg-i386-linux.o): Likewise.
12688 (reg-i386-linux.c): Likewise.
12689 (reg-x86-64.o): Likewise.
12690 (reg-x86-64.c): Likewise.
12691 (reg-x86-64-linux.o): Likewise.
12692 (reg-x86-64-linux.c): Likewise.
12693 (i386.o): New.
12694 (i386.c): Likewise.
12695 (i386-linux.o): Likewise.
12696 (i386-linux.c): Likewise.
12697 (amd64.o): Likewise.
12698 (amd64.c): Likewise.
12699 (amd64-linux.o): Likewise.
12700 (amd64-linux.c): Likewise.
12701
12702 * configure.srv (srv_i386_regobj): New.
12703 (srv_i386_linux_regobj): Likewise.
12704 (srv_amd64_regobj): Likewise.
12705 (srv_amd64_linux_regobj): Likewise.
12706 (srv_i386_32bit_xmlfiles): Likewise.
12707 (srv_i386_64bit_xmlfiles): Likewise.
12708 (srv_i386_xmlfiles): Likewise.
12709 (srv_amd64_xmlfiles): Likewise.
12710 (srv_i386_linux_xmlfiles): Likewise.
12711 (srv_amd64_linux_xmlfiles): Likewise.
12712 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12713 srv_xmlfiles to $srv_i386_xmlfiles.
12714 (i[34567]86-*-mingw32ce*): Likewise.
12715 (i[34567]86-*-mingw*): Likewise.
12716 (i[34567]86-*-nto*): Likewise.
12717 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12718 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12719 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12720 (x86_64-*-linux*): Likewise.
12721
12722 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12723 (init_registers_amd64_linux): New.
12724 (x86_arch_setup): Replace init_registers_x86_64_linux with
12725 init_registers_amd64_linux.
12726
193f13e6
MK
127272010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12728
12729 * configure.ac: Check for libdl. If it is not available link against
12730 static libthread_db.
12731 * configure: Regenerate.
12732
85d721b8
PA
127332010-02-22 Pedro Alves <pedro@codesourcery.com>
12734
12735 PR9605
12736
12737 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12738 handing a read watchpoint.
12739 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12740
6076632b
DE
127412010-02-12 Doug Evans <dje@google.com>
12742
12743 * linux-low.c (linux_supports_tracefork_flag): Document.
12744 (linux_look_up_symbols): Add comment.
12745
3327ccf7
L
127462010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12747
12748 * regcache.c (supply_register): Clear regcache if buf is NULL.
12749
0718675c 127502010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12751 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12752
12753 * inferiors.c (find_inferior): Add function documentation.
12754 (unloaded_dll): Handle the case where the unloaded dll has not
12755 been previously registered in the dll list.
12756
177321bd
DJ
127572010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12758
12759 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12760 (thumb2_breakpoint): New.
12761 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12762
2b009048
DJ
127632010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12764
12765 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12766 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12767 breakpoints.
12768
3be029c7
PA
127692010-01-21 Pedro Alves <pedro@codesourcery.com>
12770
12771 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12772
18f5de3b
JK
127732010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12774
12775 * linux-s390-low.c (s390_collect_ptrace_register)
12776 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12777
3743bb4f
DE
127782010-01-21 Doug Evans <dje@google.com>
12779
14ce3065
DE
12780 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12781 (PTRACE_ARG4_TYPE): New macro.
12782 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12783 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12784 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12785 (usr_store_inferior_registers): Ditto.
12786 (linux_read_memory, linux_write_memory): Ditto.
12787 (linux_test_for_tracefork): Ditto.
12788
3743bb4f
DE
12789 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12790 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12791
8b315be5
PA
127922010-01-21 Pedro Alves <pedro@codesourcery.com>
12793
12794 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12795 target.
12796
85492558
PA
127972010-01-21 Pedro Alves <pedro@codesourcery.com>
12798
12799 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12800 prototype to take a regcache. Adjust.
12801
442ea881
PA
128022010-01-20 Pedro Alves <pedro@codesourcery.com>
12803
12804 * regcache.h (struct thread_info): Forward declare.
12805 (struct regcache): New.
12806 (new_register_cache): Adjust prototype.
12807 (get_thread_regcache): Declare.
12808 (free_register_cache): Adjust prototype.
12809 (registers_to_string, registers_from_string): Ditto.
12810 (supply_register, supply_register_by_name, collect_register)
12811 (collect_register_as_string, collect_register_by_name): Ditto.
12812 * regcache.c (struct inferior_regcache_data): Delete.
12813 (get_regcache): Rename to ...
12814 (get_thread_regcache): ... this. Adjust. Switch inferior before
12815 fetching registers.
12816 (regcache_invalidate_one): Adjust.
12817 (regcache_invalidate): Fix prototype.
12818 (new_register_cache): Return the new register cache.
12819 (free_register_cache): Change prototype.
12820 (realloc_register_cache): Adjust.
12821 (registers_to_string): Change prototype to take a regcache. Adjust.
12822 (registers_from_string): Ditto.
12823 (register_data): Ditto.
12824 (supply_register): Ditto.
12825 (supply_register_by_name): Ditto.
12826 (collect_register): Ditto.
12827 (collect_register_as_string): Ditto.
12828 (collect_register_by_name): Ditto.
12829 * server.c (process_serial_event): Adjust.
12830 * linux-low.h (regset_fill_func, regset_store_func): Change
12831 prototype.
12832 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12833 Change prototype.
12834 * linux-low.c (get_stop_pc): Adjust.
12835 (check_removed_breakpoint): Adjust.
12836 (linux_wait_for_event): Adjust.
12837 (linux_resume_one_lwp): Adjust.
12838 (fetch_register): Add regcache parameter. Adjust.
12839 (usr_store_inferior_registers): Ditto.
12840 (regsets_fetch_inferior_registers): Ditto.
12841 (regsets_store_inferior_registers): Ditto.
12842 (linux_fetch_registers, linux_store_registers): Ditto.
12843 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12844 regcache. Adjust.
43aaf8b6
PA
12845 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12846 Ditto.
442ea881
PA
12847 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12848 prototype to take a regcache.
12849 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12850 * remote-utils.c (convert_ascii_to_int, outreg)
12851 (prepare_resume_reply): Change prototype to take a regcache.
12852 Adjust.
12853 * target.h (struct target_ops) <fetch_registers, store_registers>:
12854 Change prototype to take a regcache.
12855 (fetch_inferior_registers, store_inferior_registers): Change
12856 prototype to take a regcache. Adjust.
12857 * proc-service.c (ps_lgetregs): Adjust.
12858 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12859 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12860 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12861 take a regcache. Adjust.
12862 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12863 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12864 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12865 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12866 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12867 (cris_cannot_fetch_register):
12868 (cris_breakpoint_at): Change prototype to take a regcache.
12869 Adjust.
12870 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12871 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12872 to take a regcache. Adjust.
12873 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12874 Adjust.
12875 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12876 take a regcache. Adjust.
12877 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12878 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12879 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12880 * linux-mips-low.c (mips_get_pc):
12881 (mips_set_pc): Change prototype to take a regcache. Adjust.
12882 (mips_reinsert_addr): Adjust.
12883 (mips_collect_register): Change prototype to take a regcache.
12884 Adjust.
12885 (mips_supply_register):
12886 (mips_collect_register_32bit, mips_supply_register_32bit)
12887 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12888 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12889 * linux-ppc-low.c (ppc_supply_ptrace_register)
12890 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12891 (parse_spufs_run): Adjust.
12892 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12893 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12894 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12895 take a regcache. Adjust.
12896 * linux-s390-low.c (s390_collect_ptrace_register)
12897 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12898 (s390_set_pc): Change prototype to take a regcache. Adjust.
12899 (s390_arch_setup): Adjust.
12900 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12901 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12902 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12903 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12904 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12905 regcache. Adjust.
12906 (sparc_breakpoint_at): Adjust.
12907 * linux-xtensa-low.c (xtensa_fill_gregset):
12908 (xtensa_store_gregset):
12909 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12910 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12911 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12912 prototype to take a regcache. Adjust.
12913 * win32-arm-low.c (arm_fetch_inferior_register)
12914 (arm_store_inferior_register): Change prototype to take a
12915 regcache. Adjust.
12916 * win32-i386-low.c (i386_fetch_inferior_register)
12917 (i386_store_inferior_register): Change prototype to take a
12918 regcache. Adjust.
12919 * win32-low.c (child_fetch_inferior_registers)
12920 (child_store_inferior_registers): Change prototype to take a
12921 regcache. Adjust.
12922 (win32_wait): Adjust.
12923 (win32_fetch_inferior_registers): Change prototype to take a
12924 regcache. Adjust.
12925 (win32_store_inferior_registers): Adjust.
12926 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12927 store_inferior_register>: Change prototype to take a regcache.
12928
60c3d7b0
DE
129292010-01-20 Doug Evans <dje@google.com>
12930
12931 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12932 #ifdef.
12933 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12934 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12935
dc146f7c
VP
129362010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12937
12938 * linux-low.c (linux_core_of_thread): New.
12939 (compare_ints, show_process, list_threads): New.
12940 (linux_qxfer_osdata): Report threads and cores.
12941 (linux_target_op): Register linux_core_of_thread.
12942 * remote-utils.c (prepare_resume_reply): Report the core.
12943 (buffer_xml_printf): Support %d specifier.
12944 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12945 New.
12946 (handle_query): Handle qXfer:threads. Announce availability
12947 thereof.
12948 * target.h (struct target_ops): New field core_of_thread.
12949
7803799a
UW
129502010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12951
12952 * Makefile.in (clean): Remove new generated files.
12953 (reg-s390.o, reg-s390.c): Remove rules.
12954 (reg-s390x.o, reg-s390x.c): Likewise.
12955 (s390-linux32.o, s390-linux32.c): Add rules.
12956 (s390-linux64.o, s390-linux64.c): Likewise.
12957 (s390x-linux64.o, s390x-linux64.c): Likewise.
12958 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12959 * linux-s390-low.c: Include <elf.h>.
12960 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12961 (init_registers_s390): Remove prototype.
12962 (init_registers_s390x): Likewise.
12963 (init_registers_s390_linux32): Add prototype.
12964 (init_registers_s390_linux64): Likewise.
12965 (init_registers_s390x_linux64): Likewise.
12966 (s390_num_regs_3264): New define.
12967 (s390_regmap_3264): New global variable.
12968 (s390_cannot_fetch_register): Remove obsolete check.
12969 (s390_cannot_store_register): Likewise.
12970 (s390_collect_ptrace_register): Handle upper/lower register halves.
12971 (s390_supply_ptrace_register): Likewise.
12972 (s390_fill_gregset): Update to register number changes.
12973 (s390_get_hwcap): New routine.
12974 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12975 Install appropriate regmap and register set.
12976
6e7ffa39
JB
129772010-01-01 Joel Brobecker <brobecker@adacore.com>
12978
12979 * server.c (gdbserver_version): Update copyright year to 2010.
12980 * gdbreplay.c (gdbreplay_version): Likewise.
12981
957f3f49
DE
129822009-12-28 Doug Evans <dje@google.com>
12983
12984 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12985 elf/external.h. Include <elf.h> instead but only if necessary.
12986
ca5c370d
PA
129872009-12-28 Pedro Alves <pedro@codesourcery.com>
12988
12989 * linux-low.c (linux_remove_process): Remove `detaching'
12990 parameter. Don't release/detach from thread_db here.
12991 (linux_kill): Release/detach from thread_db here, ...
12992 (linux_detach): ... and here, before actually detaching.
12993 (linux_wait_1): ... and here, when a process exits.
12994 * thread-db.c (any_thread_of): New.
12995 (thread_db_free): Switch the current inferior to a thread of the
12996 passed in process.
12997
4ee62156
DE
129982009-12-21 Doug Evans <dje@google.com>
12999
d90e6a88
DE
13000 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13001
c5f62d5f
DE
13002 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13003 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13004 warning ifndef __NR_tkill. Move setting of errno there too.
13005 Delete unnecessary resetting of errno after syscall.
13006 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13007
10e86dd7
DE
13008 * configure.ac: Check for dladdr.
13009 * config.in: Regenerate.
13010 * configure: Regenerate.
13011 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13012 (try_thread_db_load): Update.
13013
4ee62156
DE
13014 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13015
00f515da
DE
130162009-12-18 Doug Evans <dje@google.com>
13017
e9464885
DE
13018 * event-loop.c: Include unistd.h if it exists.
13019
07d4f67e
DE
13020 * linux-low.c (my_waitpid): Move definition away from being in
13021 between linux_tracefork_child/linux_test_for_tracefork.
13022
00f515da
DE
13023 * gdb_proc_service.h (psaddr_t): Fix type.
13024 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13025 signature to match glibc.
13026
1de1badb
DE
130272009-12-16 Doug Evans <dje@google.com>
13028
13029 * linux-low.c (linux_read_memory): Fix argument to read.
13030
aeeb81d1
PA
130312009-11-26 Pedro Alves <pedro@codesourcery.com>
13032
13033 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13034 events, don't leave current_inferior pointing at null.
13035
10357975
PA
130362009-11-26 Pedro Alves <pedro@codesourcery.com>
13037
13038 * win32-low.c (LOG): Delete.
13039 (OUTMSG): Output to stderr.
13040 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13041 on compile time LOG macro.
13042 (win32_wait): Fix debug output.
13043
cf6e3471
PA
130442009-11-26 Pedro Alves <pedro@codesourcery.com>
13045
13046 * win32-low.c (win32_add_one_solib): If the dll name is
13047 "ntdll.dll", prepend the system directory to the dll path.
13048
0c85e18e
MK
130492009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13050
13051 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13052
9ac544ce 130532009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13054 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13055
13056 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13057 * configure.ac: Check for __mcoldfire__ and set
13058 gdb_cv_m68k_is_coldfire.
13059 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13060 reg-cf.o and reg-m68k.o.
13061 * configure: Regenerated.
13062
fd7dd3e6
PA
130632009-11-16 Pedro Alves <pedro@codesourcery.com>
13064
13065 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13066 Pass it to thread_db_free.
13067 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13068 proper `detaching' argument to linux_remove_process.
13069 * linux-low.h (thread_db_free): Add `detaching' parameter.
13070 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13071 to thread_db_free.
13072 (thread_db_free): Add `detaching' parameter. Only
13073 call td_ta_clear_event if detaching from process.
13074
75aa492e
MK
130752009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13076
13077 * thread-db.c (thread_db_free): Fix typo.
13078
21e1bee4
PP
130792009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13080
13081 PR gdb/10838
13082 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13083
8838b45e
NS
130842009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13085
13086 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13087 with an i686 compiler.
13088 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13089 needed.
13090 * configure: Rebuilt.
13091
8a35fb51
SL
130922009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13093
13094 PR gdb/10783
13095
13096 * server.c (handle_search_memory_1): Correct read_addr initialization
13097 in loop for searching subsequent chunks.
13098
96f15937
PP
130992009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13100
13101 * configure.ac: New --with-libthread-db option.
13102 * thread-db.c: Allow direct dependence on libthread_db.
13103 (thread_db_free): Adjust.
13104 * config.in: Regenerate.
13105 * configure: Likewise.
889bf7c5 13106
5f7d1694
PP
131072009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13108
13109 PR gdb/10757
13110 * thread-db.c (attach_thread): New function.
13111 (maybe_attach_thread): Return success/failure.
13112 (find_new_threads_callback): Adjust.
889bf7c5
PA
13113 (thread_db_find_new_threads): Loop until no new threads.
13114
88e3b899
PA
131152009-10-13 Pedro Alves <pedro@codesourcery.com>
13116
13117 * proc-service.c (ps_lgetregs): Formatting.
13118
cdbfd419
PP
131192009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13120
13121 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13122 * configure.ac: Adjust.
13123 * linux-low.h (struct process_info_private): Move members to struct
13124 thread_db.
13125 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13126 * linux-low.c (linux_remove_process): Adjust.
13127 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13128 * server.c (handle_query): Move code ...
13129 (handle_monitor_command): ... here. New function.
13130 * target.h (struct target_ops): New member.
13131 * thread-db.c (struct thread_db): New.
13132 (libthread_db_search_path): New variable.
13133 (thread_db_create_event, thread_db_enable_reporting)
13134 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13135 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13136 (try_thread_db_load_1, dladdr_to_soname): New functions.
13137 (try_thread_db_load, thread_db_load_search): New functions.
13138 (thread_db_init): Search for libthread_db.
13139 (thread_db_free): New function.
13140 (thread_db_handle_monitor_command): Likewise.
13141 * config.in: Regenerate.
13142 * configure: Regenerate.
889bf7c5 13143
4168d2d6
UW
131442009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13145
13146 * spu-low.c (spu_kill): Wait for inferior to terminate.
13147 Call clear_inferiors.
13148 (spu_detach): Call clear_inferiors.
13149
81ecdfbb
RW
131502009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13151
13152 * aclocal.m4: Regenerate.
13153 * config.in: Likewise.
13154 * configure: Likewise.
13155
0b9ff2c0
UW
131562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13157
13158 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13159 (parse_spufs_run): New function.
13160 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13161 (ppc_breakpoint_at): Handle SPU breakpoints.
13162
efcbbd14
UW
131632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13164
13165 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13166 (SPUFS_MAGIC): Define.
13167 (spu_enumerate_spu_ids): New function.
13168 (linux_qxfer_spu): New function.
13169 (linux_target_ops): Install linux_qxfer_spu.
13170
f4d9bade
UW
131712009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13172
13173 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13174 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13175 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13176 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13177 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13178 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13179 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13180 (init_registers_powerpc_cell32l): Add prototype.
13181 (init_registers_powerpc_cell64l): Likewise.
13182 (ppc_arch_setup): Detect Cell/B.E. architecture.
13183
96e946ca
RW
131842009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13185
13186 * Makefile.in (datarootdir): New variable.
13187
58d6951d
DJ
131882009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13189
13190 * linux-low.c (linux_write_memory): Update debugging output.
13191 * Makefile.in (clean): Add new descriptions.
13192 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13193 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13194 * configure.srv: Add new files for arm*-*-linux*.
13195 * linux-arm-low.c: Add new declarations.
13196 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13197 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13198 (HWCAP_VFPv3D16): New.
13199 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13200 instead of __IWMMXT__.
13201 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13202 (arm_arch_setup): New.
13203 (target_regsets): Remove #ifdef. Add VFP regset.
13204 (the_low_target): Use arm_arch_setup.
13205
12b42a12
DJ
132062009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13207
13208 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13209 the main thread again.
13210
ac8c974e
AR
132112009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13212
13213 Adding Neutrino gdbserver.
13214 * configure: Regenerated.
13215 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13216 * configure.srv (i[34567]86-*-nto*): New target.
13217 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13218 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13219 (nto_comctrl) [__QNX__]: New function.
13220 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13221
4424e0c3 132222009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13223
13224 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13225 srv_tgtobj.
13226
912cf4ba
PA
132272009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13228 Pedro Alves <pedro@codesourcery.com>
13229
13230 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13231 don't support CONTEXT_EXTENDED_REGISTERS.
13232 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13233 (the_low_target): Install them.
13234 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13235 failing with ERROR_PIPE_NOT_CONNECTED.
13236
aa5ca48f
DE
132372009-06-30 Doug Evans <dje@google.com>
13238 Pierre Muller <muller@ics.u-strasbg.fr>
13239
13240 Add h/w watchpoint support to x86-linux, win32-i386.
13241 * Makefile.in (SFILES): Add i386-low.c
13242 (i386_low_h): Define.
13243 (i386-low.o): Add dependencies.
13244 (linux-x86-low.o): Add i386-low.h dependency.
13245 (win32-i386-low.o): Ditto.
13246 * i386-low.c: New file.
13247 * i386-low.h: New file.
13248 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13249 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13250 * linux-low.c (linux_add_process): Initialize arch_private.
13251 (linux_remove_process): Free arch_private.
13252 (add_lwp): Initialize arch_private.
13253 (delete_lwp): Free arch_private.
13254 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13255 provided.
13256 * linux-low.h (process_info_private): New member arch_private.
13257 (lwp_info): New member arch_private.
13258 (linux_target_ops): New members new_process, new_thread,
13259 prepare_to_resume.
13260 (ptid_of): New macro.
13261 * linux-x86-low.c: Include stddef.h, i386-low.h.
13262 (arch_process_info): New struct.
13263 (arch_lwp_info): New struct.
13264 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13265 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13266 (i386_dr_low_get_status): New function.
13267 (x86_insert_point, x86_remove_point): New functions.
13268 (x86_stopped_by_watchpoint): New function.
13269 (x86_stopped_data_address): New function.
13270 (x86_linux_new_process, x86_linux_new_thread): New functions.
13271 (x86_linux_prepare_to_resume): New function.
13272 (the_low_target): Add entries for insert_point, remove_point,
13273 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13274 prepare_to_resume.
13275 * server.c (debug_hw_points): New global.
13276 (monitor_show_help): Document set debug-hw-points.
13277 (handle_query): Process "set debug-hw-points".
13278 * server.h (debug_hw_points): Declare.
13279 (paddress): Declare.
13280 * utils.c (NUMCELLS, CELLSIZE): New macros.
13281 (get_sell, xsnprintf, paddress): New functions.
13282 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13283 remove_point, stopped_by_watchpoint, stopped_data_address.
13284 * win32-i386-low.c: Include i386-low.h.
13285 (debug_reg_state): Replaces dr.
13286 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13287 (i386_dr_low_get_status): New function.
13288 (i386_insert_point, i386_remove_point): New functions.
13289 (i386_stopped_by_watchpoint): New function.
13290 (i386_stopped_data_address): New function.
13291 (i386_initial_stuff): Update.
13292 (get_thread_context,set_thread_context,i386_thread_added): Update.
13293 (the_low_target): Add entries for insert_point,
13294 remove_point, stopped_by_watchpoint, stopped_data_address.
13295 * win32-low.c (win32_insert_watchpoint): New function.
13296 (win32_remove_watchpoint): New function.
13297 (win32_stopped_by_watchpoint): New function.
13298 (win32_stopped_data_address): New function.
13299 (win32_target_ops): Add entries for insert_watchpoint,
13300 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13301 * win32-low.h (win32_target_ops): New members insert_point,
13302 remove_point, stopped_by_watchpoint, stopped_data_address.
13303
d993e290
PA
133042009-06-25 Pedro Alves <pedro@codesourcery.com>
13305
13306 * server.c (process_serial_event): Re-return unsupported, not
13307 error, if the type isn't recognized. Re-allow supporting only
13308 insert or remove packets. Also call require_running for
13309 breakpoints. Add missing break statement to default case. Tidy.
13310 * target.h (struct target_ops): Rename insert_watchpoint to
13311 insert_point, and remove_watchpoint to remove_point.
13312
13313 * linux-low.h (struct linux_target_ops): Likewise.
13314 * linux-low.c (linux_insert_watchpoint): Rename to ...
13315 (linux_insert_point): ... this. Adjust.
13316 (linux_remove_watchpoint): Rename to ...
13317 (linux_remove_point): ... this. Adjust.
13318 (linux_target_ops): Adjust.
13319 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13320 (cris_insert_point): ... this.
13321 (cris_remove_watchpoint): Rename to ...
13322 (cris_remove_point): ... this.
13323 (the_low_target): Adjust.
13324
0f54c268
PM
133252009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13326
13327 * server.c (handle_v_kill): Pass signal_pid to
13328 kill_inferior if multi_process is zero.
13329
c6314022
AR
133302009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13331
13332 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13333 * target.h (target_ops): Comment for *_watchpoint to make it clear
13334 the functions can get types '0' and '1'.
13335
4463ce24
AR
133362009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13337
13338 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13339 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13340 * regcache.c (get_regcache): Likewise.
13341 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13342 * win32-low.c (child_fetch_inferior_registers): Remove check for
13343 regno 0.
13344
cf8fd78b
PA
133452009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13346 Pedro Alves <pedro@codesourcery.com>
13347
13348 * target.h (struct target_ops) <supports_multi_process>: New
13349 callback.
13350 (target_supports_multi_process): New.
13351 * server.c (handle_query): Even if GDB reports support, only
13352 enable multi-process if the target also supports it. Report
13353 multi-process support only if the target backend supports it.
13354 * linux-low.c (linux_supports_multi_process): New function.
13355 (linux_target_ops): Install it as target_supports_multi_process
13356 callback.
13357
47c0c975
DE
133582009-05-24 Doug Evans <dje@google.com>
13359
e09875d4
DE
13360 Global renaming of find_thread_pid to find_thread_ptid.
13361 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13362 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13363 All callers updated.
13364
e27d73f6
DE
13365 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13366 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13367 directly.
13368
47c0c975
DE
13369 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13370 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13371 (linux_resume_one_lwp): Ditto.
13372
2acc282a
DE
133732009-05-23 Doug Evans <dje@google.com>
13374
13375 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13376 from struct inferior_list_entry * to struct lwp_info *.
13377 All callers updated.
13378
9f1036c1
DE
133792009-05-13 Doug Evans <dje@google.com>
13380
13381 * linux-x86-low.c: Don't include assert.h.
13382 (x86_siginfo_fixup): Use fatal, not assert.
13383 (x86_arch_setup): Fix comment.
13384
d0722149
DE
133852009-05-12 Doug Evans <dje@google.com>
13386
13387 Biarch support for i386/amd64 gdbserver.
13388 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13389 Add linux-x86-low.c.
13390 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13391 (linux-x86-low.o): Add.
13392 * linux-x86-64-low.c: Delete.
13393 * linux-i386-low.c: Delete.
13394 * linux-x86-low.c: New file.
13395 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13396 linux-x86-low.o.
13397 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13398 linux-x86-low.o.
13399 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13400 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13401 (linux_child_pid_to_exec_file): New function.
13402 (elf_64_header_p, elf_64_file_p): New functions.
13403 (siginfo_fixup): New function.
13404 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13405 give target a chance to convert layout.
13406 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13407 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13408
fdeb2a12
DE
134092009-05-07 Doug Evans <dje@google.com>
13410
13411 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13412 (regsets_store_inferior_registers): Ditto.
13413
a6dbe5df
PA
134142009-05-06 Pedro Alves <pedro@codesourcery.com>
13415
13416 PR server/10048
13417
13418 * linux-low.c (must_set_ptrace_flags): Delete.
13419 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13420 of the global.
13421 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13422 `lwp->must_set_ptrace_flags' instead.
ba42693b 13423 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13424 (linux_wait_1): ... not here.
13425
5091eb23
DE
134262009-04-30 Doug Evans <dje@google.com>
13427
9f767825
DE
13428 * inferiors.c (started_inferior_callback): New function.
13429 (attached_inferior_callback): New function.
13430 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13431 * server.c (print_started_pid, print_attached_pid): New functions.
13432 (detach_or_kill_for_exit): New function.
13433 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13434 * server.h (have_started_inferiors_p): Declare.
13435 (have_attached_inferiors_p): Declare.
13436
5091eb23
DE
13437 * inferiors.c (remove_process): Fix memory leak, free process.
13438 * linux-low.c (linux_remove_process): New function.
13439 (linux_kill): Call it instead of remove_process.
13440 (linux_detach, linux_wait_1): Ditto.
13441
155c8968
PA
134422009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13443
13444 * configure.srv: Add x86 Windows CE target.
13445
7fe519cb
UW
134462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13447
13448 * inferiors.c (get_thread_process): Make global.
13449 * server.h (get_thread_process): Add prototype.
13450 * thread-db.c (find_one_thread): Use get_thread_process
13451 instead of current_process.
13452 (thread_db_get_tls_address): Do not crash if called when
13453 thread layer is not yet initialized.
13454
5472f405
UW
134552009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13456
13457 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13458 * spu-low.c (current_tid): Rename to ...
13459 (current_ptid): ... this.
13460 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13461 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13462 ptid_get_lwp (current_ptid) instead of current_tid.
13463 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13464 instead of current_tid. Use find_process_pid to verify pid
13465 argument is valid. Pass proper argument to remove_process.
13466 (spu_thread_alive): Compare current_ptid instead of current_tid.
13467 (spu_resume): Likewise.
13468
55ac2b99
PA
134692009-04-02 Pedro Alves <pedro@codesourcery.com>
13470
13471 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13472 variable.
13473
95954743
PA
134742009-04-01 Pedro Alves <pedro@codesourcery.com>
13475
13476 Implement the multiprocess extensions, and add linux multiprocess
13477 support.
13478
13479 * server.h (ULONGEST): Declare.
13480 (struct ptid, ptid_t): New.
13481 (minus_one_ptid, null_ptid): Declare.
13482 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13483 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13484 (struct inferior_list_entry): Change `id' type from unsigned from
13485 to ptid_t.
13486 (struct sym_cache, struct breakpoint, struct
13487 process_info_private): Forward declare.
13488 (struct process_info): Declare.
13489 (current_process): Declare.
13490 (all_processes): Declare.
13491 (initialize_inferiors): Declare.
13492 (add_thread): Adjust to use ptid_t.
13493 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13494 (add_process, remove_process, find_thread_pid): Declare.
13495 (find_inferior_id): Adjust to use ptid_t.
13496 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13497 (multi_process): Declare.
13498 (push_event): Adjust to use ptid_t.
13499 (read_ptid, write_ptid): Declare.
13500 (prepare_resume_reply): Adjust to use ptid_t.
13501 (clear_symbol_cache): Declare.
13502 * inferiors.c (all_processes): New.
13503 (null_ptid, minus_one_ptid): New.
13504 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13505 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13506 (add_thread): Change unsigned long to ptid. Remove gdb_id
13507 parameter. Adjust.
13508 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13509 (gdb_id_to_thread): Rename to ...
13510 (find_thread_pid): ... this. Change unsigned long to ptid.
13511 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13512 (loaded_dll, pull_pid_from_list): Adjust.
13513 (add_process, remove_process, find_process_pid)
13514 (get_thread_process, current_process, initialize_inferiors): New.
13515 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13516 (struct target_waitstatus) <related_pid>: Ditto.
13517 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13518 return type to int.
13519 (struct target_ops) <join>: Add `pid' argument.
13520 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13521 (struct target_ops) <wait>: Add `ptid' field. Change return type
13522 to ptid.
13523 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13524 (mywait): Add `ptid' argument. Change return type to ptid_t.
13525 (target_pid_to_str): Declare.
13526 * target.c (set_desired_inferior): Adjust to use ptids.
13527 (mywait): Add new `ptid' argument. Adjust.
13528 (target_pid_to_str): New.
13529 * mem-break.h (free_all_breakpoints): Declare.
13530 * mem-break.c (breakpoints): Delelete.
13531 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13532 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13533 to use per-process breakpoint list.
13534 (free_all_breakpoints): New.
13535 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13536 (symbol_cache, all_symbols_looked_up): Delete.
13537 (hexchars): New.
13538 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13539 read_ptid): New.
13540 (prepare_resume_reply): Change ptid argument's type from unsigned
13541 long to ptid_t. Adjust. Implement W;process and X;process.
13542 (free_sym_cache, clear_symbol_cache): New.
13543 (look_up_one_symbol): Adjust to per-process symbol cache. *
13544 * server.c (cont_thread, general_thread, step_thread): Change type
13545 to ptid_t.
13546 (attached): Delete.
13547 (multi_process): New.
13548 (last_ptid): Change type to ptid_t.
13549 (struct vstop_notif) <ptid>: Change type to ptid_t.
13550 (queue_stop_reply, push_event): Change `ptid' argument's type to
13551 ptid_t.
13552 (discard_queued_stop_replies): Add `pid' argument.
13553 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13554 changes. Don't reference the `attached' global.
13555 (attach_inferior): Adjust to mywait interface changes.
13556 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13557 features. Handle and report "multiprocess+". Handle
13558 "qAttached:PID".
13559 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13560 changes.
13561 (handle_v_kill): New.
13562 (handle_v_stopped): Adjust to use target_pid_to_str.
13563 (handle_v_requests): Allow multiple attaches and runs when
13564 multiprocess extensions are in effect. Handle "vKill".
13565 (myresume): Adjust to use ptids.
13566 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13567 (handle_status): Adjust to discard_queued_stop_replies interface
13568 change.
13569 (first_thread_of, kill_inferior_callback)
13570 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13571 (main): Call initialize_inferiors. Adjust to use ptids, killing
13572 and detaching from all inferiors. Handle multiprocess packet
13573 variants.
13574 * linux-low.h: Include gdb_proc_service.h.
13575 (struct process_info_private): New.
13576 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13577 <lwpid_of>: Use ptid_get_lwp.
13578 (get_lwp_thread): Adjust.
13579 (struct lwp_info): Add `dead' member.
13580 (find_lwp_pid): Declare.
13581 * linux-low.c (thread_db_active): Delete.
13582 (new_inferior): Adjust comment.
13583 (inferior_pid): Delete.
13584 (linux_add_process): New.
13585 (handle_extended_wait): Adjust.
13586 (add_lwp): Change unsigned long to ptid.
13587 (linux_create_inferior): Add process to processes table. Adjust
13588 to use ptids. Don't set new_inferior here.
13589 (linux_attach_lwp): Rename to ...
13590 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13591 it. Adjust to use ptids.
13592 (linux_attach_lwp): New.
13593 (linux_attach): Add process to processes table. Don't set
13594 new_inferior here.
13595 (struct counter): New.
13596 (second_thread_of_pid_p, last_thread_of_process_p): New.
13597 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13598 multiple processes.
13599 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13600 processes. Remove process from process table.
13601 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13602 to multiple processes.
13603 (any_thread_of): New.
13604 (linux_detach): Add `pid' argument, and handle it. Remove process
13605 from processes table.
13606 (linux_join): Add `pid' argument. Handle it.
13607 (linux_thread_alive): Change unsighed long argument to ptid_t.
13608 Consider dead lwps as not being alive.
13609 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13610 threads we're not interested in.
13611 (same_lwp, find_lwp_pid): New.
13612 (linux_wait_for_lwp): Change `pid' argument's type from int to
13613 ptid_t. Adjust.
13614 (linux_wait_for_event): Rename to ...
13615 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13616 from int to ptid_t. Adjust.
13617 (linux_wait_for_event): New.
13618 (linux_wait_1): Add `ptid' argument. Change return type to
13619 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13620 that exit from the process table.
13621 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13622 Adjust.
13623 (mark_lwp_dead): New.
13624 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13625 stopping all threads, mark its main lwp as dead.
13626 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13627 ptids.
13628 (fetch_register, usr_store_inferior_registers)
13629 (regsets_fetch_inferior_registers)
13630 (regsets_store_inferior_registers, linux_read_memory)
13631 (linux_write_memory): Inline `inferior_pid'.
13632 (linux_look_up_symbols): Adjust to use per-process
13633 `thread_db_active'.
13634 (linux_request_interrupt): Adjust to use ptids.
13635 (linux_read_auxv): Inline `inferior_pid'.
13636 (initialize_low): Don't reference thread_db_active.
13637 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13638 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13639 (ps_getpid): Return the pid of the current inferior.
13640 * thread-db.c (proc_handle, thread_agent): Delete.
13641 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13642 per-process data.
13643 (find_one_thread): Change argument type to ptid_t. Adjust to
13644 per-process data.
13645 (maybe_attach_thread): Adjust to per-process data and ptids.
13646 (thread_db_find_new_threads): Ditto.
13647 (thread_db_init): Ditto.
13648 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13649 processes table. Adjust to use ptids.
13650 (spu_kill, spu_detach): Adjust interface. Remove process from
13651 processes table.
13652 (spu_join, spu_thread_alive): Adjust interface.
13653 (spu_wait): Adjust interface. Remove process from processes
13654 table. Adjust to use ptids.
13655 * win32-low.c (current_inferior_tid): Delete.
13656 (current_inferior_ptid): New.
13657 (debug_event_ptid): New.
13658 (thread_rec): Take a ptid. Adjust.
13659 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13660 (child_delete_thread): Ditto.
13661 (do_initial_child_stuff): Add `attached' argument. Add process to
13662 processes table.
13663 (child_fetch_inferior_registers, child_store_inferior_registers):
13664 Adjust.
13665 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13666 (win32_attach): Pass 1 to do_initial_child_stuff.
13667 (win32_kill): Adjust interface. Remove process from processes
13668 table.
13669 (win32_detach): Ditto.
13670 (win32_join): Adjust interface.
13671 (win32_thread_alive): Take a ptid.
13672 (win32_resume): Adjust to use ptids.
13673 (get_child_debug_event): Ditto.
13674 (win32_wait): Adjust interface. Remove exiting process from
13675 processes table.
13676
bd99dc85
PA
136772009-04-01 Pedro Alves <pedro@codesourcery.com>
13678
13679 Non-stop mode support.
13680
13681 * server.h (non_stop): Declare.
13682 (gdb_client_data, handler_func): Declare.
13683 (delete_file_handler, add_file_handler, start_event_loop):
13684 Declare.
13685 (handle_serial_event, handle_target_event, push_event)
13686 (putpkt_notif): Declare.
13687 * target.h (enum resume_kind): New.
13688 (struct thread_resume): Replace `step' field by `kind' field.
13689 (TARGET_WNOHANG): Define.
13690 (struct target_ops) <wait>: Add `options' argument.
13691 <supports_non_stop, async, start_non_stop>: New fields.
13692 (target_supports_non_stop, target_async): New.
13693 (start_non_stop): Declare.
13694 (mywait): Add `options' argument.
13695 * target.c (mywait): Add `options' argument. Print child exit
13696 notifications here.
13697 (start_non_stop): New.
13698 * server.c (non_stop, own_buf, mem_buf): New globals.
13699 (struct vstop_notif): New.
13700 (notif_queue): New global.
13701 (queue_stop_reply, push_event, discard_queued_stop_replies)
13702 (send_next_stop_reply): New.
13703 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13704 interface changes.
13705 (attach_inferior): In non-stop mode, don't wait for the target
13706 here.
13707 (handle_general_set): Handle QNonStop.
13708 (handle_query): When handling qC, return the current general
13709 thread, instead of the first thread of the list.
13710 (handle_query): If the backend supports non-stop mode, include
13711 QNonStop+ in the qSupported query response.
13712 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13713 and non-stop mode.
13714 (handle_v_attach, handle_v_run): Handle non-stop mode.
13715 (handle_v_stopped): New.
13716 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13717 (myresume): Adjust to use resume_kind. Handle non-stop.
13718 (queue_stop_reply_callback): New.
13719 (handle_status): Handle non-stop mode.
13720 (main): Clear non_stop flag on reconnection. Use the event-loop.
13721 Refactor serial protocol handling from here ...
13722 (process_serial_event): ... to this new function. When GDB
13723 selects any thread, select one here. In non-stop mode, wait until
13724 GDB acks all pending events before exiting.
13725 (handle_serial_event, handle_target_event): New.
13726 * remote-utils.c (remote_open): Install remote_desc in the event
13727 loop.
13728 (remote_close): Remove remote_desc from the event loop.
13729 (putpkt_binary): Rename to...
13730 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13731 (putpkt_binary): New as wrapper around putpkt_binary_1.
13732 (putpkt_notif): New.
13733 (prepare_resume_reply): In non-stop mode, don't change the
13734 general_thread.
13735 * event-loop.c: New.
13736 * Makefile.in (OBJ): Add event-loop.o.
13737 (event-loop.o): New rule.
13738
13739 * linux-low.h (pid_of): Moved here.
13740 (lwpid_of): New.
13741 (get_lwp_thread): Use lwpid_of.
13742 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13743 * linux-low.c (pid_of): Delete.
13744 (inferior_pid): Use lwpid_of.
13745 (linux_event_pipe): New.
13746 (target_is_async_p): New.
13747 (delete_lwp): New.
13748 (handle_extended_wait): Use lwpid_of.
13749 (add_lwp): Don't set lwpid field.
13750 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13751 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13752 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13753 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13754 first. Adjust to linux_wait_for_event interface changes. Use
13755 lwpid_of.
13756 (linux_detach): Don't delete the main lwp here.
13757 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13758 (status_pending_p): Don't consider explicitly suspended lwps.
13759 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13760 pointer. Add OPTIONS argument. Change return type to int. Use
13761 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13762 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13763 pointer. Add status pointer argument. Return a pid instead of a
13764 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13765 changes. In non-stop mode, don't switch to a random thread.
13766 (linux_wait): Rename to...
13767 (linux_wait_1): ... this. Add target_options argument, and handle
13768 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13769 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13770 clean exit and signal exit code. Don't stop all threads in
13771 non-stop mode. In all-stop mode, only stop all threads when
13772 reporting a stop to GDB. Handle explicit thread stop requests.
13773 (async_file_flush, async_file_mark): New.
13774 (linux_wait): New.
13775 (send_sigstop): Use lwpid_of.
13776 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13777 interface changes. In non-stop mode, don't switch to a random
13778 thread.
13779 (linux_resume_one_lwp): Use lwpid_of.
13780 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13781 (linux_resume_one_thread): ... this. Handle resume_stop. In
13782 non-stop mode, don't look for pending flag in all threads.
13783 (resume_status_pending_p): Don't consider explicitly suspended
13784 threads.
13785 (my_waitpid): Reimplement. Emulate __WALL.
13786 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13787 Use lwpid_of.
13788 (sigchld_handler, linux_supports_non_stop, linux_async)
13789 (linux_start_non_stop): New.
13790 (linux_target_ops): Register linux_supports_non_stop, linux_async
13791 and linux_start_non_stop.
13792 (initialize_low): Install SIGCHLD handler.
13793 * thread-db.c (thread_db_create_event, find_one_thread)
13794 (thread_db_get_tls_address): Use lwpid_of.
13795 * win32-low.c (win32_detach): Adjust to use resume_kind.
13796 (win32_wait): Add `options' argument.
13797 * spu-low.c (spu_resume): Adjust to use resume_kind.
13798 (spu_wait): Add `options' argument.
13799
5b1c542e
PA
138002009-04-01 Pedro Alves <pedro@codesourcery.com>
13801
13802 Decouple target code from remote protocol.
13803
13804 * target.h (enum target_waitkind): New.
13805 (struct target_waitstatus): New.
13806 (struct target_ops) <wait>: Return an unsigned long. Take a
13807 target_waitstatus pointer instead of a char pointer.
13808 (mywait): Likewise.
13809 * target.c (mywait): Change prototype to return an unsigned long.
13810 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13811 * server.h (thread_from_wait, old_thread_from_wait): Delete
13812 declarations.
13813 (prepare_resume_reply): Change prototype to take a
13814 target_waitstatus.
13815 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13816 (last_status, last_ptid): New.
13817 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13818 pid instead of a signal.
13819 (attach_inferior): Remove "status" and "signal" parameters.
13820 Adjust.
13821 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13822 not as an address.
13823 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13824 (handle_v_requests, myresume): Remove "status" and "signal"
13825 parameters. Adjust.
13826 (handle_status): New.
13827 (main): Delete local `status'. Adjust.
13828 * remote-utils.c: Include target.h.
13829 (prepare_resume_reply): Change prototype to take a
13830 target_waitstatus. Adjust.
13831
13832 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13833 interface.
13834 * spu-low.c (spu_wait): Adjust.
13835 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13836 Delete.
13837 (win32_wait): Adjust.
13838
2bd7c093
PA
138392009-04-01 Pedro Alves <pedro@codesourcery.com>
13840
13841 * target.h (struct thread_resume): Delete leave_stopped member.
13842 (struct target_ops): Add a `n' argument to the `resume' callback.
13843 * server.c (start_inferior): Adjust.
13844 (handle_v_cont, myresume): Adjust.
13845 * linux-low.c (check_removed_breakpoint): Adjust to resume
13846 interface change, and to removed leave_stopped field.
13847 (resume_ptr): Delete.
13848 (struct thread_resume_array): New.
13849 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13850 resume interface change.
13851 (linux_continue_one_thread, linux_queue_one_thread)
13852 (resume_status_pending_p): Check if the resume field is NULL
13853 instead of checking the leave_stopped member.
13854 (linux_resume): Adjust to the target resume interface change.
13855 * spu-low.c (spu_resume): Adjust to the target resume interface
13856 change.
13857 * win32-low.c (win32_detach, win32_resume): Ditto.
13858
c35fafde
PA
138592009-04-01 Pedro Alves <pedro@codesourcery.com>
13860
13861 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13862 flag.
13863 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13864 pending.
13865 (linux_continue_one_thread): Only preserve the stepping flag if
13866 there's a pending breakpoint.
13867
0a59d50b
PA
138682009-03-31 Pedro Alves <pedro@codesourcery.com>
13869
13870 * server.c (main): After the inferior having exited, call
13871 remote_close before exiting gdbserver.
13872
f04c6d38
TJB
138732009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13874
13875 Fix size of FPSCR in Power 7 processors.
13876 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13877 (PPC_FEATURE_HAS_DFP): New #define.
13878 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13879 size of the FPSCR.
13880
78e5cee6
PA
138812009-03-23 Pedro Alves <pedro@codesourcery.com>
13882
13883 * server.c (handle_query) Whitespace and formatting.
13884
1b3f6016
PA
138852009-03-22 Pedro Alves <pedro@codesourcery.com>
13886
13887 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13888 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13889 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13890 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13891 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13892 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13893 Makefile.in, configure.ac: Fix whitespace throughout.
13894 * configure: Regenerate.
13895
a07b2135
PA
138962009-03-22 Pedro Alves <pedro@codesourcery.com>
13897
13898 * inferiors.c (find_inferior): Make it safe for the callback
13899 function to delete the currently iterated inferior.
13900
67cc2626
PA
139012009-03-22 Pedro Alves <pedro@codesourcery.com>
13902
13903 * Makefile.in (linuw_low_h): Move higher.
13904 (thread-db.o): Depend on $(linux_low_h).
13905
54a0b537
PA
139062009-03-17 Pedro Alves <pedro@codesourcery.com>
13907
13908 Rename "process" to "lwp" throughout.
13909
13910 * linux-low.c (all_processes): Rename to...
13911 (all_lwps): ... this.
13912 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13913 (add_process): Rename to ...
13914 (add_lwp): ... this. Adjust.
13915 (linux_create_inferior): Adjust.
13916 (linux_attach_lwp): Adjust.
13917 (linux_attach): Adjust.
13918 (linux_kill_one_process): Rename to ...
13919 (linux_kill_one_lwp): ... this. Adjust.
13920 (linux_kill): Adjust.
13921 (linux_detach_one_process): Rename to ...
13922 (linux_detach_one_lwp): ... this. Adjust.
13923 (linux_detach): Adjust.
13924 (check_removed_breakpoint): Adjust.
13925 (status_pending_p): Adjust.
13926 (linux_wait_for_process): Rename to ...
13927 (linux_wait_for_lwp): ... this. Adjust.
13928 (linux_wait_for_event): Adjust.
13929 (send_sigstop): Adjust.
13930 (wait_for_sigstop): Adjust.
13931 (stop_all_processes): Rename to ...
13932 (stop_all_lwps): ... this.
13933 (linux_resume_one_process): Rename to ...
13934 (linux_resume_one_lwp): ... this. Adjust.
13935 (linux_set_resume_request, linux_continue_one_thread)
13936 (linux_queue_one_thread, resume_status_pending_p)
13937 (usr_store_inferior_registers, regsets_store_inferior_registers)
13938 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13939 Adjust.
13940 * linux-low.h (get_process): Rename to ...
13941 (get_lwp): ... this. Adjust.
13942 (get_thread_process): Rename to ...
13943 (get_thread_lwp): ... this. Adjust.
13944 (get_process_thread): Rename to ...
13945 (get_lwp_thread): ... this. Adjust.
13946 (struct process_info): Rename to ...
13947 (struct lwp_info): ... this.
13948 (all_processes): Rename to ...
13949 (all_lwps): ... this.
13950 * proc-service.c (ps_lgetregs): Adjust.
13951 * thread-db.c (thread_db_create_event, find_one_thread)
13952 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13953
0b16c5cf
PA
139542009-03-14 Pedro Alves <pedro@codesourcery.com>
13955
13956 * server.c (handle_query): Handle "qAttached".
13957
32de4b9d
NS
139582009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13959
13960 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13961 GPLv3, update license URL.
13962
2aecd87f
DE
139632009-03-01 Doug Evans <dje@google.com>
13964
93efd302 13965 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13966 (server_h): Add gdb_signals.h.
13967 (signals.o): Update.
13968 * server.h (target_signal_from_host,target_signal_to_host_p)
13969 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13970
86b1f9c5
PM
139712009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13972
13973 * remote-utils.c (getpkt): Also generate remote-debug
13974 information if noack_mode is set.
13975
4aa995e1
PA
139762009-02-06 Pedro Alves <pedro@codesourcery.com>
13977
13978 * server.c (handle_query): Report qXfer:siginfo:read and
13979 qXfer:siginfo:write as supported and handle them.
13980 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13981 * linux-low.c (linux_xfer_siginfo): New.
13982 (linux_target_ops): Set it.
13983
62709adf
PA
139842009-01-26 Pedro Alves <pedro@codesourcery.com>
13985
13986 * server.c (gdbserver_usage): Mention --remote-debug.
13987 (main): Accept '--remote-debug' switch.
13988
aef93bd7
DE
139892009-01-18 Doug Evans <dje@google.com>
13990
13991 * regcache.c (new_register_cache): No need to check result of xcalloc.
13992 * server.c (handle_search_memory): Back out calls to xmalloc,
13993 result is checked and error is returned to user upon failure.
13994 (handle_query): Ditto. Add more checks for result of malloc.
13995 (handle_v_cont): Check result of malloc, report error back to
13996 user upon failure.
13997 (handle_v_run): Ditto. Call freeargv.
13998 * server.h (freeargv): Declare.
13999 * utils.c (freeargv): New fn.
14000
54363045
DE
140012009-01-15 Doug Evans <dje@google.com>
14002
f626972c
DE
14003 * gdbreplay.c (perror_with_name): Make arg const char *.
14004 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14005 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14006 * utils.c (perror_with_name): Make arg const char *.
54363045 14007
18aae699
PA
140082009-01-14 Pedro Alves <pedro@codesourcery.com>
14009
14010 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14011 when handling a EXIT_PROCESS_DEBUG_EVENT.
14012
ff703abe
JB
140132009-01-06 Joel Brobecker <brobecker@adacore.com>
14014
14015 * gdbreplay.c (gdbreplay_version): Update copyright year.
14016 * server.c (gdbserver_version): Likewise.
14017
f21cc1a2 140182009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14019
14020 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14021 (handle_extended_wait): Improve comment.
0e21c1ec 14022
bca929d3
DE
140232008-12-13 Doug Evans <dje@google.com>
14024
14025 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14026 * server.h (ATTR_MALLOC): New macro.
14027 (xmalloc,xcalloc,xstrdup): Declare.
14028 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14029 * inferiors.c: Ditto.
14030 * linux-low.c: Ditto.
14031 * mem-break.c: Ditto.
14032 * regcache.c: Ditto.
14033 * remote-utils.c: Ditto.
14034 * server.c: Ditto.
14035 * target.c: Ditto.
14036 * win32-low.c: Ditto.
14037
97438e3f
DE
140382008-12-12 Doug Evans <dje@google.com>
14039
896c7fbb
DE
14040 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14041 in debugging printf.
14042
97438e3f
DE
14043 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14044
e3b886f8
DE
140452008-12-09 Doug Evans <dje@google.com>
14046
14047 * linux-low.h (struct process_info): Delete member tid, unused.
14048 * thread-db.c (find_one_thread): Update.
14049 (maybe_attach_thread): Update.
14050
07e059b5
VP
140512008-12-02 Pedro Alves <pedro@codesourcery.com>
14052
889bf7c5
PA
14053 * target.h (struct target_ops): Add qxfer_osdata member.
14054 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14055 and dirent.h.
14056 (linux_qxfer_osdata): New functions.
14057 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14058 callback.
14059 * server.c (handle_query): Handle "qXfer:osdata:read:".
14060 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14061 (buffer_xml_printf): New functions.
14062 * server.h (struct buffer): New.
14063 (buffer_grow_str, buffer_grow_str0): New macros.
14064 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14065 (buffer_xml_printf): Declare.
07e059b5 14066
4cab47ab
DE
140672008-11-24 Doug Evans <dje@google.com>
14068
14069 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14070
f142445f
DJ
140712008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * server.c (handle_v_run): Always use the supplied argument list.
14074
d0107bb6 140752008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14076
d0107bb6
BW
14077 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14078 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14079
2c4ad781
TJB
140802008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14081
14082 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14083 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14084 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14085 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14086 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14087 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14088 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14089 XML target descriptions.
14090 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14091 when inferior is running on an ISA 2.05 or later processor. Add
14092 special case to return offset for full 64-bit slot of FPSCR when
14093 in 32-bits.
14094
dfb64f85
DJ
140952008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14096
14097 * Makefile.in (SFILES, clean): Added sparc64 files.
14098 (reg-sparc64.o, reg-sparc64.c): New.
14099 * configure.srv (sparc*-*-linux*): New configuration.
14100 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14101 syscall arguments for SPARC.
14102 (regsets_store_inferior_registers): Likewise.
14103 * linux-sparc-low.c: New file.
14104
66b6e1dd
DE
141052008-10-21 Doug Evans <dje@google.com>
14106
14107 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14108 (READLINE_DIR,READLINE_DEP): Delete.
14109 (INTERNAL_CFLAGS): Update.
14110 (LINTFLAGS): Update.
14111
9b710a42
PA
141122008-10-10 Pedro Alves <pedro@codesourcery.com>
14113
14114 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14115 whole argv from the last run, not just argv[0].
14116
5822d809
PA
141172008-09-08 Pedro Alves <pedro@codesourcery.com>
14118
14119 * regcache.c (new_register_cache): Return NULL if the register
14120 cache size isn't known yet.
14121 (free_register_cache): Avoid dereferencing a NULL regcache.
14122
74aac56f
DJ
141232008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * configure.srv: Merge MIPS and MIPS64.
14126
400b20f5
MR
141272008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14128
14129 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14130
677c5bb1
LM
141312008-08-18 Luis Machado <luisgpm@br.ibm.com>
14132
14133 * Makefile.in: Add required vsx dependencies.
14134
14135 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14136 Declare init_registers_powerpc_vsx32l.
14137 Declare init_registers_powerpc_vsx64l.
14138 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14139 (ppc_arch_setup): Check for VSX in hwcap.
14140 (ppc_fill_vsxregset): New function.
14141 (ppc_store_vsxregset): New function.
14142 Add new VSX entry in regset_info target_regsets.
14143
14144 * configure.srv: Add new VSX dependencies.
14145
a6f3e723
SL
141462008-08-12 Pedro Alves <pedro@codesourcery.com>
14147
14148 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14149 (remote_open): Set or clear transport_is_reliable.
14150 (putpkt_binary): Don't expect acks in noack mode.
14151 (getpkt): Don't send ack/nac in noack mode.
14152 * server.c (handle_general_set): Handle QStartNoAckMode.
14153 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14154 qSupported.
14155 (main): Reset noack_mode on every connection.
14156 * server.h (noack_mode): Declare.
14157
a417dc56
RW
141582008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14159
14160 * Makefile.in (GDBREPLAY_OBS): New variable.
14161 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14162
3221518c
UW
141632008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14164 Daniel Jacobowitz <dan@codesourcery.com>
14165
14166 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14167 (usr_store_inferior_registers): Likewise.
14168 (regsets_store_inferior_registers): Likewise.
14169
ec56be1b
PA
141702008-07-31 Rolf Jansen <rj@surtec.com>
14171 Pedro Alves <pedro@codesourcery.com>
14172
14173 * configure.ac: Check for memmem declaration.
14174 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14175 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14176 (disable_packet_qfThreadInfo): Unconditionally compile.
14177 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14178 * configure, config.in: Regenerate.
14179
2fe5e3ff
DE
141802008-07-28 Doug Kwan <dougkwan@google.com>
14181
14182 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14183 (linux_write_memory): Remove declaration of errno.
14184
836acd6d
UW
141852008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14186
14187 * linux-low.c (handle_extended_wait): Do not use "status"
14188 variable uninitialized.
14189
aeba519e
PA
141902008-07-07 Pedro Alves <pedro@codesourcery.com>
14191
14192 * server.c (handle_v_attach): Inhibit reporting dll changes.
14193
db42f210
PA
141942008-06-27 Pedro Alves <pedro@codesourcery.com>
14195
14196 * remote-utils.c (prepare_resume_reply): If requested, don't
14197 output "thread:TID" in the T stop reply.
14198
14199 * server.c (disable_packet_vCont, disable_packet_Tthread)
14200 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14201 (handle_query): If requested, disable support for qC, qfThreadInfo
14202 and qsThreadInfo.
14203 (handle_v_requests): If requested, disable support for vCont.
14204 (gdbserver_show_disableable): New.
14205 (main): Handle --disable-packet and --disable-packet=LIST.
14206
14207 * server.h (disable_packet_vCont, disable_packet_Tthread)
14208 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14209
8e4c5421
CD
142102008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14211
14212 * server.c (gdbserver_usage): Mention --version.
14213
6e23a804
DJ
142142008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * Makefile.in (gdbreplay.o): New rule.
14217
90aa6a40
JM
142182008-06-06 Joseph Myers <joseph@codesourcery.com>
14219
14220 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14221 message, not gdbserver.
14222
c16158bc 142232008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14224 Nathan Sidwell <nathan@codesourcery.com>
14225 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14226
14227 * acinclude.m4: Include ../../config/acx.m4.
14228 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14229 * configure, config.in: Regenerate.
14230 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14231 * server.c (gdbserver_version): Print PKGVERSION.
14232 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14233 (main): Adjust gdbserver_usage calls.
14234 * gdbreplay.c (version, host_name): Add declarations.
14235 (gdbreplay_version, gdbreplay_usage): New.
14236 (main): Accept --version and --help options.
14237
aeb75bf5
DJ
142382008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14239
14240 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14241 (arm_breakpoint_at): Handle Thumb.
14242 (the_low_target): Add comment.
14243
76b233dd
UW
142442008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14245
14246 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14247
08388c79
DE
142482008-05-09 Doug Evans <dje@google.com>
14249
a3c83fae
DE
14250 * server.h (decode_search_memory_packet): Declare.
14251 * remote-utils.c (decode_search_memory_packet): New fn.
14252 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14253 (handle_search_memory): New fn.
14254 (handle_query): Process qSearch:memory packets.
14255
bb9c3d36
UW
142562008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14257
14258 * regcache.c (registers_length): Remove.
14259 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14260 full register packet.
14261 * regcache.h (registers_length): Remove prototype.
14262 * server.h (PBUFSIZ): Define to 16384.
14263
7284e1be
UW
142642008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14265
14266 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14267 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14268 powerpc-64l.o, and powerpc-altivec64l.o.
14269 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14270 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14271 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14272 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14273 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14274 to srv_xmlfiles.
14275
14276 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14277 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14278 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14279 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14280 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14281 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14282 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14283 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14284 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14285 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14286 (clean): Update.
14287
14288 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14289 (init_registers_powerpc_32l): ... this new prototype.
14290 (init_registers_powerpc_32): Remove, replace by ...
14291 (init_registers_powerpc_altivec32l): ... this new prototype.
14292 (init_registers_powerpc_e500): Remove, replace by ...
14293 (init_registers_powerpc_e500l): ... this new prototype.
14294 (init_registers_ppc64): Remove, replace by ...
14295 (init_registers_powerpc_64l): ... this new prototype.
14296 (init_registers_powerpc_64): Remove, replace by ...
14297 (init_registers_powerpc_altivec64l): ... this new prototype.
14298 (ppc_num_regs): Set to 73.
14299 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14300 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14301 (ppc_cannot_store_register): Handle orig_r3 and trap.
14302 (ppc_arch_setup): Update init_registers_... calls.
14303 (ppc_fill_gregset): Handle orig_r3 and trap.
14304
14305 * inferiors.c (clear_inferiors): Reset current_inferior.
14306
fdc59709
PB
143072008-04-23 Paolo Bonzini <bonzini@gnu.org>
14308
889bf7c5
PA
14309 * acinclude.m4: Add override.m4.
14310 * configure: Regenerate.
fdc59709 14311
c9b2f845
UW
143122008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14313
14314 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14315 initial call to init_register_ppc64.
14316
550512b8
UW
143172008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14318
43aaf8b6
PA
14319 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14320 single powerpc*-*-linux* case.
550512b8
UW
14321 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14322
b6430ec3
UW
143232008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14324
14325 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14326 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14327 from reg_xmlfiles.
14328 * linux-ppc-low.c: Include <elf.h>.
14329 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14330 (ppc_hwcap): New global variable.
14331 (ppc_regmap): Remove __SPE__ #ifdef sections.
14332 (ppc_regmap_e500): New global variable.
14333 (ppc_cannot_store_register): Update __SPE__ special case.
14334 (ppc_get_hwcap): New function.
14335 (ppc_arch_setup): Use it to determine whether inferior supports
14336 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14337 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14338 Do not access registers if target does not support AltiVec.
14339 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14340 Do not access registers if target does not support SPE.
14341 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14342
52fa2412
UW
143432008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * linux-low.c (disabled_regsets, num_regsets): New.
14346 (use_regsets_p): Delete.
14347 (linux_wait_for_process): Clear disabled_regsets.
14348 (regsets_fetch_inferior_registers): Check and set it.
14349 (regsets_store_inferior_registers): Likewise.
14350 (linux_fetch_registers, linux_store_registers): Do not use
14351 use_regsets_p.
14352 (initialize_low): Allocate disabled_regsets.
14353
e28b3332
DJ
143542008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * Makefile.in (LIBOBJS): New.
14357 (OBS): Use LIBOBJS.
14358 (memmem.o): New rule.
14359 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14360 * configure: Regenerated.
14361
4536995d
UW
143622008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14363
14364 * server.c (handle_query): Never return "unsupported" for
14365 qXfer:features:read queries.
14366
221c031f
UW
143672008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14368
14369 * server.c (get_features_xml): Fix inverted condition.
14370 (handle_query): Always support qXfer:feature:read.
14371
ccd213ac
DJ
143722008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * server.c (wrapper_argv): New.
14375 (start_inferior): Handle wrapper_argv. If set, expect an extra
14376 trap.
14377 (gdbserver_usage): Document --wrapper.
14378 (main): Parse --wrapper.
14379
6fe305f7
UW
143802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14381
14382 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14383 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14384 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14385 (ppc_set_pc): Likewise.
14386 (ppc_arch_setup): New function.
14387 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14388 of collect_register.
889bf7c5 14389 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14390
5b0a002e
UW
143912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14392
14393 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14394 instead of linux-ppc64-low.o.
14395 * linux-ppc64-low.c: Remove file.
14396 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14397 (linux-ppc64-low.o): Remove rule.
14398
14399 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14400 (init_registers_powerpc_64): Likewise.
14401 (ppc_regmap): Conditionally define depending on __powerpc64__.
14402 (ppc_cannot_store_register): Do not special-case "fpscr" when
14403 compiled on __powerpc64__.
14404 (ppc_collect_ptrace_register): New function.
14405 (ppc_supply_ptrace_register): New function.
14406 (ppc_breakpoint): Change type to "unsigned int".
14407 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14408 (the_low_target): Conditionally provide initializers for the
889bf7c5 14409 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14410 collect_ptrace_register and supply_ptrace_register members.
14411
9b4b61c8
UW
144122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14413
14414 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14415 * server.c (gdbserver_xmltarget): Define.
14416 (get_features_xml): Use it to replace "target.xml" and arch_string.
14417
14418 * configure.srv: Remove srv_xmltarget. Add XML files that were
14419 mentioned there to srv_xmlfiles instead. Remove conditional tests
14420 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14421 srv_xmlfiles and srv_regobj to include all possible choices.
14422 * configure.ac (srv_xmltarget): Remove.
14423 (srv_xmlfiles): Do not add "target.xml".
14424 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14425 checks for supplementary target information.
14426 * configure: Regenerate.
14427 * Makefile.in (XML_TARGET): Remove.
14428 (target.xml): Remove rule.
14429 (clean): Do not clean up target.xml.
14430 (.PRECIOUS): Do not mention target.xml.
14431
14432 * target.h (struct target_ops): Remove arch_string member.
14433 * linux-low.c (linux_arch_string): Remove.
14434 (linux_target_ops): Remove arch_string initializer.
14435 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14436 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14437 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14438 * spu-low.c (spu_arch_string): Remove.
14439 (spu_target_ops): Remove arch_string initializer.
14440 * win32-low.c (win32_arch_string): Remove.
14441 (win32_target_ops): Remove arch_string initializer.
14442 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14443 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14444 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14445
ee1a7ae4
UW
144462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14447
14448 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14449 by collect_ptrace_register and supply_ptrace_register hooks.
14450 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14451 instead of checking for the_low_target.left_pad_xfer.
14452 (usr_store_inferior_registers): Use collect_ptrace_register callback
14453 instead of checking for the_low_target.left_pad_xfer.
14454
14455 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14456 (s390_supply_ptrace_register): Likewise.
14457 (s390_fill_gregset): Call s390_collect_ptrace_register.
14458 (the_low_target): Update.
14459
14460 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14461 (ppc_supply_ptrace_register): Likewise.
14462 (the_low_target): Update.
14463
14464 * linux-i386-low.c (the_low_target): Update.
14465 * linux-x86-64-low.c (the_low_target): Update.
14466
d61ddec4
UW
144672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14468
14469 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14470 reg-s390.o and reg-s390x.o.
14471
14472 * linux-low.c (new_inferior): New global variable.
14473 (linux_create_inferior, linux_attach): Set it.
14474 (linux_wait_for_process): Call the_low_target.arch_setup after the
14475 target has stopped for the first time.
14476 (initialize_low): Do not call the_low_target.arch_setup.
14477
14478 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14479 (s390_set_pc): Likewise.
14480 (s390_arch_setup): New function.
14481 (the_low_target): Use s390_arch_setup as arch_setup routine.
14482
14483 * regcache.c (realloc_register_cache): New function.
14484 (set_register_cache): Call it for each existing regcache.
14485
d05b4ac3
UW
144862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14487
14488 * server.h (init_registers): Remove prototype.
14489
14490 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14491 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14492 instead of init_registers ().
14493 * linux-arm-low.c (init_registers_arm): Add prototype.
14494 (init_registers_arm_with_iwmmxt): Likewise.
14495 (the_low_target): Add initializer for arch_setup field.
14496 * linux-cris-low.c (init_registers_cris): Add prototype.
14497 (the_low_target): Add initializer for arch_setup field.
14498 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14499 (the_low_target): Add initializer for arch_setup field.
14500 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14501 (the_low_target): Add initializer for arch_setup field.
14502 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14503 (the_low_target): Add initializer for arch_setup field.
14504 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14505 (the_low_target): Add initializer for arch_setup field.
14506 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14507 (the_low_target): Add initializer for arch_setup field.
14508 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14509 (init_registers_mips64_linux): Likewise.
14510 (the_low_target): Add initializer for arch_setup field.
14511 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14512 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14513 (the_low_target): Add initializer for arch_setup field.
14514 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14515 (init_registers_powerpc_64): Likewise.
14516 (the_low_target): Add initializer for arch_setup field.
14517 * linux-s390-low.c (init_registers_s390): Add prototype.
14518 (init_registers_s390x): Likewise.
14519 (the_low_target): Add initializer for arch_setup field.
14520 * linux-sh-low.c (init_registers_sh): Add prototype.
14521 (the_low_target): Add initializer for arch_setup field.
14522 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14523 (the_low_target): Add initializer for arch_setup field.
14524 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14525 (the_low_target): Add initializer for arch_setup field.
14526
14527 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14528 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14529 instead of init_registers ().
14530 * win32-arm-low.c (init_registers_arm): Add prototype.
14531 (the_low_target): Add initializer for arch_setup field.
14532 * win32-i386-low.c (init_registers_i386): Add prototype.
14533 (the_low_target): Add initializer for arch_setup field.
14534
14535 * spu-low.c (init_registers_spu): Add prototype.
14536 (initialize_low): Call initialie_registers_spu () instead of
14537 initialize_registers ().
14538
fd96d250
PA
145392008-02-19 Pedro Alves <pedro@codesourcery.com>
14540
14541 * server.c (handle_v_requests): When handling the vRun and vAttach
14542 packets, if already debugging a process, don't kill it. Return an
14543 error instead.
14544
d41b6bb4
DJ
145452008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14546
14547 * server.c (handle_query): Correct length check.
14548
5ac588cf
PA
145492008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14550
14551 * win32-low.c (do_initial_child_stuff): Add process handle
14552 parameter. Set current_process_handle and current_process_id from the
14553 parameters. Clear globals.
14554 (win32_create_inferior): Don't set current_process_handle and
14555 current_process_id here. Instead pass them on the call to
14556 do_initial_child_stuff.
14557 (win32_attach): Likewise.
14558 (win32_clear_inferiors): New.
14559 (win32_kill): Don't close the current process handle or the
14560 current thread handle here. Instead call win32_clear_inferiors.
14561 (win32_detach): Don't open a new handle to the process. Call
14562 win32_clear_inferiors.
14563 (win32_join): Don't rely on current_process_handle; open a new
14564 handle using the process id.
14565 (win32_wait): Call win32_clear_inferiors when the inferior process
14566 has exited.
14567
ecd7ecbc
DJ
145682008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14569
14570 * server.c (monitor_show_help): Add "exit".
14571
1525d545
MG
145722008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14573
ecd7ecbc 14574 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14575 (clean): Add reg-xtensa.c.
14576 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14577 * configure.srv (xtensa*-*-linux*) New target.
14578 * linux-xtensa-low.c: New.
14579 * xtensa-xtregs.c: New.
1525d545 14580
59a016f0
PA
145812008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14582
14583 * hostio.c: Don't include errno.h.
14584 (errno_to_fileio_errno): Move to hostio-errno.
14585 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14586 error number outputting to the target->hostio_last_error callback.
14587 (hostio_packet_error): Use FILEIO_EINVAL directly.
14588 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14589 calls to hostio_error.
14590 * hostio-errno.c: New.
14591 * server.h (hostio_last_error_from_errno): Declare.
14592 * target.h (target_ops): Add hostio_last_error member.
14593 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14594 as hostio_last_error handler.
889bf7c5 14595 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14596 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14597 (wince_hostio_last_error): New functions.
14598 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14599 as hostio_last_error handler.
14600 (win32_target_ops) [!_WIN32_WCE]: Register
14601 hostio_last_error_from_errno as hostio_last_error handler.
14602 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14603 (hostio-errno.o): New rule.
14604 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14605 * configure.srv (srv_hostio_err_objs): New variable. Default to
14606 hostio-errno.o.
14607 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14608 * configure: Regenerate.
14609
2d717e4f
DJ
146102008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14611
14612 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14613 (linux_kill, linux_detach): Clean up the process list.
14614 * remote-utils.c (remote_open): Improve port number parsing.
14615 (putpkt_binary, input_interrupt): Only send interrupts if the target
14616 is running.
14617 * server.c (extended_protocol): Make static.
14618 (attached): Define earlier.
14619 (exit_requested, response_needed, program_argv): New variables.
14620 (target_running): New.
14621 (start_inferior): Clear attached here.
14622 (attach_inferior): Set attached here.
14623 (require_running): Define.
14624 (handle_query): Use require_running and target_running. Implement
14625 "monitor exit".
14626 (handle_v_attach, handle_v_run): New.
14627 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14628 (gdbserver_usage): Update.
14629 (main): Redo argument parsing. Handle --debug and --multi. Handle
14630 --attach along with other options or after the port. Save
14631 program_argv. Support no initial program. Resynchronize
14632 communication with GDB after an error. Handle "monitor exit".
14633 Use require_running and target_running. Always allow the extended
14634 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14635 restart in extended mode.
14636 * README: Refer to the GDB manual. Update --attach usage.
14637
7407e2de
AS
146382007-12-20 Andreas Schwab <schwab@suse.de>
14639
14640 * linux-low.c (STACK_SIZE): Define.
14641 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14642 (linux_test_for_tracefork): Likewise.
14643
b65d95c5
DJ
146442007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * linux-low.c (linux_wait_for_event): Update messages. Do not
14647 reinsert auto-delete breakpoints.
14648 * mem-break.c (struct breakpoint): Change return type of handler to
14649 int.
14650 (set_breakpoint_at): Update handler type.
14651 (reinsert_breakpoint_handler): Return 1 instead of calling
14652 delete_breakpoint.
14653 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14654 setting a new one.
14655 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14656 * mem-break.h (set_breakpoint_at): Update handler type.
14657 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14658 * win32-low.c (auto_delete_breakpoint): New.
14659 (get_child_debug_event): Use it.
14660
4e799345
DJ
146612007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * configure.ac: Check for pread and pwrite.
14664 * hostio.c (handle_pread): Fall back to lseek and read.
14665 (handle_pwrite): Fall back to lseek and write.
14666 * config.in, configure: Regenerated.
14667
27524b67
DJ
146682007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14669
14670 * server.c (myresume): Add own_buf argument.
14671 (main): Update calls.
14672
a20d5e98
DJ
146732007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14674
14675 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14676 * remote-utils.c (remote_open): Do not call disable_async_io.
14677 (block_async_io): Delete.
14678 (unblock_async_io): Make static.
14679 (initialize_async_io): New.
14680 * server.c (handle_v_cont): Handle async I/O here.
14681 (myresume): Likewise. Move other common resume tasks here...
14682 (main): ... from here. Call initialize_async_io. Disable async
14683 I/O before the main loop.
14684 * server.h (initialize_async_io): Declare.
14685 (block_async_io, unblock_async_io): Delete prototypes.
14686 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14687
b79d787e
DJ
146882007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14689
14690 * remote-utils.c (readchar): Allow binary data in received messages.
14691
d97903b2
PA
146922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14693
14694 * win32-low.c (attaching): New global.
14695 (win32_create_inferior): Clear the `attaching' global.
14696 (win32_attach): Set the `attaching' global.
14697 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14698 attaching. Only set a breakpoint at the entry point if not
14699 attaching.
14700
311de423
PA
147012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14702
14703 * server.c (main): Don't report dll events on the initial
14704 connection on attaches.
14705
6c2d16d2
PA
147062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14707
14708 * server.c (main): Relax numerical bases supported for the pid of
14709 the --attach command line argument.
14710
5ca906e6
PA
147112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14712
14713 * win32-low.c (win32_attach): Call OpenProcess before
14714 DebugActiveProcess, not after. Add last error output to error
14715 call.
14716
9c6c8194
PA
147172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14718
14719 * win32-low.c (win32_get_thread_context)
14720 (win32_set_thread_context): New functions.
14721 (thread_rec): Use win32_get_thread_context.
14722 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14723 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14724 field.
14725
4d5d1aaa
PA
147262007-12-03 Leo Zayas
14727 Pedro Alves <pedro_alves@portugalmail.pt>
14728
14729 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14730 global variables.
14731 (child_add_thread): Minor cleanup.
14732 (child_continue): Resume artificially suspended threads before
14733 calling ContinueDebugEvent.
14734 (suspend_one_thread): New.
14735 (fake_breakpoint_event): New.
14736 (get_child_debug_event): Change return type to int. Check here if
14737 gdb sent an interrupt request. If a soft interrupt was requested,
14738 fake a breakpoint event. Return 0 if there is no event to handle,
14739 and 1 otherwise.
14740 (win32_wait): Don't check here if gdb sent an interrupt request.
14741 Ensure there is a valid event to handle.
14742 (win32_request_interrupt): Add soft interruption method as last
14743 resort.
14744
c436e841
PA
147452007-12-03 Leo Zayas
14746 Pedro Alves <pedro_alves@portugalmail.pt>
14747
14748 * win32-low.h (win32_thread_info): Add descriptions to the
14749 structure members. Replace `suspend_count' counter by a
14750 `suspended' flag.
14751 * win32-low.c (thread_rec): Update condition of when to get the
14752 context from the inferior. Rely on ContextFlags being set if it
14753 has already been retrieved. Only suspend the inferior thread if
14754 we haven't already. Warn if that fails.
14755 (continue_one_thread): s/suspend_count/suspended/. Only call
14756 ResumeThread once. Warn if that fails.
14757
e7b5fa67
PA
147582007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14759
14760 * win32-low.c (win32_wait): Don't read from the inferior when it
14761 has already exited.
14762
a385171d
PA
147632007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14764
14765 * Makefile.in (win32_low_h): New variable.
14766 (win32-low.o): Add dependency on $(win32_low_h).
14767 (win32-arm-low.o, win32-i386-low.o): New rules.
14768
f80c84b3
DJ
147692007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14770
14771 * hostio.c: Correct copyright year.
14772
a6b151f1
DJ
147732007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * Makefile.in (OBS): Add hostio.o.
14776 (hostio.o): New rule.
14777 * server.h (handle_vFile): Declare.
14778 * hostio.c: New file.
14779 * server.c (handle_v_requests): Take packet_len and new_packet_len
14780 for binary packets. Call handle_vFile.
14781 (main): Update call to handle_v_requests.
14782
f9387fc3
DJ
147832007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14784
14785 * linux-low.c: Include <sched.h>.
14786
51c2684e
DJ
147872007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * linux-low.c (linux_tracefork_grandchild): New.
14790 (linux_tracefork_child): Use clone.
14791 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14792
75f83163
JB
147932007-10-31 Joel Brobecker <brobecker@adacore.com>
14794
14795 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14796
da5898ce
DJ
147972007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14798
14799 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14800
24a09b5f
DJ
148012007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14802
14803 * inferiors.c (change_inferior_id): Delete.
14804 (add_pid_to_list, pull_pid_from_list): New.
14805 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14806 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14807 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14808 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14809 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14810 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14811 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14812 (using_threads): Always set to 1.
14813 (handle_extended_wait): New.
14814 (add_process): Do not set TID.
14815 (linux_create_inferior): Set must_set_ptrace_flags.
14816 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14817 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14818 (linux_thread_alive): Rename TID argument to LWPID.
14819 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14820 (linux_wait_for_event): Do not use TID or check using_threads. Update
14821 call to dead_thread_notify. Call handle_extended_wait.
14822 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14823 (send_sigstop): Delete sigstop_sent.
14824 (wait_for_sigstop): Avoid TID.
14825 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14826 (linux_test_for_tracefork): New.
14827 (linux_lookup_signals): Use thread_db_active and
14828 linux_supports_tracefork_flag.
14829 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14830 * linux-low.h (get_process_thread): Avoid TID.
14831 (struct process_ifo): Move thread_known and tid to the end. Remove
14832 sigstop_sent.
14833 (linux_attach_lwp, thread_db_init): Update prototypes.
14834 * server.h (change_inferior_id): Delete prototype.
14835 (add_pid_to_list, pull_pid_from_list): New prototypes.
14836 * thread-db.c (thread_db_use_events): New.
14837 (find_first_thread): Rename to...
14838 (find_one_thread): ...this. Update callers and messages. Do not
14839 call fatal. Check thread_db_use_events. Do not call
14840 change_inferior_id or new_thread_notify.
14841 (maybe_attach_thread): Update. Do not call new_thread_notify.
14842 (thread_db_init): Set thread_db_use_events. Check use_events.
14843 * utils.c (fatal, warning): Correct message prefix.
14844
30ed0a8f
DJ
148452007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14846
14847 * Makefile.in (clean): Remove new files.
14848 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14849 (powerpc-64.o, powerpc-64.c): New rules.
14850 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14851 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14852 with SPE.
14853 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14854 SPE targets.
14855 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14856 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14857 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14858 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14859 (target_regsets): Add AltiVec and SPE register sets.
14860 * configure.ac: Check for AltiVec and SPE.
14861 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14862 (ppc_fill_vrregset, ppc_store_vrregset): New.
14863 (target_regsets): Add AltiVec register set.
14864 * configure: Regenerated.
14865
fd462a61
DJ
148662007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14867
14868 * linux-low.c (O_LARGEFILE): Define.
14869 (linux_read_memory): Use /proc/PID/mem.
14870 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14871 * configure, config.in: Regenerated.
14872
69f223ed
DJ
148732007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * linux-low.c (linux_wait_for_event): Do not pass signals while
14876 single-stepping.
14877
aec18585
PA
148782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14879
14880 * win32-low.c (create_process): New.
14881 (win32_create_inferior): Use create_process instead of
14882 CreateProcess. If create_process failed retry appending an ".exe"
14883 suffix. Store the GetLastError result immediatelly after
14884 create_process calls and use it on the call to error.
14885
34d86ddd
PA
148862007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14887
14888 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14889
5a0e3bd0
JB
148902007-08-23 Joel Brobecker <brobecker@adacore.com>
14891
14892 * configure.ac: Switch license to GPLv3.
14893
f88c79e6
MS
148942007-08-01 Michael Snyder <msnyder@access-company.com>
14895
14896 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14897
6b3d9b83
PA
148982007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14899
14900 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14901 typedef.
14902 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14903 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14904 CloseToolhelp32Snapshot.
14905 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14906 CloseToolhelp32Snapshot.
14907
c588c53c
MS
149082007-07-27 Michael Snyder <michael.snyder@access-company.com>
14909
14910 * server.c (main): Check for inferior exit before main loop.
14911
aa0403d9
PA
149122007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14913
14914 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14915 instead of on tmp_desc.
14916
255e7678
DJ
149172007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14918 Daniel Jacobowitz <dan@codesourcery.com>
14919
14920 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14921 (add_thread): Minor cleanups.
14922 (clear_inferiors): Move lower in the file. Clear the DLL
14923 list.
14924 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14925 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14926 (xml_escape_text): New.
14927 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14928 for qSupported.
14929 (handle_v_cont): Report errors.
14930 (gdbserver_version): Update.
14931 (main): Correct size of own_buf. Do not report initial DLL events.
14932 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14933 (unloaded_dll, xml_escape_text): New.
14934 * win32-low.c (enum target_waitkind): Update comments.
14935 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14936 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14937 (win32_EnumProcessModules, win32_GetModuleInformation)
14938 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14939 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14940 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14941 (win32_Module32First, win32_Module32Next, load_toolhelp)
14942 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14943 (get_child_debug_event): Handle DLL events.
14944 (win32_wait): Likewise.
14945
0d37add9
DJ
149462007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14947
14948 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14949 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14950
45e2715e
PA
149512007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14952
14953 * win32-low.c (handle_output_debug_string): Ignore event if not
14954 waiting.
14955
c5674cf1
PA
149562007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14957
14958 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14959
2bbe3cc1
DJ
149602007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14963
ae13219e
DJ
149642007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14965
14966 * inferiors.c (change_inferior_id): Add comment.
14967 * linux-low.c (check_removed_breakpoint): Add an early
14968 prototype. Improve debug output.
14969 (linux_attach): Doc update.
14970 (linux_detach_one_process, linux_detach): Clean up before releasing
14971 each process.
14972 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14973 * linux-low.h (struct process_info): Doc improvement.
14974 * mem-break.c (delete_all_breakpoints): New.
14975 * mem-break.h (delete_all_breakpoints): New prototype.
14976 * thread-db.c (find_first_thread): New.
14977 (thread_db_create_event): Call it instead of
14978 thread_db_find_new_threads. Clean up unused variables.
14979 (maybe_attach_thread): Remove first thread handling.
14980 (thread_db_find_new_threads): Use find_first_thread.
14981 (thread_db_get_tls_address): Likewise.
14982
4105de34
DJ
149832007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * thread-db.c (thread_db_find_new_threads): Add prototype.
14986 (thread_db_create_event): Check for the main thread before adding
14987 a new thread.
14988 (maybe_attach_thread): Only enable event reporting if TID == 0.
14989 (thread_db_get_tls_address): Check for new threads.
14990
2b876972
DJ
149912007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * linux-low.c (linux_create_inferior): Try execv before execvp.
14994 * spu-low.c (spu_create_inferior): Likewise.
14995
7a245884
DJ
149962007-06-13 Mike Frysinger <vapier@gentoo.org>
14997
14998 * linux-low.c (linux_create_inferior): Change execv to execvp.
14999 * spu-low.c (spu_create_inferior): Likewies.
15000
117ce543
DJ
150012007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * Makefile.in (clean): Clean new files instead of deleted ones.
15004 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15005 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15006 rules.
15007 * configure.srv: Specify XML files and new regformats for MIPS and
15008 MIPS64 GNU/Linux.
15009 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15010 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15011 an entry for the restart register.
15012 (mips_cannot_fetch_register, mips_cannot_store_register)
15013 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15014 register names to match the XML descriptions.
15015 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15016 restart register instead of $0.
15017
0e7f50da
UW
150182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15019 Markus Deuling <deuling@de.ibm.com>
15020
15021 * remote-utils.c (decode_xfer_write): New function.
15022 * server.h (decode_xfer_write): Add prototype.
15023 * server.c (handle_query): Add PACKET_LEN argument. Support
15024 qXfer:spu:read and qXfer:spu:write packets.
15025 (main): Pass packet_len to handle_query.
15026 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15027 * target.h (target_ops): Add qxfer_spu.
15028
374c1d38
UW
150292007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15030
15031 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15032 accessing non-seekable spufs files.
15033
bb63802a
UW
150342007-05-16 Markus Deuling <deuling@de.ibm.com>
15035
889bf7c5 15036 * server.c (handle_query): Add reply for qC packet.
bb63802a 15037
7390519e
PA
150382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15039 Leo Zayas <lerele@champenstudios@com>
15040
15041 * server.h (check_remote_input_interrupt_request): New function.
15042 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15043 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15044 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15045 (check_remote_input_interrupt_request): New function.
15046 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15047 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15048 winapi_GenerateConsoleCtrlEvent): New typedefs.
15049 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15050 to 250 ms.
15051 (win32_wait): Check for remote interrupt request
15052 with check_remote_input_interrupt_request.
15053 (win32_request_interrupt): New function.
15054 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15055
34b34921
PA
150562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15057
15058 * win32-low.c (debug_registers_changed,
15059 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15060 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15061 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15062 (thread_rec): Get context using the low target.
15063 (child_add_thread): Call thread_added on the low target,
15064 which does the same thing.
15065 (regptr): Delete.
15066 (do_initial_child_stuff): Remove debug registers references.
15067 Set context using the low target. Resume threads after
15068 setting the contexts.
15069 (child_continue): Remove dead variable. Remove debug
15070 registers references.
15071 (child_fetch_inferior_registers): Go through the low target.
15072 (do_child_store_inferior_registers): Remove.
15073 (child_store_inferior_registers): Go through the low target.
15074 (win32_resume): Remove debug registers references.
15075 Set context using the low target.
15076 (handle_exception): Change return type to void. Don't record
15077 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15078 first chance exception.
889bf7c5 15079 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15080 goto loop. Always return after waiting for debug event.
15081 (win32_wait): Convert to switch statement. Handle spurious
15082 events.
15083
15084 * win32-i386-low.c (debug_registers_changed,
15085 debug_registers_used): New.
15086 (initial_stuff): Rename to ...
15087 (i386_initial_stuff): ... this. Clear debug registers
15088 state variables.
15089 (store_debug_registers): Delete.
15090 (i386_get_thread_context): New.
15091 (load_debug_registers): Delete.
15092 (i386_set_thread_context): New.
15093 (i386_thread_added): New.
15094 (single_step): Rename to ...
15095 (i386_single_step): ... this.
15096 (do_fetch_inferior_registers): Rename to ...
15097 (i386_fetch_inferior_register): ... this.
15098 (i386_store_inferior_register): New.
15099 (the_low_target): Adapt to new interface.
15100
15101 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15102 (arm_get_thread_context): New.
15103 (arm_set_thread_context): New.
15104 (regptr): New.
15105 (do_fetch_inferior_registers): Rename to ...
15106 (arm_fetch_inferior_register): ... this.
15107 (arm_store_inferior_register): New.
15108 (arm_wince_breakpoint): Reimplement as unsigned long.
15109 (arm_wince_breakpoint_len): Define.
15110 (the_low_target): Adapt to new interface.
15111
15112 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15113 load_debug_registers. Add get_thread_context, set_thread_context,
15114 thread_added and store_inferior_register. Rename
15115 fetch_inferior_registers to fetch_inferior_register.
15116 (regptr): Remove declaration.
15117
dd6953e1
PA
151182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15119
15120 * linux-low.c (linux_detach): Change return type to int. Return 0.
15121 * spu-low.c (spu_detach): Likewise.
15122
444d6139
PA
151232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15124
15125 * target.h (target_ops): Change return type of detach to int.
15126 Add join.
15127 (join_inferior): New.
15128 * server.c (main): Don't skip detach support on mingw32.
15129 If the inferior doesn't support detaching return error.
15130 Call join_inferior instead of using waitpid.
15131 * linux-low.c (linux_join): New.
15132 (linux_target_op): Add linux_join.
15133 * spu-low.c (spu_join): New.
15134 (spu_target_ops): Add spu_join.
15135 * win32-low.c (win32_detach): Adapt to new interface.
15136 Reopen current_process_handle before detaching. Issue a child
15137 resume before detaching.
15138 (win32_join): New.
15139 (win32_target_op): Add win32_join.
15140
1d5315fe
PA
151412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15142
15143 * win32-low.c (win32-attach): Fix return value.
15144 * target.h (target_ops): Describe ATTACH return values.
15145
bf914831
PA
151462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15147
15148 * win32-low.c (GETPROCADDRESS): Define.
15149 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15150 (winapi_DebugSetProcessKillOnExit): Likewise.
15151 (win32_create_inferior): Force usage of ansi CreateProcessA.
15152 (win32_attach): Use GETPROCADDRESS.
15153 (win32_detach): Likewise.
15154
f72f3e60
PA
151552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15156
15157 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15158
ed50f18f
PA
151592007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15160
15161 * win32-low.c: Commit leftover changes from 2007-03-29.
15162
0c2ead7e
DJ
151632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15164
15165 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15166 fields short instead of int. Add explicit padding.
15167 (i387_cache_to_fsave): Remove unnecessary casts.
15168 (i387_fsave_to_cache): Doc fix.
15169 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15170
73725ff3
DJ
151712007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15172
15173 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15174 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15175
d99f33d8
PA
151762007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15177
15178 * configure.srv (arm*-*-mingw32ce*): Move near the other
15179 arm targets.
15180
68070c10
PA
151812007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15182
2482afc6 15183 * configure.ac: Add errno checking.
68070c10
PA
15184 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15185 sys/file.h and malloc.h.
15186 (AC_CHECK_DECLS): Add perror.
15187 (srv_mingwce): Handle.
2482afc6 15188 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15189 win32-i386-low.o to srv_tgtobj.
15190 (i[34567]86-*-mingw*): Likewise.
15191 (arm*-*-mingw32ce*): Add case.
15192 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15193 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15194 [__MINGW32CE__] (strerror): New function.
15195 [__MINGW32CE__] (errno): Define to GetLastError.
15196 [__MINGW32CE__] (COUNTOF): New macro.
15197 (remote_open): Remove extra close call.
15198 * mem-break.c (delete_breakpoint_at): New function.
15199 * mem-break.h (delete_breakpoint_at): Declare.
15200 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15201 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15202 [USE_WIN32API] (read, write): Add char* casts.
15203 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15204 * server.h: Include wincecompat.h on Windows CE.
15205 [HAVE_ERRNO_H]: Check.
15206 (perror): Declare if not declared.
15207 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15208 (perror_with_name): Remove errno declaration.
15209 * wincecompat.h: New.
15210 * wincecompat.c: New.
15211 * win32-low.h: New.
15212 * win32-arm-low.c: New.
15213 * win32-i386-low.c: New.
15214 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15215 (OUTMSG2): Make it safe.
15216 (_T): New macro.
15217 (COUNTOF): New macro.
15218 (NUM_REGS): Get it from the low target.
15219 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15220 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15221 (thread_rec): Let low target handle debug registers.
15222 (child_add_thread): Likewise.
15223 (child_init_thread_list): Likewise.
15224 (continue_one_thread): Likewise.
15225 (regptr): New.
15226 (do_child_fetch_inferior_registers): Move to ...
15227 * win32-i386-low.c: ... here, and rename to ...
15228 (do_fetch_inferior_registers): ... this.
889bf7c5 15229 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15230 Go through the low target.
15231 (do_child_store_inferior_registers): Use regptr.
15232 (strwinerror): New function.
15233 (win32_create_inferior): Handle Windows CE.
15234 Use strwinerror instead of strerror on Windows error
15235 codes. Add program to the error output.
15236 Don't close the main thread handle on Windows CE.
15237 (win32_attach): Use coredll.dll on Windows CE.
15238 (win32_kill): Close current process and current
15239 thread handles.
15240 (win32_detach): Use coredll.dll on Windows CE.
15241 (win32_resume): Let low target handle debug registers, and
15242 step request.
15243 (handle_exception): Add/Remove initial breakpoint. Avoid
15244 non-existant WSTOPSIG on Windows CE.
15245 (win32_read_inferior_memory): Cast to remove warning.
15246 (win32_arch_string): Go through the low target.
15247 (initialize_low): Call set_breakpoint_data with the low
15248 target's breakpoint.
15249 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15250 FOP_REGNUM, mappings): Move to ...
15251 * win32-i386-low.c: ... here.
15252 * win32-low.c (win32_thread_info): Move to ...
15253 * win32-low.h: ... here.
15254 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15255 win32-arm-low.c and wincecompat.c.
15256 (all:): Add $EXEEXT.
15257 (install-only:): Likewise.
15258 (gdbserver:): Likewise.
15259 (gdbreplay:): Likewise.
15260 * config.in: Regenerate.
15261 * configure: Regenerate.
15262
41093d81
PA
152632007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15264
15265 * win32-low.c: Rename typedef thread_info to
15266 win32_thread_info throughout.
15267
544afa54
PA
152682007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15269
15270 * win32-i386-low.c: Rename to ...
15271 * win32-low.c: ... this.
15272 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15273 * Makefile.in: Likewise.
15274
bce7165d
PA
152752007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15276
15277 * remote-utils.c (monitor_output): Constify msg parameter.
15278 * server.h (monitor_output): Likewise.
15279 * win32-i386-low.c (handle_output_debug_string): New.
15280 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15281 handle_output_debug_string.
15282 (get_child_debug_event): Likewise.
15283
506c7aa0
DJ
152842007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15285
15286 * server.c (main): Correct strtoul check.
15287
42c81e2a
DJ
152882007-03-27 Jon Ringle <jon@ringle.org>
15289
15290 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15291
9453113a
DJ
152922007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15293
15294 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15295
64a69107
DJ
152962007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15297
15298 * terminal.h: Check HAVE_SGTTY_H.
15299
153002007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15301
15302 * remote-utils.c (remote_open): Print out the assigned port number.
15303
c74d0ad8
DJ
153042007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15305
15306 * remote-utils.c (monitor_output): New function.
15307 * server.c (debug_threads): Define here.
15308 (monitor_show_help): New function.
15309 (handle_query): Handle qRcmd.
15310 (main): Do not handle 'd' packet.
15311 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15312 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15313 of debug_threads.
15314
de7c3b4a
PA
153152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15316
15317 * Makefile.in (EXEEXT): New.
15318 (clean): Use $(EXEEXT).
15319
ef57601b
PA
153202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15321
15322 * target.h (target_ops): Rename send_signal to request_interrupt,
15323 and remove enum target_signal parameter.
15324 * linux-low.c (linux_request_interrupt): Rename from
15325 linux_send_signal, and always send SIGINT.
15326 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15327 and always send SIGINT.
15328 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15329 of send_signal.
15330 (input_interrupt): Likewise.
15331
820f2bda
PA
153322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15333
15334 * server.c (get_features_xml): Check if target implemented
15335 arch_string.
15336 * win32-i386-low.c (win32_arch_string): New.
15337 (win32_target_ops): Add win32_arch_string as arch_string member.
15338
ab39bf24
UW
153392007-02-22 Markus Deuling <deuling@de.ibm.com>
15340
15341 * spu-low.c (spu_arch_string): New.
15342 (spu_target_ops): Add spu_arch_string.
15343
61ff6e04
DJ
153442007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15345
15346 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15347 * configure.ac: Do not check for terminal.h.
15348 * configure, config.in: Regenerated.
15349
fb1e4ffc
DJ
153502007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15351
15352 * Makefile.in (OBS): Add $(XML_BUILTIN).
15353 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15354 (clean): Update.
15355 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15356 (arm-with-iwmmxt.c): New.
15357 * config.in, configure: Regenerate.
15358 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15359 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15360 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15361 (arm*-*-linux*): Add iWMMXt and regset support.
15362 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15363 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15364 (arm_store_wmmxregset, target_regsets): New.
15365 * server.c (get_features_xml): Take annex argument. Check builtin
15366 XML documents.
15367 (handle_query): Handle multiple annexes.
15368
0f48aa01
DJ
153692007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15370
15371 * remote-utils.c [USE_WIN32API] (read, write): Define.
15372 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15373 write.
15374
23181151
DJ
153752007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15376
15377 * linux-i386-low.c (the_low_target): Set arch_string.
15378 * linux-x86-64-low.c (the_low_target): Likewise.
15379 * linux-low.c (linux_arch_string): New.
15380 (linux_target_ops): Add it.
15381 * linux-low.h (struct linux_target_ops): Add arch_string.
15382 * server.c (write_qxfer_response): Use const void * for DATA.
15383 (get_features_xml): New.
15384 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15385 * target.h (struct target_ops): Add arch_string method.
15386
9d606399
DJ
153872007-01-03 Denis Pilat <denis.pilat@st.com>
15388 Daniel Jacobowitz <dan@codesourcery.com>
15389
15390 * linux-low.c (linux_kill): Handle being called with no threads.
15391 * win32-i386-low.c (win32_kill): Likewise.
15392 (get_child_debug_event): Clear current_process_handle.
15393
153942006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15395 Daniel Jacobowitz <dan@codesourcery.com>
15396
15397 * remote-utils.c (remote_open): Check the type of specified
15398 serial port devices before opening them.
15399 * server.c (main): Kill the inferior if an error occurs during
15400 the first remote_open.
15401
a5e13d24
DJ
154022006-12-05 Markus Deuling <deuling@de.ibm.com>
15403
15404 * README: Update supported targets.
15405
186947f7
DJ
154062006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * Makefile.in (clean): Remove reg-mips64.c.
15409 (reg-mips64.c, reg-mips64.o): New rules.
15410 * configure.srv: Handle mips64. Include regset support for mips.
15411 * linux-mips-low.c (union mips_register): New.
15412 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15413 (mips_breakpoint, mips_breakpoint_at): Use int.
15414 (mips_collect_register, mips_supply_register)
15415 (mips_collect_register_32bit, mips_supply_register_32bit)
15416 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15417 (mips_store_fpregset, target_regsets): New.
15418 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15419
a13e2c95
UW
154202006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15421
15422 * configure.srv: Add target "spu*-*-*".
15423 * Makefile.in (clean): Remove reg-spu.c.
15424 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15425 * spu-low.c: New file.
15426
cb7283db
DJ
154272006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * configure.ac: Correct td_thr_tls_get_addr test.
15430 * configure: Regenerated.
15431
89be2091
DJ
154322006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * linux-low.c (linux_wait_for_event): Reformat. Use the
15435 pass_signals array.
15436 * remote-utils.c (decode_address_to_semicolon): New.
15437 * server.c (pass_signals, handle_general_set): New.
15438 (handle_query): Mention QPassSignals for qSupported.
15439 (main): Call handle_general_set.
15440 * server.h (pass_signals, decode_address_to_semicolon): New.
15441
000ef4f0
DJ
154422006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15443
15444 * server.c (handle_query): Correct error handling for read_auxv.
15445
b7149293
UW
154462005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15447
15448 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15449 and srv_linux_thread_db to yes.
15450 * linux-s390-low.c (s390_fill_gregset): New function.
15451 (target_regsets): Define data structure.
15452
dae5f5cf
DJ
154532006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15454
15455 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15456 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15457 * config.in, configure: Regenerated.
15458 * inferiors.c (gdb_id_to_thread): New function.
15459 (gdb_id_to_thread_id): Use it.
15460 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15461 * linux-low.h (struct process_info): Add th member.
15462 (thread_db_get_tls_address): New prototype.
15463 * remote-utils.c (decode_address): Make non-static.
15464 * server.c (handle_query): Handle qGetTLSAddr.
15465 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15466 * target.h (struct target_ops): Add get_tls_address.
15467 * thread-db.c (maybe_attach_thread): Save the thread handle.
15468 (thread_db_get_tls_address): New.
15469
32ca6d61
DJ
154702006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15473 (linux_resume_one_process): Take a siginfo_t *. Update all
15474 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15475 (struct pending_signals): Add a siginfo_t.
15476 (linux_wait_for_process): Always set last_status.
15477 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15478 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15479 * linux-low.h (struct process_info): Add last_status.
15480
5ffff7c1
DJ
154812006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15482
15483 * remote-utils.c (try_rle): New function.
15484 (putpkt_binary): Use it.
15485
8695c747
DJ
154862006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15487
15488 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15489 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15490 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15491 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15492 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15493 point registers.
15494
290fadea
RS
154952006-08-08 Richard Sandiford <richard@codesourcery.com>
15496
15497 * server.c (terminal_fd): New variable.
15498 (old_foreground_pgrp): Likewise.
15499 (restore_old_foreground_pgrp): New function.
15500 (start_inferior): Record the terminal file descriptor in terminal_fd
15501 and its original foreground group in old_foreground_pgrp. Register
15502 restore_old_foreground_pgrp with atexit().
15503
9f2e1e63
DJ
155042006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15505
15506 * server.c (handle_query): Correct qPart to qXfer.
15507
b80864fb
DJ
155082006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15509
15510 * configure.ac: Check for more headers which are missing on
15511 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15512 * configure.srv: Add Cygwin and mingw32.
15513 * remote-utils.c: Don't include headers unconditionally which
15514 are missing on mingw32. Include <winsock.h> for mingw32.
15515 (remote_open): Adjust for mingw32 support. Flush
15516 standard error after writing to it.
15517 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15518 (unblock_async_io, enable_async_io, disable_async_io)
15519 (readchar, getpkt): Update for Winsock support.
15520 (prepare_resume_reply): Expect a protocol signal number.
15521 * server.c: Disable <sys/wait.h> on mingw32.
15522 (start_inferior): Adjust for mingw32 support. Flush
15523 standard error after writing to it.
15524 (attach_inferior): Likewise. Use protocol signal
15525 numbers.
15526 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15527 and names.
15528 * win32-i386-low.c: New file.
15529 * Makefile.in (XM_CLIBS): Set.
15530 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15531 (win32-i386-low.o): New dependency rule.
15532 * linux-low.c (linux_wait): Use target signal numbers.
15533 * target.h (struct target_ops): Doc fix.
15534 * server.h (target_signal_to_name): New prototype.
15535 * gdbreplay.c: Don't include headers unconditionally which
15536 are missing on mingw32. Include <winsock.h> for mingw32.
15537 (remote_close, remote_open): Adjust for Winsock support.
15538 * configure, config.in: Regenerated.
15539
0876f84a
DJ
155402006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15541
15542 * server.c (decode_xfer_read, write_qxfer_response): New.
15543 (handle_query): Take a packet length argument. Handle
15544 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15545 the qSupported response.
15546 (main): Update call to handle_query.
15547
01f9e8fa
DJ
155482006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15549
15550 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15551 (putpkt_binary): Renamed from putpkt and adjusted for binary
15552 data.
15553 (putpkt): New wrapper for putpkt_binary.
15554 (readchar): Don't mask off the high bit.
15555 (decode_X_packet): New function.
15556 * server.c (main): Call putpkt_binary if a handler sets the packet
15557 length. Save the length of the incoming packet. Handle 'X'.
15558 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15559
be2a5f71
DJ
155602006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15561
15562 * server.c (handle_query): Handle qSupported.
15563
ea025f5f
DJ
155642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * remote-utils.c (all_symbols_looked_up): New variable.
15567 (look_up_one_symbol): Check it.
15568 * server.h (look_up_one_symbol): New declaration.
15569 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15570
9308fc88
DJ
155712006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15572
15573 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15574 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15575 (PTRACE_GET_THREAD_AREA): Define.
15576 (ps_get_thread_area): New function.
15577
52fb6437
NS
155782006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15579
15580 * configure.srv (m68k*-*-uclinux*): New target.
15581 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15582 (linux_resume_one_process): Remove extraneous cast.
15583 (linux_read_offsets): New.
15584 (linux_target_op): Add linux_read_offsets on mmuless systems.
15585 * server.c (handle_query): Add qOffsets logic.
15586 * target.h (struct target_ops): Add read_offsets.
15587
21b0f40c
DJ
155882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15589
15590 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15591 (PTRACE_GET_THREAD_AREA): Define.
15592 (ps_get_thread_area): New function.
15593 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15594 (linux-x86-64-low.o): Update.
15595
0050a760
DJ
155962006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15597
15598 * configure.ac: Remove checks for prfpregset_t.
15599 * gdb_proc_service.h: New file.
15600 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15601 new "gdb_proc_service.h".
15602 * proc-service.c: Likewise.
15603 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15604 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15605 * Makefile.in (gdb_proc_service_h): Updated.
15606 * configure, config.in: Regenerated.
15607
b92a518e
DJ
156082006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * remote-utils.c (prepare_resume_reply): Move declaration
15611 of gdb_id_from_wait to the top of the block.
15612
545587ee
DJ
156132006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * linux-low.c (regsets_store_inferior_registers): Read the regset
15616 from the target before filling it.
15617
9db87ebd
DJ
156182006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15619
15620 * server.c (attach_inferior): Return SIGTRAP for a successful
15621 attach.
15622
dd24457d
DJ
156232006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * Makefile.in (OBS): Add version.o.
15626 (STAGESTUFF): Delete.
15627 (version.o): Add dependencies.
15628 (version.c): Replace rule.
15629 (clean): Remove version.c.
15630 * server.c (gdbserver_version): New.
15631 (gdbserver_usage): Use printf.
15632 (main): Handle --version and --help.
15633 * server.h (version, host_name): Add declarations.
15634
6f0f660e
EZ
156352005-12-23 Eli Zaretskii <eliz@gnu.org>
15636
889bf7c5
PA
15637 * linux-arm-low.c:
15638 * linux-arm-low.c:
15639 * inferiors.c:
15640 * i387-fp.h:
15641 * i387-fp.c:
15642 * gdbreplay.c:
15643 * regcache.c:
15644 * proc-service.c:
15645 * mem-break.h:
15646 * mem-break.c:
15647 * linux-x86-64-low.c:
15648 * linux-sh-low.c:
15649 * linux-s390-low.c:
15650 * linux-ppc64-low.c:
15651 * linux-ppc-low.c:
15652 * linux-mips-low.c:
15653 * linux-m68k-low.c:
15654 * linux-m32r-low.c:
15655 * linux-low.h:
15656 * linux-low.c:
15657 * linux-ia64-low.c:
15658 * linux-i386-low.c:
15659 * linux-crisv32-low.c:
15660 * thread-db.c:
15661 * terminal.h:
15662 * target.h:
15663 * target.c:
15664 * server.h:
15665 * server.c:
15666 * remote-utils.c:
15667 * regcache.h:
15668 * utils.c:
15669 * Makefile.in:
15670 * configure.ac:
6f0f660e
EZ
15671 * gdbserver.1: Add (C) after Copyright. Update the FSF
15672 address.
15673
9d1fb177
DJ
156742005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15675
15676 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15677 (arm_breakpoint_at): Recognize both breakpoints.
15678 (the_low_target): Use the correct breakpoint instruction.
15679
011a70c2
DJ
156802005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15681
15682 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15683 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15684 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15685 (the_low_target): Update.
15686
7fb85e41
AS
156872005-10-25 Andreas Schwab <schwab@suse.de>
15688
15689 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15690
15691 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15692 (ia64_num_regs): Reduce to 462.
15693
3db0444b
DJ
156942005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15695
15696 * acinclude.m4: Correct quoting.
15697 * aclocal.m4: Regenerated.
15698
15699 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15700 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15701 (thread_db_init): Call thread_db_err_str.
15702 * configure.ac: Check for TD_VERSION.
15703 * config.in, configure: Regenerated.
15704
bee0189a
DJ
157052005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15706
15707 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15708
e9d25b98
DJ
157092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15710
15711 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15712 is not available. Define HAVE_PTRACE_GETREGS if it is.
15713 * config.in, configure: Regenerated.
15714 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15715 * linux-i386-low.c, linux-m68k-low.c: Update to use
15716 HAVE_PTRACE_GETREGS.
15717 * linux-low.c (regsets_fetch_inferior_registers)
15718 (regsets_store_inferior_registers): Only return 0 if we processed
15719 GENERAL_REGS.
15720 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15721 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15722
a06660f7
DJ
157232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15724
15725 * inferiors.c (struct thread_info): Add gdb_id.
15726 (add_thread): Add gdb_id argument.
15727 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15728 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15729 calls to add_thread.
15730 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15731 * server.c (handle_query): Use thread_to_gdb_id.
15732 (handle_v_cont, main): Use gdb_id_to_thread_id.
15733 * server.h (add_thread): Update prototype.
15734 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15735 prototypes.
15736
5a1f5858
DJ
157372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15738
15739 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15740 left-padded registers.
15741 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15742 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15743
e122f1f5
SE
157442005-07-01 Steve Ellcey <sje@cup.hp.com>
15745
15746 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15747 * configure: Regenerate.
15748 * config.in: Regenerate.
15749 * server.h (NEED_DECLARATION_STRERROR):
15750 Replace with !HAVE_DECL_STRERROR.
15751
d592fa2f
DJ
157522005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * linux-low.c (linux_wait, linux_send_signal): Don't test
15755 an unsigned long variable for > 0 if it could be MAX_ULONG.
15756 * server.c (myresume): Likewise.
15757 * target.c (set_desired_inferior): Likewise.
15758
ccbd4912
MK
157592005-06-13 Mark Kettenis <kettenis@gnu.org>
15760
15761 * configure.ac: Simplify and improve check for socklen_t.
15762 * configure, config.in: Regenerate.
15763
f450004a
DJ
157642005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15765
15766 * acconfig.h: Remove.
15767 * configure.ac: Add a test for socklen_t. Use three-argument
15768 AC_DEFINE throughout.
15769 * config.in: Regenerated using autoheader 2.59.
15770 * configure: Regenerated.
15771
15772 * gdbreplay.c (socklen_t): Provide a default.
15773 (remote_open): Use socklen_t.
15774 * remote-utils.c (socklen_t): Provide a default.
15775 (remote_open): Use socklen_t.
15776 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15777 unsigned char.
15778
15779 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15780 char for buffers.
15781 * linux-low.c (linux_read_memory, linux_write_memory)
15782 (linux_read_auxv): Likewise.
15783 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15784 (check_mem_write): Likewise.
15785 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15786 Likewise.
15787 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15788 (registers_from_string, register_data): Likewise.
15789 * server.c (handle_query, main): Likewise.
15790 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15791 (decode_M_packet): Likewise.
15792 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15793 * target.h (struct target_ops): Update read_memory, write_memory,
15794 and read_auxv.
15795 (read_inferior_memory, write_inferior_memory): Update.
15796 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15797 to unsigned char *.
15798 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15799 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15800 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15801 linux-s390-low.c, linux-sh-low.c: Update for changes in
15802 read_inferior_memory and the_low_target->breakpoint.
15803
eee84df1
DJ
158042005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15805
15806 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15807 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15808 * configure.srv: Add powerpc64-*-linux*.
15809 * linux-ppc64-low.c: New file.
15810
45b134e5
OF
158112005-05-23 Orjan Friberg <orjanf@axis.com>
15812
15813 * linux-cris-low.c: New file with support for CRIS.
15814 * linux-crisv32-low.c: Ditto for CRISv32.
15815 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15816 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15817 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15818 reg-crisv32.o, and reg-crisv32.c to make rules.
15819 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15820 recognized targets.
15821
48d93c75
UW
158222005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15823
15824 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15825 of sizeof (PTRACE_XFER_TYPE).
15826 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15827
e013ee27
OF
158282005-05-12 Orjan Friberg <orjanf@axis.com>
15829
889bf7c5 15830 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15831 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15832 pointers for hardware watchpoint support.
15833 * linux-low.h (struct linux_target_ops): Ditto.
15834 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15835 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15836 to linux_target_ops.
15837 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15838 reply packet.
15839 * server.c (main): Recognize 'Z' and 'z' packets.
15840
b0ded00b
UW
158412005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15842
15843 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15844 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15845 (the_low_target): Add new members.
15846
8643e2ad
DJ
158472005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * proc-service.c (ps_lgetregs): Search all_processes instead of
15850 all_threads.
15851
fc620387
DJ
158522005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15853
15854 * server.c (start_inferior): Change return type to int.
15855 (attach_inferior): Change sigptr to int *.
15856 (handle_v_cont, handle_v_requests): Change signal to int *.
15857 (main): Change signal to int.
15858
158592005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15860
15861 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15862 * configure.srv: Add m32r*-*-linux*.
15863 * linux-m32r-low.c: New file.
15864
e0e76420
DJ
158652005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15866
15867 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15868
a1928bad
DJ
158692005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15872 Take unsigned long arguments for PIDs.
15873 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15874 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15875 (wait_for_sigstop, linux_resume_one_process)
15876 (regsets_fetch_inferior_registers, linux_send_signal)
15877 (linux_read_auxv): Likewise. Update the types of variables holding
15878 PIDs. Update format string specifiers.
15879 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15880 * remote-utils.c (prepare_resume_reply): Likewise.
15881 * server.c (cont_thread, general_thread, step_thread)
15882 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15883 unsigned long.
15884 (handle_query): Update format specifiers.
15885 (handle_v_cont, main): Use strtoul for thread IDs.
15886 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15887 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15888 (general_thread, step_thread, thread_from_wait)
15889 (old_thread_from_wait): Update.
15890 * target.h (struct thread_resume): Use unsigned long for THREAD.
15891 (struct target_ops): Use unsigned long for arguments to attach and
15892 thread_alive.
15893
dcdb98d2
DJ
158942005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15895
15896 * acinclude.m4: Include bfd/bfd.m4 directly.
15897 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15898 <agriffis@toolchain.org>.
15899 * aclocal.m4, configure: Regenerated.
15900
bec39cab
AC
159012005-01-07 Andrew Cagney <cagney@gnu.org>
15902
15903 * configure.ac: Rename configure.in, require autoconf 2.59.
15904 * configure: Re-generate.
15905
434c4c77
DJ
159062004-12-08 Daniel Jacobowitz <dan@debian.org>
15907
15908 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15909 LIBS when finished.
15910 * aclocal.m4: Regenerated.
15911 * configure: Regenerated.
15912
db1d3e1b
AS
159132004-11-21 Andreas Schwab <schwab@suse.de>
15914
15915 * linux-m68k-low.c (m68k_num_gregs): Define.
15916 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15917 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15918 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15919 (m68k_breakpoint_at): New. Add to the_low_target.
15920
15921 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15922 srv_linux_thread_db to yes.
15923
43360365
JB
159242004-10-20 Joel Brobecker <brobecker@gnat.com>
15925
15926 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15927 (ARCH_SET_FS): Likewise.
15928 (ARCH_GET_FS): Likewise.
15929 (ARCH_GET_GS): Likewise.
15930
fd500816
DJ
159312004-10-16 Daniel Jacobowitz <dan@debian.org>
15932
15933 * linux-i386-low.c (ps_get_thread_area): New.
15934 * linux-x86-64-low.c (ps_get_thread_area): New.
15935 * linux-low.c: Include <sys/syscall.h>.
15936 (linux_kill_one_process): Don't kill the first thread here.
15937 (linux_kill): Kill the first thread here.
15938 (kill_lwp): New function.
15939 (send_sigstop, linux_send_signal): Use it.
15940 * proc-service.c: Clean up #ifdefs.
15941 (fpregset_info): Delete.
15942 (ps_lgetregs): Update and enable implementation.
15943 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15944 implementations.
15945 * remote-utils.c (struct sym_cache, symbol_cache): New.
15946 (input_interrupt): Print a clearer message.
15947 (async_io_enabled): New variable.
15948 (enable_async_io, disable_async_io): Use it. Update comments.
15949 (look_up_one_symbol): Use the symbol cache.
15950 * thread-db.c (thread_db_look_up_symbols): New function.
15951 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15952
f6de3c42
DJ
159532004-10-16 Daniel Jacobowitz <dan@debian.org>
15954
15955 * configure.in: Test for -rdynamic.
15956 * configure: Regenerated.
15957 * Makefile (INTERNAL_LDFLAGS): New.
15958 (gdbserver, gdbreplay): Use it.
15959
2c0fc042
AC
159602004-09-02 Andrew Cagney <cagney@gnu.org>
15961
15962 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15963
075b3282
DJ
159642004-03-23 Daniel Jacobowitz <drow@mvista.com>
15965
15966 * linux-low.c (linux_wait): Clear all_processes list also.
15967
fa6a77dc
DJ
159682004-03-12 Daniel Jacobowitz <drow@mvista.com>
15969
15970 * linux-low.c: Include <errno.h>. Remove extern declaration of
15971 errno.
15972
6d782a97
DJ
159732004-03-12 Daniel Jacobowitz <drow@mvista.com>
15974
15975 * gdbreplay.c, server.h, utils.c: Update copyright years.
15976
3a7fb99b
DJ
159772004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15978
15979 * server.c (main): Print child status or termination signal from
15980 variable 'signal', not 'sig'.
15981
c3e735a6
DJ
159822004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15983
15984 * linux-low.c (linux_read_memory): Change return type to
15985 int. Check for and return error from ptrace().
15986 * target.c (read_inferior_memory): Change return type to int. Pass
15987 back return status from the_target->read_memory().
15988 * target.h (struct target_ops): Adapt *read_memory() prototype.
15989 Update comment.
15990 (read_inferior_memory): Adapt prototype.
15991 * server.c (main): Return an error packet if
15992 read_inferior_memory() returns an error.
15993
a59d1c82
DJ
159942004-03-04 Daniel Jacobowitz <drow@mvista.com>
15995
15996 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15997 Unify with other clean targets.
15998
dc3f8883
DJ
159992004-02-29 Daniel Jacobowitz <drow@mvista.com>
16000
16001 * server.c (handle_v_cont): Call set_desired_inferior.
16002
89a208da
DJ
160032004-02-29 Daniel Jacobowitz <drow@mvista.com>
16004
16005 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16006
62ea82f5
DJ
160072004-02-29 Daniel Jacobowitz <drow@mvista.com>
16008
16009 * linux-low.c (linux_wait): Unblock async I/O.
16010 (linux_resume): Block and enable async I/O.
16011 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16012 * server.h (block_async_io, unblock_async_io): Add prototypes.
16013
6910d122
DJ
160142004-02-29 Daniel Jacobowitz <drow@mvista.com>
16015
16016 * remote-utils.c (remote_open): Print a status notice after
16017 opening a TCP port.
16018 * server.c (attach_inferior): Print a status notice after
16019 attaching.
16020
160212004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16022
16023 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16024
c89dc5d4
DJ
160252004-02-26 Daniel Jacobowitz <drow@mvista.com>
16026
16027 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16028 error packet.
16029 * server.c, target.h: Update copyright years.
16030
4b8dad4a
RM
160312004-02-25 Roland McGrath <roland@redhat.com>
16032
16033 * target.h (struct target_ops): New member `read_auxv'.
16034 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16035 * linux-low.c (linux_read_auxv): New function.
16036 (linux_target_ops): Initialize `read_auxv' member to that.
16037
d7446758
JB
160382004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16039
16040 Committed by Jim Blandy <jimb@redhat.com>.
16041
16042 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16043 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16044 instead of GPR_SIZE to distiguish s390 and s390x targets.
16045
5544ad89
DJ
160462004-01-31 Daniel Jacobowitz <drow@mvista.com>
16047
16048 * linux-low.c: Update copyright year.
16049 (check_removed_breakpoint): Clear pending_is_breakpoint.
16050 (linux_set_resume_request, linux_queue_one_thread)
16051 (resume_status_pending_p): New functions.
16052 (linux_continue_one_thread): Use process->resume.
16053 (linux_resume): Only resume threads if there are no pending events.
16054 * linux-low.h (struct process_info): Add resume request
16055 pointer.
16056
2a68b70e
DJ
160572004-01-30 Daniel Jacobowitz <drow@mvista.com>
16058
16059 * regcache.c (new_register_cache): Clear the allocated register
16060 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16061
64386c31
DJ
160622003-10-13 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * linux-low.c (linux_resume): Take a struct thread_resume *
16065 argument.
16066 (linux_wait): Update call.
16067 (resume_ptr): New static variable.
16068 (linux_continue_one_thread): Renamed from
16069 linux_continue_one_process. Use resume_ptr.
16070 (linux_resume): Use linux_continue_one_thread.
16071 * server.c (handle_v_cont, handle_v_requests): New functions.
16072 (myresume): New function.
16073 (main): Handle 'v' case.
16074 * target.h (struct thread_resume): New type.
16075 (struct target_ops): Change argument of "resume" to struct
16076 thread_resume *.
16077 (myresume): Delete macro.
16078
c938e9b0
L
160792003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16080
16081 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16082 (uninstall): Support DESTDIR.
16083
7f313d07
BC
16084Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16085
16086 * configure.srv: Add xscale*linux copy of arm*linux entry.
16087
3b2fc2ea
DJ
160882003-07-24 Daniel Jacobowitz <drow@mvista.com>
16089
16090 * linux-arm-low.c (arm_reinsert_addr): New function.
16091 (the_low_target): Add arm_reinsert_addr.
16092
1c0a559e
MK
160932003-07-08 Mark Kettenis <kettenis@gnu.org>
16094
16095 * mem-break.c: Remove whitespace at end of file.
16096
43d5792c
DJ
160972003-06-28 Daniel Jacobowitz <drow@mvista.com>
16098
16099 * configure.in: Check whether we need to prototype strerror.
16100 * server.h: Optionally prototype strerror.
16101 * gdbreplay.c (perror_with_name): Use strerror.
16102 * linux-low.c (linux_attach_lwp): Use strerror.
16103 * utils.c (perror_with_name): Use strerror.
16104 * config.in, configure: Regenerated.
16105
c8a86edf
DJ
161062003-06-28 Daniel Jacobowitz <drow@mvista.com>
16107
16108 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16109 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16110
73d37363
DJ
161112003-06-20 Daniel Jacobowitz <drow@mvista.com>
16112
16113 * Makefile.in (SFILES): Update.
16114 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16115 low-sun3.c: Remove files.
16116
6ad8ae5c
DJ
161172003-06-17 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16120 (linux_detach_one_process, linux_detach): New functions.
16121 (linux_target_ops): Add linux_detach.
16122 * server.c (main): Handle 'D' packet.
16123 * target.h (struct target_ops): Add "detach" member.
16124 (detach_inferior): Define.
16125
1581182a
MK
161262003-06-13 Mark Kettenis <kettenis@gnu.org>
16127
16128 From Kelley Cook <kelleycook@wideopenwest.com>:
16129 * configure.srv: Accept i[34567]86 variants.
16130
e5379b03
DJ
161312003-06-05 Daniel Jacobowitz <drow@mvista.com>
16132
16133 * linux-low.c (linux_wait_for_event): Correct comment typos.
16134 (linux_resume_one_process): Call check_removed_breakpoint.
16135 (linux_send_signal): New function.
16136 (linux_target_ops): Add linux_send_signal.
16137 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16138 of kill.
16139 * target.h (struct target_ops): Add send_signal.
16140
2ff29de4
JB
161412003-05-29 Jim Blandy <jimb@redhat.com>
16142
16143 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16144 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16145 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16146 away part of the register's value.
16147
254787d4
DJ
161482003-03-26 Daniel Jacobowitz <drow@mvista.com>
16149
16150 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16151 (linux_wait_for_event, linux_init_signals): Likewise.
16152
94e10508
DJ
161532003-03-17 Daniel Jacobowitz <drow@mvista.com>
16154
16155 * configure.in: Check for stdlib.h.
16156 * configure: Regenerated.
16157 * config.in: Regenerated.
16158
4c0711e0
DJ
161592003-01-04 Andreas Schwab <schwab@suse.de>
16160
16161 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16162
ef66e766
AC
161632003-01-02 Andrew Cagney <ac131313@redhat.com>
16164
16165 * Makefile.in: Remove obsolete code.
16166
a1358604
DJ
161672002-11-20 Daniel Jacobowitz <drow@mvista.com>
16168
16169 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16170 defined(PT_FPR0_HI).
16171
23ce3b1c
DJ
161722002-11-17 Stuart Hughes <seh@zee2.com>
16173
16174 * linux-arm-low.c (arm_num_regs): Increase.
16175 (arm_regmap): Include status register.
16176
161772002-11-17 Daniel Jacobowitz <drow@mvista.com>
16178
16179 * linux-low.c (register_addr): Remove incorrect -1 check.
16180
a9fa9f7d
DJ
161812002-08-29 Daniel Jacobowitz <drow@mvista.com>
16182
16183 * linux-low.c (linux_create_inferior): Call setpgid. Return
16184 the new PID.
16185 (unstopped_p, linux_signal_pid): Remove.
16186 (linux_target_ops): Remove linux_signal_pid.
16187 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16188 global instead of target method.
16189 * target.h (struct target_ops): Remove signal_pid. Update comment
16190 for create_inferior.
16191 * server.c (signal_pid): New variable.
16192 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16193 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16194 (attach_inferior): Set signal_pid.
16195
17574093
DJ
161962002-08-23 Daniel Jacobowitz <drow@mvista.com>
16197
16198 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16199
162002002-08-20 Jim Blandy <jimb@redhat.com>
16201
16202 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16203 default for this.
16204
162052002-08-01 Andrew Cagney <cagney@redhat.com>
16206
16207 * Makefile.in: Make chill references obsolete.
16208
162092002-07-24 Kevin Buettner <kevinb@redhat.com>
16210
16211 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16212 * configure: Regenerate.
16213 * config.in: Regenerate.
16214
162152002-07-09 David O'Brien <obrien@FreeBSD.org>
16216
16217 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16218 (perror_with_name, remote_close, remote_open, expect, play): Static.
16219
162202002-07-04 Michal Ludvig <mludvig@suse.cz>
16221
4b8dad4a 16222 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16223 byte offsets instead of an array of indexes.
16224 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16225
162262002-06-13 Daniel Jacobowitz <drow@mvista.com>
16227
16228 * regcache.c: Add comment.
16229
162302002-06-11 Daniel Jacobowitz <drow@mvista.com>
16231
16232 * thread-db.c: New file.
16233 * proc-service.c: New file.
16234 * acinclude.m4: New file.
16235 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16236 proc-service.o, and thread-db.o.
16237 (linux-low.o): Add USE_THREAD_DB.
16238 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16239 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16240 * aclocal.m4: Regenerated.
16241 * config.in: Regenerated.
16242 * configure: Regenerated.
16243 * configure.in: Check for proc_service.h, sys/procfs.h,
16244 thread_db.h, and linux/elf.h headrs.
16245 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16246 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16247 Check for -lthread_db and thread support.
16248 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16249 PowerPC, and SuperH.
16250 * i387-fp.c: Constify arguments.
16251 * i387-fp.h: Likewise.
16252 * inferiors.c: (struct thread_info): Renamed from
16253 `struct inferior_info'. Remove PID member. Use generic inferior
16254 list header. All uses updated.
16255 (inferiors, signal_pid): Removed.
16256 (all_threads): New variable.
16257 (get_thread): Define.
16258 (add_inferior_to_list): New function.
16259 (for_each_inferior): New function.
16260 (change_inferior_id): New function.
16261 (add_inferior): Removed.
16262 (remove_inferior): New function.
16263 (add_thread): New function.
16264 (free_one_thread): New function.
16265 (remove_thread): New function.
16266 (clear_inferiors): Use for_each_inferior and free_one_thread.
16267 (find_inferior): New function.
16268 (find_inferior_id): New function.
16269 (inferior_target_data): Update argument type.
16270 (set_inferior_target_data): Likewise.
16271 (inferior_regcache_data): Likewise.
16272 (set_inferior_regcache_data): Likewise.
16273 * linux-low.c (linux_bp_reinsert): Remove.
16274 (all_processes, stopping_threads, using_thrads)
16275 (struct pending_signals, debug_threads, pid_of): New.
16276 (inferior_pid): Replace with macro.
16277 (struct inferior_linux_data): Remove.
16278 (get_stop_pc, add_process): New functions.
16279 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16280 Use add_process and add_thread.
16281 (linux_attach_lwp): New function, based on old linux_attach. Use
16282 add_process and add_thread. Set stop_expected for new threads.
16283 (linux_attach): New function.
16284 (linux_kill_one_process): New function.
16285 (linux_kill): Kill all LWPs.
16286 (linux_thread_alive): Use find_inferior_id.
16287 (check_removed_breakpoints, status_pending_p): New functions.
16288 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16289 Update. Use WNOHANG. Wait for cloned processes also. Update process
16290 struct for the found process.
16291 (linux_wait_for_event): New function.
16292 (linux_wait): Use it. Support LWPs.
16293 (send_sigstop, wait_for_sigstop, stop_all_processes)
16294 (linux_resume_one_process, linux_continue_one_process): New functions.
16295 (linux_resume): Support LWPs.
16296 (REGISTER_RAW_SIZE): Remove.
16297 (fetch_register): Use register_size instead. Call supply_register.
16298 (usr_store_inferior_registers): Likewise. Call collect_register.
16299 Fix recursive case.
16300 (regsets_fetch_inferior_registers): Improve error message.
16301 (regsets_store_inferior_registers): Add debugging.
16302 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16303 (unstopped_p, linux_signal_pid): New functions.
16304 (linux_target_ops): Add linux_signal_pid.
16305 (linux_init_signals): New function.
16306 (initialize_low): Call it. Initialize using_threads.
16307 * regcache.c (inferior_regcache_data): Add valid
16308 flag.
16309 (get_regcache): Fetch registers lazily. Add fetch argument
16310 and update all callers.
16311 (regcache_invalidate_one, regcache_invalidate): New
16312 functions.
16313 (new_register_cache): Renamed from create_register_cache.
16314 Return the new regcache.
16315 (free_register_cache): Change argument to a void *.
16316 (registers_to_string, registers_from_string): Call get_regcache
16317 with fetch flag set.
16318 (register_data): Make static. Pass fetch flag to get_regcache.
16319 (supply_register): Call get_regcache with fetch flag clear.
16320 (collect_register): Call get_regcache with fetch flag set.
16321 (collect_register_as_string): New function.
16322 * regcache.h: Update.
16323 * remote-utils.c (putpkt): Flush after debug output and use
16324 stderr.
16325 Handle input interrupts while waiting for an ACK.
16326 (input_interrupt): Use signal_pid method.
16327 (getpkt): Flush after debug output and use stderr.
16328 (outreg): Use collect_register_as_string.
16329 (new_thread_notify, dead_thread_notify): New functions.
16330 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16331 and general_thread.
16332 (look_up_one_symbol): Flush after debug output.
16333 * server.c (step_thread, server_waiting): New variables.
16334 (start_inferior): Don't use signal_pid. Update call to mywait.
16335 (attach_inferior): Update call to mywait.
16336 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16337 (main): Don't fetch/store registers explicitly. Use
16338 set_desired_inferior. Support proposed ``Hs'' packet. Update
16339 calls to mywait.
16340 * server.h: Update.
16341 (struct inferior_list, struct_inferior_list_entry): New.
16342 * target.c (set_desired_inferior): New.
16343 (write_inferior_memory): Constify.
16344 (mywait): New function.
16345 * target.h: Update.
16346 (struct target_ops): New signal_pid method.
16347 (mywait): Removed macro, added prototype.
16348
16349 * linux-low.h (regset_func): Removed.
16350 (regset_fill_func, regset_store_func): New.
16351 (enum regset_type): New.
16352 (struct regset_info): Add type field. Use new operation types.
16353 (struct linux_target_ops): stop_pc renamed to get_pc.
16354 Add decr_pc_after_break and breakpoint_at.
16355 (get_process, get_thread_proess, get_process_thread)
16356 (strut process_info, all_processes, linux_attach_lwp)
16357 (thread_db_init): New.
16358
16359 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16360 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16361 (the_low_target): Add new members.
16362 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16363 (i386_store_fpxregset): Constify.
16364 (target_regsets): Add new kind identifier.
16365 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16366 (i386_set_pc): Add debugging.
16367 (i386_breakpoint_at): New function.
16368 (the_low_target): Add new members.
16369 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16370 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16371 (mips_breakpoint_at): New.
16372 (the_low_target): Add new members.
16373 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16374 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16375 (the_low_target): Add new members.
16376 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16377 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16378 (the_low_target): Add new members.
16379 * linux-x86-64-low.c (target_regsets): Add new kind
16380 identifier.
16381
163822002-05-15 Daniel Jacobowitz <drow@mvista.com>
16383
16384 From Martin Pool <mbp@samba.org>:
16385 * server.c (gdbserver_usage): New function.
16386 (main): Call it.
16387
163882002-05-14 Daniel Jacobowitz <drow@mvista.com>
16389
16390 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16391 stop_at -> stop_pc.
16392
163932002-05-04 Andrew Cagney <ac131313@redhat.com>
16394
16395 * Makefile.in: Remove obsolete code.
16396
163972002-04-24 Michal Ludvig <mludvig@suse.cz>
16398
16399 * linux-low.c (regsets_fetch_inferior_registers),
16400 (regsets_store_inferior_registers): Removed cast to int from
16401 ptrace() calls.
16402 * regcache.h: Added declaration of struct inferior_info.
16403
164042002-04-20 Daniel Jacobowitz <drow@mvista.com>
16405
16406 * inferiors.c (struct inferior_info): Add regcache_data.
16407 (add_inferior): Call create_register_cache.
16408 (clear_inferiors): Call free_register_cache.
16409 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16410 * regcache.c (struct inferior_regcache_data): New.
16411 (registers): Remove.
16412 (get_regcache): New function.
16413 (create_register_cache, free_register_cache): New functions.
16414 (set_register_cache): Don't initialize the register cache here.
16415 (registers_to_string, registers_from_string, register_data): Call
16416 get_regcache.
16417 * regcache.h: Add prototypes.
16418 * server.h: Likewise.
16419
164202002-04-20 Daniel Jacobowitz <drow@mvista.com>
16421
16422 * mem-break.c: New file.
16423 * mem-break.h: New file.
16424 * Makefile.in: Add mem-break.o rule; update server.h
16425 dependencies.
16426 * inferiors.c (struct inferior_info): Add target_data
16427 member.
16428 (clear_inferiors): Free target_data member if set.
16429 (inferior_target_data, set_inferior_target_data): New functions.
16430 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16431 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16432 * linux-low.c (linux_bp_reinsert): New variable.
16433 (struct inferior_linux_data): New.
16434 (linux_create_inferior): Use set_inferior_target_data.
16435 (linux_attach): Likewise. Call add_inferior.
16436 (linux_wait_for_one_inferior): New function.
16437 (linux_wait): Call it.
16438 (linux_write_memory): Add const.
16439 (initialize_low): Call set_breakpoint_data.
16440 * linux-low.h (struct linux_target_ops): Add breakpoint
16441 handling members.
16442 * server.c (attach_inferior): Remove extra add_inferior
16443 call.
16444 * server.h: Include mem-break.h. Update inferior.c
16445 prototypes.
16446 * target.c (read_inferior_memory)
16447 (write_inferior_memory): New functions.
16448 * target.h (read_inferior_memory)
16449 (write_inferior_memory): Change macros to prototypes.
16450 (struct target_ops): Update comments. Add const to write_memory
16451 definition.
16452
164532002-04-11 Daniel Jacobowitz <drow@mvista.com>
16454
16455 * linux-low.c (usr_store_inferior_registers): Support
16456 registers which are allowed to fail to store.
16457 * linux-low.h (linux_target_ops): Likewise.
16458 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16459 (ppc_cannot_store_register): FPSCR may not be storable.
16460
164612002-04-09 Daniel Jacobowitz <drow@mvista.com>
16462
16463 * server.h: Include <string.h> if HAVE_STRING_H.
16464 * ChangeLog: Correct paths in last ChangeLog entry.
16465
164662002-04-09 Daniel Jacobowitz <drow@mvista.com>
16467
16468 * linux-low.h: Remove obsolete prototypes.
16469 (struct linux_target_ops): New.
16470 (extern the_low_target): New.
16471 * linux-low.c (num_regs, regmap): Remove declarations.
16472 (register_addr): Use the_low_target explicitly.
16473 (fetch_register): Likewise.
16474 (usr_fetch_inferior_registers): Likewise.
16475 (usr_store_inferior_registers): Likewise.
16476 * linux-arm-low.c (num_regs): Remove.
16477 (arm_num_regs): Define.
16478 (arm_regmap): Renamed from regmap, made static.
16479 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16480 made static.
16481 (arm_cannot_store_register): Renamed from cannot_store_register,
16482 made static.
16483 (the_low_target): New.
16484 * linux-i386-low.c (num_regs): Remove.
16485 (i386_num_regs): Define.
16486 (i386_regmap): Renamed from regmap, made static.
16487 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16488 made static.
16489 (i386_cannot_store_register): Renamed from cannot_store_register,
16490 made static.
16491 (the_low_target): New.
16492 * linux-ia64-low.c (num_regs): Remove.
16493 (ia64_num_regs): Define.
16494 (ia64_regmap): Renamed from regmap, made static.
16495 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16496 made static.
16497 (ia64_cannot_store_register): Renamed from cannot_store_register,
16498 made static.
16499 (the_low_target): New.
16500 * linux-m68k-low.c (num_regs): Remove.
16501 (m68k_num_regs): Define.
16502 (m68k_regmap): Renamed from regmap, made static.
16503 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16504 made static.
16505 (m68k_cannot_store_register): Renamed from cannot_store_register,
16506 made static.
16507 (the_low_target): New.
16508 * linux-mips-low.c (num_regs): Remove.
16509 (mips_num_regs): Define.
16510 (mips_regmap): Renamed from regmap, made static.
16511 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16512 made static.
16513 (mips_cannot_store_register): Renamed from cannot_store_register,
16514 made static.
16515 (the_low_target): New.
16516 * linux-ppc-low.c (num_regs): Remove.
16517 (ppc_num_regs): Define.
16518 (ppc_regmap): Renamed from regmap, made static.
16519 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16520 made static.
16521 (ppc_cannot_store_register): Renamed from cannot_store_register,
16522 made static.
16523 (the_low_target): New.
16524 * linux-s390-low.c (num_regs): Remove.
16525 (s390_num_regs): Define.
16526 (s390_regmap): Renamed from regmap, made static.
16527 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16528 made static.
16529 (s390_cannot_store_register): Renamed from cannot_store_register,
16530 made static.
16531 (the_low_target): New.
16532 * linux-sh-low.c (num_regs): Remove.
16533 (sh_num_regs): Define.
16534 (sh_regmap): Renamed from regmap, made static.
16535 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16536 made static.
16537 (sh_cannot_store_register): Renamed from cannot_store_register,
16538 made static.
16539 (the_low_target): New.
16540 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16541 (the_low_target): New.
16542
165432002-04-09 Daniel Jacobowitz <drow@mvista.com>
16544
16545 * Makefile.in: Add stamp-h target.
16546 * configure.in: Create stamp-h.
16547 * configure: Regenerated.
16548
165492002-04-09 Daniel Jacobowitz <drow@mvista.com>
16550
16551 * inferiors.c: New file.
16552 * target.c: New file.
16553 * target.h: New file.
16554 * Makefile.in: Add target.o and inferiors.o. Update
16555 dependencies.
16556 * linux-low.c (inferior_pid): New static variable,
16557 moved from server.c.
16558 (linux_create_inferior): Renamed from create_inferior.
16559 Call add_inferior. Return 0 on success instead of a PID.
16560 (linux_attach): Renamed from myattach.
16561 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16562 (linux_thread_alive): Renamed from mythread_alive.
16563 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16564 child dies.
16565 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16566 (regsets_store_inferior_registers): Correct error message.
16567 Add missing ``return 0''.
16568 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16569 (linux_store_registers): Renamed from store_inferior_registers.
16570 (linux_read_memory): Renamed from read_inferior_memory.
16571 (linux_write_memory): Renamed from write_inferior_memory.
16572 (linux_target_ops): New structure.
16573 (initialize_low): Call set_target_ops ().
16574 * remote-utils.c (unhexify): New function.
16575 (hexify): New function.
16576 (input_interrupt): Send signals to ``signal_pid''.
16577 * server.c (inferior_pid): Remove.
16578 (start_inferior): Update create_inferior call.
16579 (attach_inferior): Call add_inferior.
16580 (handle_query): New function.
16581 (main): Call handle_query for `q' packets.
16582 * server.h: Include "target.h". Remove obsolete prototypes.
16583 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16584
165852002-04-09 Daniel Jacobowitz <drow@mvista.com>
16586
16587 * Makefile.in: Add WARN_CFLAGS. Update configury
16588 dependencies.
16589 * configure.in: Check for <string.h>
16590 * configure: Regenerate.
16591 * config.in: Regenerate.
16592 * gdbreplay.c: Include needed system headers.
16593 (remote_open): Remove strchr prototype.
16594 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16595 * regcache.c (supply_register): Change buf argument to const void *.
16596 (supply_register_by_name): Likewise.
16597 (collect_register): Change buf argument to void *.
16598 (collect_register_by_name): Likewise.
16599 * regcache.h: Add missing prototypes.
16600 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16601 * server.c (handle_query): New function.
16602 (attached): New static variable, moved out of main.
16603 (main): Quiet longjmp clobber warnings.
16604 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16605 * utils.c (error): Remove NORETURN.
16606 (fatal): Likewise.