Remove fake operand handling for extended mnemonics.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
55271bf9
JB
12018-05-10 Joel Brobecker <brobecker@adacore.com>
2
3 * lynx-i386-low.c (LYNXOS_178): New macro.
4 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5 the layout on LynxOS-178.
6 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
7 handle floating point registers that are not supported by
8 LynxOS-178.
9
1a34f210
TT
102018-05-10 Tom Tromey <tom@tromey.com>
11
12 * configure: Rebuild.
13
190852c8
JB
142018-05-10 Joel Brobecker <brobecker@adacore.com>
15
16 PR server/23158:
17 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
18 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
19 Use it to set the expedite_regs field in the given tdesc.
20 * x86-tdesc.h: New file.
21 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
22 Adjust following the addition of the new expedite_regs parameter
23 to init_target_desc.
24 * linux-tic6x-low.c (tic6x_read_description): Likewise.
25 * linux-x86-tdesc.c: #include "x86-tdesc.h".
26 (i386_linux_read_description, amd64_linux_read_description):
27 Adjust following the addition of the new expedite_regs parameter
28 to init_target_desc.
29 * lynx-i386-low.c: #include "x86-tdesc.h".
30 (lynx_i386_arch_setup): Adjust following the addition of the new
31 expedite_regs parameter to init_target_desc.
32 * nto-x86-low.c: #include "x86-tdesc.h".
33 (nto_x86_arch_setup): Adjust following the addition of the new
34 expedite_regs parameter to init_target_desc.
35 * win32-i386-low.c: #include "x86-tdesc.h".
36 (i386_arch_setup): Adjust following the addition of the new
37 expedite_regs parameter to init_target_desc.
38
7dbac825
JB
392018-05-10 Joel Brobecker <brobecker@adacore.com>
40
41 PR server/23158:
42 * win32-low.c (win32_create_inferior): Add call to my_wait
43 setting last_status global.
44
906994d9
JB
452018-05-10 Joel Brobecker <brobecker@adacore.com>
46
47 PR server/23158:
48 * win32-low.c (create_process): Only call gdb_tilde_expand if
49 inferior_cwd is not NULL.
50
8ee22052
AB
512018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
52
53 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
54 registers to the cache if their values have changed.
55 (i387_xsave_to_cache): Provide default values for x87 control
56 registers when these features are available, but disabled.
57 * regcache.c (supply_register_by_name_zeroed): New function.
58 * regcache.h (supply_register_by_name_zeroed): Declare new
59 function.
60
aff689d3
TT
612018-05-07 Tom Tromey <tom@tromey.com>
62
63 * configure: Rebuild.
64
85e26832
TT
652018-05-04 Tom Tromey <tom@tromey.com>
66
67 * configure: Rebuild.
68
a3b60e45
JK
692018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
70 Pedro Alves <palves@redhat.com>
71
72 * linux-aarch64-low.c (aarch64_stopped_data_address):
73 Likewise.
74
632e107b
TT
752018-04-27 Tom Tromey <tom@tromey.com>
76
77 * configure: Rebuild.
78
458412c3
TT
792018-04-23 Tom Tromey <tom@tromey.com>
80
81 * configure: Rebuild.
82
f31c089e
SM
832018-04-19 Simon Marchi <simon.marchi@ericsson.com>
84
85 * Makefile.in (depcomp): Add "..".
86 (all_deps_files): New and use it.
87
b319b098
AH
882018-04-18 Alan Hayward <alan.hayward@arm.com>
89
90 * configure.srv (aarch64*-*-linux*): Don't include xml.
91 (i[34567]86-*-cygwin*): Likewise.
92 (i[34567]86-*-linux*): Likewise.
93 (i[34567]86-*-lynxos*): Likewise.
94 (i[34567]86-*-mingw32ce*): Likewise.
95 (i[34567]86-*-mingw*): Likewise.
96 (i[34567]86-*-nto*): Likewise.
97 (tic6x-*-uclinux): Likewise.
98 (x86_64-*-linux*): Likewise.
99 (x86_64-*-mingw*): Likewise.
100 (x86_64-*-cygwin*): Likewise.
101
3b74854b
AH
1022018-04-18 Alan Hayward <alan.hayward@arm.com>
103
104 * tdesc.c: Remove xml parameter.
105
e98577a9
AH
1062018-04-18 Alan Hayward <alan.hayward@arm.com>
107
108 * server.c (get_features_xml): Remove cast.
109 * tdesc.c (void target_desc::accept): Fill in function.
110 (tdesc_get_features_xml): Remove old xml creation.
111 (print_xml_feature::visit_pre): Add xml vistor.
112 * tdesc.h (struct target_desc): Make xmltarget mutable.
113 (tdesc_get_features_xml): Remove declaration.
114
d278f585
AH
1152018-04-18 Alan Hayward <alan.hayward@arm.com>
116
117 * tdesc.c (tdesc_architecture_name): Add new function.
118 (tdesc_osabi_name): Likewise.
119 (tdesc_get_features_xml): Use new functions.
120
eee8a18d
AH
1212018-04-18 Alan Hayward <alan.hayward@arm.com>
122
123 * tdesc.c (tdesc_create_flags): Remove.
124 (tdesc_add_flag): Likewise.
125 (tdesc_named_type): Likewise.
126 (tdesc_create_union): Likewise.
127 (tdesc_create_struct): Likewise.
128 (tdesc_create_vector): Likewise.
129 (tdesc_add_bitfield): Likewise.
130 (tdesc_add_field): Likewise.
131 (tdesc_set_struct_size): Likewise.
132
82ec9bc7
AH
1332018-04-18 Alan Hayward <alan.hayward@arm.com>
134
135 * tdesc.c (~target_desc): Remove implictly deleted items.
136 (init_target_desc): Iterate all features.
137 (tdesc_get_features_xml): Use vector.
138 (tdesc_create_feature): Create feature.
139 * tdesc.h (tdesc_feature) Remove
140 (target_desc): Add features.
141
ea3e7d71
AH
1422018-04-18 Alan Hayward <alan.hayward@arm.com>
143
144 * Makefile.in: Add common/tdesc.c
145 * tdesc.c (init_target_desc): init all reg_defs from register
146 vector.
147 (tdesc_create_reg): Create tdesc_reg.
148 * tdesc.h (tdesc_feature): Add register vector.
149
17d08cd4
SM
1502018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
151
152 * tdesc.h (struct target_desc) <features>: Change type to
153 std::vector<std::string>.
154 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
155 changes.
156 (tdesc_get_features_xml): Likewise.
157 (tdesc_create_feature): Likewise.
158
5cd3e386
AH
1592018-03-26 Alan Hayward <alan.hayward@arm.com>
160
161 * regcache.c (find_register_by_number): Return a ref.
162 (find_regno): Use references.
163 (register_size): Likewise.
164 (register_data): Likewise.
165 * tdesc.c (target_desc::~target_desc): Remove free calls.
166 (target_desc::operator==): Use std::vector compare.
167 (init_target_desc): Use reference.
168 (tdesc_create_reg): Use reg constructors.
169 * tdesc.h (struct target_desc): Replace pointer with object.
170
dff7492c
AH
1712018-03-23 Alan Hayward <alan.hayward@arm.com>
172
173 * regcache.c (find_register_by_number): Make static.
174 (find_regno): Use find_register_by_number
175 * regcache.h (struct reg): Remove declaration.
176
d80e5242
AH
1772018-03-23 Alan Hayward <alan.hayward@arm.com>
178
179 * tdesc.c (target_desc::~target_desc): Move to here.
180 (target_desc::operator==): Likewise.
181 * tdesc.h (target_desc::~target_desc): Move from here.
182 (target_desc::operator==): Likewise.
183
f69c5afb
AA
1842018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
185
186 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
187
ce29f843
AA
1882018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
189
190 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
191 S390_TDESC_GS.
192 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
193 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
194 and init_registers_s390_gs_linux64.
195
c49bd90b
AA
1962018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
197
198 * linux-s390-low.c (s390_fill_gs): Remove function.
199 (s390_fill_gsbc): Remove function.
200 (s390_regsets): Set fill functions for the guarded storage regsets
201 to NULL.
202
7edb9bd3
AA
2032018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
204
205 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
206 the word size. Add comment.
207 (s390_get_wordsize): New function.
208 (s390_arch_setup): No longer select a temporary tdesc to fetch the
209 pswm with it. Instead, use s390_get_wordsize to determine the
210 word size first and derive the correct tdesc from that directly.
211
39be3c7e
SM
2122018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
213
214 * Makefile.in: Include silent-rules.mk.
215 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
216 (COMPILE): Add ECHO_CXX.
217 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
218 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
219 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
220 (version-generated.c): Add ECHO_GEN.
221 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
222 (IPAGENT_COMPILE): Add ECHO_CXX.
223 (%-generated.c): Add ECHO_REGDAT.
224
3ae9ce5d
TT
2252018-03-14 Tom Tromey <tom@tromey.com>
226
227 PR cli/14977:
228 * ax.c (ax_printf): Special case for NULL.
229
e6a58aa8
SM
2302018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
231
232 * linux-low.c (linux_qxfer_libraries_svr4): Use
233 xml_escape_text_append.
234
f6e8a41e
SM
2352018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
236
237 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
238
b9671caf
SM
2392018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * server.c (handle_general_set): Remove unnecessary xstrdup.
242
e80aaf61
SM
2432018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
244
245 * server.c (parse_debug_format_options): Adjust to
246 delim_string_to_char_ptr_vec changes.
247 * thread-db.c (thread_db_load_search): Adjust to
248 dirnames_to_char_ptr_vec changes.
249
b1223e78
MM
2502018-03-01 Markus Metzger <markus.t.metzger@intel.com>
251
252 * target.h (target_enable_btrace, target_disable_btrace)
253 (target_read_btrace, target_read_btrace_conf): Turn macro into
254 inline function. Throw error if target method is not defined.
255 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
256 check for btrace target method. Be prepared to handle exceptions
257 from btrace target methods.
258
81561546
SDJ
2592018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
260
261 * server.c (captured_main): Change order of error message printed
262 when the current working directory cannot be found.
263
25e3c82c
SDJ
2642018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
265
266 * server.c: Include "filenames.h" and "pathstuff.h".
267 (program_name): Delete variable.
268 (program_path): New anonymous class.
269 (get_exec_wrapper): Use "program_path" instead of
270 "program_name".
271 (handle_v_run): Likewise.
272 (captured_main): Likewise.
273 (process_serial_event): Likewise.
274
b4987c95
SDJ
2752018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
276
277 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
278 (OBJS): Add "pathstuff.o".
279 * server.c (current_directory): New global variable.
280 (captured_main): Initialize "current_directory".
281
f46cd62a
AH
2822018-02-26 Alan Hayward <alan.hayward@arm.com>
283
284 * tdesc.c: Use common/tdesc.h.
285 * tdesc.h: Likewise.
286
a543c5ca
AH
2872018-02-20 Alan Hayward <alan.hayward@arm.com>
288 Simon Marchi <simon.marchi@ericsson.com>
289
290 * Makefile.in: Switch order of make rules.
291
b5884fa7
AH
2922018-02-19 Alan Hayward <alan.hayward@arm.com>
293
294 * Makefile.in: Add common directory in build.
295 * configure.ac: Add common reference.
296 * configure: Regenerate.
297
de6242d3
MM
2982018-02-09 Markus Metzger <markus.t.metzger@intel.com>
299
300 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
301 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
302 * spu-low.c (spu_target_ops): Likewise.
303 * win32-low.c (win32_target_ops): Likewise.
304 * server.c (supported_btrace_packets): Report packets unconditionally.
305 * target.h (target_ops) <supports_btrace>: Remove.
306 (target_supports_btrace): Remove.
307
9ee23a85
MM
3082018-02-09 Markus Metzger <markus.t.metzger@intel.com>
309
310 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
311 (handle_btrace_disable): Change return type to void. Use exceptions
312 to report errors.
313 (handle_btrace_general_set): Catch exception and copy message to
314 return message.
315
8ce47547
TT
3162018-02-08 Tom Tromey <tom@tromey.com>
317
318 * linux-low.c (install_software_single_step_breakpoints): Use
319 make_scoped_restore.
320 * inferiors.c (make_cleanup_restore_current_thread): Remove.
321 (do_restore_current_thread_cleanup): Remove.
322 * gdbthread.h (make_cleanup_restore_current_thread): Don't
323 declare.
324
45dd3607
TT
3252018-02-08 Tom Tromey <tom@tromey.com>
326
327 * mem-break.c (set_raw_breakpoint_at): Use
328 gdb::unique_xmalloc_ptr.
329
e671cd59
PA
3302018-01-30 Pedro Alves <palves@redhat.com>
331
332 PR gdb/13211
333 * target.c (target_terminal::terminal_state): Rename to ...
334 (target_terminal::m_terminal_state): ... this.
335
a0aad537
JC
3362018-01-19 James Clarke <jrtc27@jrtc27.com>
337
338 * linux-low.c (handle_extended_wait): Surround call to
339 thread_db_notice_clone with #ifdef USE_THREAD_DB.
340
4d9b86e1
SM
3412018-01-17 Simon Marchi <simon.marchi@ericsson.com>
342
343 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
344 linux_ptrace_attach_fail_reason_string now returning an
345 std::string.
346 (linux_attach): Likewise.
347 * thread-db.c (attach_thread): Likewise.
348
f517c180
EA
3492018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
350
351 PR gdb/21559
352 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
353 checking for fs_base/gs_base fields in struct user_regs_struct.
354 * configure: Regenerate.
355
9a70f35c
YQ
3562018-01-16 Yao Qi <yao.qi@linaro.org>
357
358 PR gdb/18749
359 * linux-low.c (fetch_register): Call supply_register instead of
360 error.
361
605fd3c6
YQ
3622018-01-08 Yao Qi <yao.qi@linaro.org>
363 Simon Marchi <simon.marchi@ericsson.com>
364
365 * Makefile.in (OBS): Remove selftest.o.
366 * configure.ac: Set srv_selftest_objs if $development is true.
367 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
368 * configure: Re-generated.
369 * server.c (captured_main): Wrap variable selftest_filter with
370 GDB_SELF_TEST.
371
2cc05030
SM
3722018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
373
374 * server.c (parse_debug_format_options): Return std::string.
375 (handle_monitor_command, captured_main): Adjust.
376
e379cee6
PA
3772018-01-05 Pedro Alves <palves@redhat.com>
378
379 PR gdb/18653
380 * server.c (captured_main): Pass quiet=false to
381 save_original_signals_state.
382
82e1e79a
JB
3832018-01-01 Joel Brobecker <brobecker@adacore.com>
384
385 * gdbreplay.c (gdbreplay_version): Update copyright year in
386 version message.
387 * server.c (gdbserver_version): Likewise.
388
8e481c3b
TT
3892017-12-08 Tom Tromey <tom@tromey.com>
390
391 * ax.c (ax_printf): Update.
392
a8806230
YQ
3932017-12-07 Yao Qi <yao.qi@linaro.org>
394
395 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
396 aarch64_linux_read_description.
397 * linux-amd64-ipa.c (idx2mask): New array.
398 (get_ipa_tdesc): Move idx2mask out.
399 (initialize_low_tracepoint): Initialize target descriptions.
400 * linux-i386-ipa.c (idx2mask): New array.
401 (get_ipa_tdesc): Move idx2mask out.
402 (initialize_low_tracepoint): Initialize target descriptions.
403
d4a0e8b5
SM
4042017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
405
406 * tdesc.c (struct tdesc_type): Change return type.
407 (tdesc_add_flag): Change parameter type.
408 (tdesc_add_bitfield): Likewise.
409 (tdesc_add_field): Likewise.
410 (tdesc_set_struct_size): Likewise.
411
798a7429
SM
4122017-12-05 Simon Marchi <simon.marchi@ericsson.com>
413
414 * regcache.c (registers_to_string): Remove unused variable.
415
c0e15c9b
SM
4162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
417
418 * inferiors.c (for_each_inferior_with_data): Remove.
419 * inferiors.h (for_each_inferior_with_data): Remove.
420 * server.c (handle_qxfer_threads_worker): Change parameter type.
421 (handle_qxfer_threads_proper): Use for_each_thread.
422
f0045347
SM
4232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
424
425 * inferiors.c (for_each_inferior): Remove.
426 (clear_inferiors): Use for_each_thread.
427 * inferiors.h (for_each_inferior): Remove.
428 * linux-low.c (linux_wait_for_event_filtered): Use
429 for_each_thread.
430 (linux_stabilize_threads): Likewise.
431 * regcache.c (regcache_release): Likewise.
432 * server.c (gdb_wants_all_threads_stopped): Likewise.
433 (clear_pending_status_callback): Remove.
434 (handle_status): Use for_each_thread.
435 (captured_main): Likewise.
436 * win32-low.c (child_init_thread_list): Likewise.
437 (win32_clear_inferiors): Likewise.
438 (fake_breakpoint_event): Likewise.
439
9521758b
SM
4402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
441
442 * inferiors.h (find_inferior): Remove.
443 * inferiors.c (find_inferior): Remove.
444
8f86d7aa
SM
4452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
446
447 * linux-low.c (resume_status_pending_p): Update comment.
448 (need_step_over_p): Update comment.
449
e2b44075
SM
4502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
451
452 * linux-low.c (proceed_one_lwp): Return void, change parameter
453 type.
454 (unsuspend_and_proceed_one_lwp): Likewise.
455 (proceed_all_lwps): Use for_each_thread.
456 (unstop_all_lwps): Likewise.
457
c80825ff
SM
4582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
459
460 * linux-low.c (linux_resume_one_thread): Return void, take
461 parameter directly.
462 (linux_resume): Use for_each_thread.
463
df3e4dbe
SM
4642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
465
466 * linux-low.c (send_sigstop_callback): Return void, change
467 parameter type. Rename to...
468 (send_sigstop): ... this.
469 (suspend_and_send_sigstop_callback): Return void, change parameter
470 type. Rename to...
471 (suspend_and_send_sigstop): ... this.
472 (stop_all_lwps): Use for_each_thread.
473
5a6b0a41
SM
4742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
475
476 * linux-low.c (lwp_running): Return bool, remove unused
477 argument.
478 (linux_stabilize_threads): Use find_thread.
479
39a64da5
SM
4802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
481
482 * linux-low.c (select_singlestep_lwp_callback): Remove.
483 (count_events_callback): Remove.
484 (select_event_lwp_callback): Remove.
485 (select_event_lwp): Use find_thread/for_each_thread.
486
a1385b7b
SM
4872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * linux-low.c (not_stopped_callback): Return bool, take filter
490 argument directly.
491 (linux_wait_for_event_filtered): Use find_thread.
492 (linux_wait_1): Likewise.
493
454296a2
SM
4942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * linux-low.c (same_lwp): Remove.
497 (find_lwp_pid): Use find_thread.
498
6b2a85da
SM
4992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
500
501 * linux-low.c (delete_lwp_callback): Remove.
502 (linux_mourn): Use for_each_thread.
503
798a38e8
SM
5042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
505
506 * linux-low.c (linux_detach_lwp_callback): Return void, remove
507 args parameter, don't check for pid.
508 (linux_detach): Use for_each_thread.
509
e4eb0dec
SM
5102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
511
512 * linux-low.c (struct counter): Remove.
513 (second_thread_of_pid_p): Remove.
514 (last_thread_of_process_p): Use find_thread.
515
83e1b6c1
SM
5162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
517
518 * inferiors.c (find_inferior_in_random): Remove.
519 * inferiors.h (find_inferior_in_random): Remove.
520 * linux-low.c (status_pending_p_callback): Return bool, accept
521 parameter ptid directly.
522 (linux_wait_for_event_filtered): Use find_thread_in_random.
523 (linux_wait_1): Likewise.
524
8dc7b443
SM
5252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
526
527 * inferiors.c (find_inferior_id): Remove.
528 (find_thread_ptid): Move implemention from find_inferior_id to
529 here.
530 * inferiors.h (find_inferior_id): Remove.
531 * server.c (handle_status): Use find_thread_ptid.
532 (process_serial_event): Likewise.
533 * thread-db.c (find_one_thread): Likewise.
534 (thread_db_thread_handle): Likewise.
535 * win32-low.c (thread_rec): Likewise.
536 (child_delete_thread): Likewise.
537 (win32_thread_alive): Likewise.
538 (get_child_debug_event): Likewise.
539
da25033c
SM
5402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * linux-mips-low.c (update_watch_registers_callback): Return
543 void, remove pid_p parameter, don't check for pid.
544 (mips_insert_point, mips_remove_point): Use for_each_thread.
545
c91bb56b
SM
5462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
547
548 * lynx.low (lynx_delete_thread_callback): Remove.
549 (lynx_mourn): Use for_each_thread.
550
634a3254
SM
5512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
552
553 * regcache.c (regcache_invalidate_one): Remove.
554 (regcache_invalidate_pid): use for_each_thread.
555
41272101
TT
5562017-11-26 Tom Tromey <tom@tromey.com>
557
558 * linux-low.c (linux_create_inferior): Update.
559
f5291a6f
UW
5602017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
561
562 * spu-low.c (spu_create_inferior): Fix typo in argument name.
563
6654d750
AH
5642017-11-24 Alan Hayward <alan.hayward@arm.com>
565
566 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
567 * linux-aarch64-low.c (initialize_low_arch): Call init func.
568 * linux-aarch64-tdesc-selftest.c: New file.
569 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
570
5712017-11-24 Alan Hayward <alan.hayward@arm.com>
572
573 * configure.srv: Add new file.
574 * linux-aarch64-low.c (initialize_low_arch): Call init func.
575 * linux-aarch64-tdesc-selftest.c: New file.
576 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
577
49bdb7ee
AH
5782017-11-24 Alan Hayward <alan.hayward@arm.com>
579
580 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
581 * linux-aarch64-low.c (initialize_low_arch): Remove init.
582 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
583
d6d7ce56
AH
5842017-11-24 Alan Hayward <alan.hayward@arm.com>
585
586 * configure.srv: Add new files.
587 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
588 aarch64_linux_read_description.
589 * linux-aarch64-low.c (aarch64_linux_read_description):
590 Merge with aarch64_arch_setup.
591 (aarch64_arch_setup): Call aarch64_linux_read_description.
592 * linux-aarch64-tdesc.c: New file.
593 * linux-aarch64-tdesc.h: New file.
594
506fe5f4
YQ
5952017-11-24 Yao Qi <yao.qi@linaro.org>
596
597 * configure.srv: Set $srv_regobj for tic6x-linux.
598 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
599 (tic6x_read_description): Move some code to tic6x_arch_setup.
600 (tic6x_tdesc_test): New function.
601 (initialize_low_arch): Call selftests::register_test.
602
29f9a567
YQ
6032017-11-22 Yao Qi <yao.qi@linaro.org>
604
605 * remote-utils.c (prepare_resume_reply): Use memcpy.
606
578290ec
SM
6072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
608
609 * linux-low.c (kill_one_lwp_callback): Return void, take
610 argument directly, don't filter on pid.
611 (linux_kill): Use for_each_thread.
612
eca55aec
SM
6132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
614
615 * linux-low.c (need_step_over_p): Return bool, remove dummy
616 argument.
617 (linux_resume, proceed_all_lwps): Use find_thread.
618
25c28b4d
SM
6192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
620
621 * linux-low.c (resume_status_pending_p): Return bool, remove
622 flag_p argument.
623 (linux_resume): Use find_thread.
624
5fdda392
SM
6252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
626
627 * linux-low.c (struct thread_resume_array): Remove.
628 (linux_set_resume_request): Return void, take arguments
629 directly.
630 (linux_resume): Use for_each_thread.
631
fcb056a5
SM
6322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
633
634 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
635 return bool, remove data argument.
636 (linux_stabilize_threads): Use find_thread.
637
139720c5
SM
6382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
639
640 * linux-low.c (unsuspend_one_lwp): Remove.
641 (unsuspend_all_lwps): Use for_each_thread, inline code from
642 unsuspend_one_lwp.
643
6d1e5673
SM
6442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
645
646 * gdbthread.h (find_thread): Add overload with ptid_t filter.
647 * linux-low.c (struct iterate_over_lwps_args): Remove.
648 (iterate_over_lwps_filter): Remove.
649 (iterate_over_lwps): Use find_thread.
650
bbf550d5
SM
6512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
652
653 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
654 (linux_handle_new_gdb_connection): Use for_each_thread, inline
655 code from reset_lwp_ptrace_options_callback.
656
00192f77
SM
6572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
658
659 * linux-arm-low.c (struct update_registers_data): Remove.
660 (update_registers_callback): Return void, take arguments
661 directly, don't check thread's pid.
662 (arm_insert_point, arm_remove_point): Use for_each_thread.
663
2bee2b6c
SM
6642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
665
666 * win32-low.c (continue_one_thread): Return void, take argument
667 directly.
668 (child_continue): Use for_each_thread.
669
0b360f19
SM
6702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
671
672 * win32-i386-low.c (update_debug_registers_callback): Rename
673 to ...
674 (update_debug_registers): ... this, return void, remove pid_p arg.
675 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
676
f27866ba
SM
6772017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
678
679 * inferiors.h (struct process_info): Add constructor, initialize
680 fields..
681 <syscalls_to_catch>: Change type to std::vector<int>.
682 * inferiors.c (add_process): Allocate process_info with new.
683 (remove_process): Free process_info with delete.
684 * linux-low.c (handle_extended_wait): Adjust.
685 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
686 * server.c (handle_general_set): Adjust.
687
e849ea89
PA
6882017-11-16 Pedro Alves <palves@redhat.com>
689
690 * remote-utils.c (remote_close): Block SIGIO signals instead of
691 uninstalling the SIGIO handler.
692
1d0aa65c
AH
6932017-11-16 Alan Hayward <alan.hayward@arm.com>
694
695 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
696
3491a34c
YQ
6972017-11-16 Yao Qi <yao.qi@linaro.org>
698
699 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
700 (tic6x_store_gregset): Likewise.
701 (tic6x_usrregs_info): Move it up.
702
a602f924
AH
7032017-11-15 Alan Hayward <alan.hayward@arm.com>
704
705 * Makefile.in: Update arch rules.
706 * configure.srv: Explicitly mark arch/ files.
707
5616b6c3
AS
7082017-11-13 Andreas Schwab <schwab@suse.de>
709
710 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
711 function.
712 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
713
d1928160
PA
7142017-11-06 Pedro Alves <palves@redhat.com>
715
716 * config.in, configure: Regenerate.
717
bac608e7
SM
7182017-10-27 Simon Marchi <simon.marchi@ericsson.com>
719
720 * target.c (struct thread_search): Remove.
721 (thread_search_callback): Remove.
722 (prepare_to_access_memory): Use for_each_thread instead of
723 find_inferior. Inline code from thread_search_callback.
724
eaddb425
SM
7252017-10-27 Simon Marchi <simon.marchi@ericsson.com>
726
727 * server.c (struct visit_actioned_threads_data): Remove.
728 (visit_actioned_threads): Change prototype to take arguments
729 directly.
730 (resume): Use find_thread instead of find_inferior.
731
99078d34
SM
7322017-10-27 Simon Marchi <simon.marchi@ericsson.com>
733
734 * server.c (queue_stop_reply_callback): Change prototype, return
735 void.
736 (find_status_pending_thread_callback): Remove.
737 (handle_status): Replace find_inferior with find_thread and
738 for_each_thread.
739
cc628f3d
AH
7402017-10-25 Alan Hayward <alan.hayward@arm.com>
741
742 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
743 with REGNO.
744 (aarch64_store_gregset): Likewise.
745 (aarch64_fill_fpregset): Likewise.
746 (aarch64_store_fpregset): Likewise.
747
4d3bb80e
SM
7482017-10-21 Simon Marchi <simon.marchi@ericsson.com>
749
750 * gdbthread.h (find_thread, for_each_thread): New functions.
751 * inferiors.c (thread_of_pid): Remove.
752 (find_any_thread_of_pid): Use find_thread.
753 * linux-low.c (num_lwps): Use for_each_thread.
754
7a7cdfa0
YQ
7552017-10-17 Yao Qi <yao.qi@linaro.org>
756
757 * Makefile.in: Remove one rule.
758 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
759
e675d170
YQ
7602017-10-17 Yao Qi <yao.qi@linaro.org>
761
762 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
763 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
764
7eb4e0f9
YQ
7652017-10-17 Yao Qi <yao.qi@linaro.org>
766
767 * configure.srv: Rename arm.o with arch/arm.o.
768
60d6cfc9
YQ
7692017-10-17 Yao Qi <yao.qi@linaro.org>
770
771 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
772 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
773 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
774 (arch-i386.o, arch-amd64.o): Remove rules.
775 (arch/%.o): New rule.
776 Update POSTCOMPILE and COMPILE.pre.
777 * configure.ac: Invoke AC_CONFIG_COMMANDS.
778 * configure: Re-generated.
779 * configure.srv: Replace arch-i386.o with arch/i386.o.
780 Replace arch-amd64.o with arch/amd64.o.
781
5bfda255
YQ
7822017-10-16 Yao Qi <yao.qi@linaro.org>
783
784 * configure: Regenerated.
785
9c80ecd6
SM
7862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
787
788 * inferiors.h: (struct inferior_list): Remove.
789 (struct inferior_list_entry); Remove.
790 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
791 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
792 get_first_inferior): Remove.
793 (for_each_inferior, for_each_inferior_with_data, find_inferior,
794 find_inferior_id, find_inferior_in_random): Change signature.
795 * inferiors.c (all_threads): Change type to
796 std::list<thread_info *>.
797 (get_thread): Remove macro.
798 (find_inferior, find_inferior_id): Change signature, implement
799 using find_thread.
800 (find_inferior_in_random): Change signature, implement using
801 find_thread_in_random.
802 (for_each_inferior, for_each_inferior_with_data): Change
803 signature, implement using for_each_thread.
804 (add_inferior_to_list, remove_inferior): Remove.
805 (add_thread, get_first_thread, thread_of_pid,
806 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
807 (get_first_inferior, one_inferior_p, clear_inferior_list):
808 Remove.
809 (clear_inferiors, get_thread_process): Update.
810 * gdbthread.h: Include <list>.
811 (struct thread_info) <entry>: Remove field.
812 <id>: New field.
813 (all_threads): Change type to std::list<thread_info *>.
814 (get_first_inferior): Add doc.
815 (find_thread, for_each_thread, find_thread_in_random): New
816 functions.
817 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
818 * linux-arm-low.c (update_registers_callback): Update.
819 * linux-low.c (second_thread_of_pid_p): Update.
820 (kill_one_lwp_callback, linux_detach_lwp_callback,
821 delete_lwp_callback, status_pending_p_callback, same_lwp,
822 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
823 iterate_over_lwps, not_stopped_callback,
824 resume_stopped_resumed_lwps, count_events_callback,
825 select_singlestep_lwp_callback, select_event_lwp_callback,
826 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
827 suspend_and_send_sigstop_callback, wait_for_sigstop,
828 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
829 lwp_running, linux_set_resume_request, resume_status_pending_p,
830 need_step_over_p, start_step_over, linux_resume_one_thread,
831 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
832 reset_lwp_ptrace_options_callback): Update.
833 * linux-mips-low.c (update_watch_registers_callback): Update.
834 * regcache.c (regcache_invalidate_one, regcache_invalidate):
835 Update.
836 (free_register_cache_thread_one): Remove.
837 (regcache_release): Update.
838 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
839 handle_qxfer_threads_worker): Update.
840 (handle_query): Update, use list iterator.
841 (visit_actioned_threads, handle_pending_status,
842 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
843 clear_pending_status_callback, set_pending_status_callback,
844 find_status_pending_thread_callback, handle_status,
845 process_serial_event): Update.
846 * target.c (thread_search_callback): Update.
847 * thread-db.c (thread_db_get_tls_address): Update.
848 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
849 Update.
850 * win32-i386-low.c (update_debug_registers_callback): Update.
851 * win32-low.c (delete_thread_info, child_delete_thread,
852 continue_one_thread, suspend_one_thread,
853 get_child_debug_event): Adjust.
854
9179355e
SM
8552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
856
857 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
858 * inferiors.h: Include <list>.
859 (struct process_info) <entry>: Remove field.
860 <pid>: New field.
861 (pid_of): Change macro to function.
862 (ptid_of, lwpid_of): Remove macro.
863 (all_processes): Change type to std::list<process_info *>.
864 (ALL_PROCESSES): Remove macro.
865 (for_each_process, find_process): New function.
866 * inferiors.c (all_processes): Change type to
867 std::list<process_info *>.
868 (find_thread_process): Adjust.
869 (add_process): Likewise.
870 (remove_process): Likewise.
871 (find_process_pid): Likewise.
872 (get_first_process): Likewise.
873 (started_inferior_callback): Remove.
874 (have_started_inferiors_p): Adjust.
875 (attached_inferior_callback): Remove.
876 (have_attached_inferiors_p): Adjust.
877 * linux-low.c (check_zombie_leaders): Likewise.
878 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
879 (x86_linux_update_xmltarget): Adjust.
880 * server.c (handle_query): Likewise.
881 (gdb_reattached_process): Remove.
882 (handle_status): Adjust.
883 (kill_inferior_callback): Likewise.
884 (detach_or_kill_inferior): Remove.
885 (print_started_pid): Likewise.
886 (print_attached_pid): Likewise.
887 (detach_or_kill_for_exit): Update.
888 (process_serial_event): Likewise.
889 * linux-arm-low.c (arm_new_fork): Likewise.
890
c9cb8905
SM
8912017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * dll.h: Include <list>.
894 (struct dll_info): Add constructor.
895 <entry>: Remove field.
896 (all_dlls): Change type to std::list<dll_info>.
897 * dll.c: Include <algorithm>.
898 (get_dll): Remove macro.
899 (all_dlls): Change type to std::list<dll_info *>.
900 (free_one_dll): Remove.
901 (match_dll): Likewise.
902 (loaded_dll): Adjust.
903 (unloaded_dll): Adjust to all_dlls type change, use
904 std::find_if. Inline code from match_dll.
905 (clear_dlls): Adjust to all_dlls type change.
906 * server.c (emit_dll_description): Remove.
907 (handle_qxfer_libraries): Adjust to all_dlls type change,
908 integrate emit_dll_description's functionality.
909
04ec7890
SM
9102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
911
912 * linux-low.h (struct linux_target_ops) <delete_process>: New
913 field.
914 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
915 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
916 (struct linux_target_ops): Add delete_process callback.
917 * linux-arm-low.c (arm_delete_process): New.
918 (struct linux_target_ops): Add delete_process callback.
919 * linux-bfin-low.c (struct linux_target_ops): Likewise.
920 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
921 * linux-m32r-low.c (struct linux_target_ops): Likewise.
922 * linux-mips-low.c (mips_linux_delete_process): New.
923 (struct linux_target_ops): Add delete_process callback.
924 * linux-ppc-low.c (struct linux_target_ops): Likewise.
925 * linux-s390-low.c (struct linux_target_ops): Likewise.
926 * linux-sh-low.c (struct linux_target_ops): Likewise.
927 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
928 * linux-tile-low.c (struct linux_target_ops): Likewise.
929 * linux-x86-low.c (x86_linux_delete_process): New.
930 (struct linux_target_ops): Add delete_process callback.
931 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
932
466eecee
SM
9332017-10-12 Simon Marchi <simon.marchi@ericsson.com>
934
935 * linux-aarch64-low.c (the_low_target): Add thread delete
936 callback.
937 * linux-arm-low.c (arm_delete_thread): New function.
938 (the_low_target): Add thread delete callback.
939 * linux-bfin-low.c (the_low_target): Likewise.
940 * linux-crisv32-low.c (the_low_target): Likewise.
941 * linux-low.c (delete_lwp): Invoke delete_thread callback if
942 set.
943 * linux-low.h (struct linux_target_ops) <delete_thread>: New
944 field.
945 * linux-m32r-low.c (the_low_target): Add thread delete callback.
946 * linux-mips-low.c (mips_linux_delete_thread): New function.
947 (the_low_target): Add thread delete callback.
948 * linux-ppc-low.c (the_low_target): Likewise.
949 * linux-s390-low.c (the_low_target): Likewise.
950 * linux-sh-low.c (the_low_target): Likewise.
951 * linux-tic6x-low.c (the_low_target): Likewise.
952 * linux-tile-low.c (the_low_target): Likewise.
953 * linux-x86-low.c (the_low_target): Likewise.
954 * linux-xtensa-low.c (the_low_target): Likewise.
955
b79f7801
YZ
9562017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
957
958 * win32-low.c: Include "common-inferior.h".
959
bc3b087d
SDJ
9602017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
961
962 * inferiors.c (set_inferior_cwd): New function.
963 * server.c (handle_general_set): Handle QSetWorkingDir packet.
964 (handle_query): Inform that QSetWorkingDir is supported.
965 * win32-low.c (create_process): Pass the inferior's cwd to
966 CreateProcess.
967
d092c5a2
SDJ
9682017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
969
970 * inferiors.c (current_inferior_cwd): New global variable.
971 (get_inferior_cwd): New function.
972 * inferiors.h (struct process_info) <cwd>: New field.
973
7da0a886
SDJ
9742017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
975
976 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
977 (OBS): Add gdb_tilde_expand.o.
978
289a6840
SM
9792017-10-02 Simon Marchi <simon.marchi@ericsson.com>
980
981 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
982 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
983
256642e8
PA
9842017-09-29 Pedro Alves <palves@redhat.com>
985
986 * ax.c (gdb_parse_agent_expr): Constify.
987 * ax.h (gdb_parse_agent_expr): Constify.
988 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
989 Constify.
990 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
991 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
992 * remote-utils.h (read_ptid): Constify.
993 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
994 (process_point_options, process_serial_event): Constify.
995 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
996 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
997 (cmd_qtbuffer): Constify.
998
5b9ca4d4
PA
9992017-09-29 Pedro Alves <palves@redhat.com>
1000
1001 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1002 fails.
1003
94c207e0
PA
10042017-09-29 Pedro Alves <palves@redhat.com>
1005
1006 * linux-low.c (handle_extended_wait): Pass parent thread instead
1007 of process to thread_db_notice_clone.
1008 * linux-low.h (thread_db_notice_clone): Replace parent process
1009 parameter with parent thread parameter.
1010 * thread-db.c (find_one_thread): Add comment.
1011 (thread_db_notice_clone): Replace parent process parameter with
1012 parent thread parameter. Temporarily switch to the parent thread.
1013
75352e28
SDJ
10142017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1015
1016 * gdbthread.h: Include "common-gdbthread.h".
1017 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1018 "if" when validating the ptid.
1019 * remote-utils.c: Include "gdbthread.h".
1020 (prepare_resume_reply): Use "switch_to_thread".
1021 * target.c (done_accessing_memory): Likewise.
1022
ad339634
AA
10232017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1024
1025 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1026 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1027 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1028 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1029 s390x-gs-linux64-ipa.o to ipa_obj.
1030 * linux-s390-low.c (HWCAP_S390_GS): New define.
1031 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1032 New functions.
1033 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1034 (s390_arch_setup): Check for guarded-storage support and choose
1035 appropriate tdesc.
1036 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1037 init_registers_s390x_gs_linux64.
1038 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1039 enum value.
1040 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1041 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1042
cc4d742f
SM
10432017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1044
1045 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1046
f6327dcb
KB
10472017-09-21 Kevin Buettner <kevinb@redhat.com>
1048
1049 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1050 (thread_db_thread_handle): Declare.
1051 * linux-low.c (linux_target_ops): Initialize thread_handle.
1052 * server.c (handle_qxfer_threads_worker): Add support for
1053 "handle" attribute.
1054 * target.h (struct target_ops): Add new function pointer,
1055 thread_handle.
1056 (target_thread_handle): Define.
1057 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1058 field in lwp.
1059 (thread_db_thread_handle): New function.
1060
86299109
KB
10612017-09-21 Kevin Buettner <kevinb@redhat.com>
1062
1063 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1064 * linux-low.h (thread_db_notice_clone): Declare.
1065 * thread-db.c (thread_db_notice_clone): New function.
1066
f557a88a
PA
10672017-09-21 Pedro Alves <palves@redhat.com>
1068
1069 * server.c (gdb_read_memory, handle_status, process_serial_event)
1070 (handle_serial_event, handle_target_event): Adjust to
1071 set_desired_thread prototype change.
1072 * target.c (set_desired_thread): Remove 'use_general' parameter
1073 and adjust.
1074 * target.h (set_desired_thread): Remove 'use_general' parameter.
1075
223ffa71
TT
10762017-09-20 Tom Tromey <tom@tromey.com>
1077
1078 * target.c (target_terminal::terminal_state): Define.
1079 (target_terminal::init): Rename from target_terminal_init.
1080 (target_terminal::inferior): Rename from
1081 target_terminal_inferior.
1082 (target_terminal::ours): Rename from target_terminal_ours.
1083 (target_terminal::ours_for_output, target_terminal::info): New.
1084
04fd3ba9
SM
10852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1086
1087 * server.c (accumulate_file_name_length): Remove.
1088 (emit_dll_description): Adjust to std::string change.
1089 (handle_qxfer_libraries): Use std::string to hold document.
1090
5e187554
SM
10912017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1094 return type of xml_escape_text.
1095 * server.c (emit_dll_description): Likewise.
1096
1526853e
SM
10972017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1098
1099 * server.c (captured_main): Accept argument for --selftest.
1100 Update run_tests call.
1101 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1102 when registering selftests.
1103
c4dfafab
SDJ
11042017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1105
1106 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1107 instead of "VEC" for "target_desc.reg_defs".
1108 (regcache_cpy): Likewise.
1109 (registers_to_string): Likewise.
1110 (registers_from_string): Likewise.
1111 (find_regno): Likewise.
1112 (supply_regblock): Likewise.
1113 (regcache_raw_read_unsigned): Likewise.
1114 * tdesc.c (init_target_desc): Likewise.
1115 (tdesc_create_reg): Likewise.
1116 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1117 (struct target_desc) <reg_defs>: Convert to "std::vector".
1118 (target_desc): Do not initialize "reg_defs".
1119 (~target_desc): Update code to use "std::vector" instead of "VEC"
1120 for "target_desc.reg_defs".
1121 (operator==): Likewise.
1122
124aceb4
SM
11232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1124
1125 * inferiors.h (thread_to_gdb_id): Remove.
1126 * inferiors.c (thread_to_gdb_id): Remove.
1127 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1128 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1129 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1130 Likewise.
1131 * nto-low.c (nto_fetch_registers, nto_store_registers,
1132 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1133
96cde54f
SM
11342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1135
1136 * inferiors.h (gdb_id_to_thread_id): Remove.
1137 * inferiors.c (gdb_id_to_thread_id): Remove.
1138 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1139 removal. Move pid declaration closer to where it's used.
1140
e8ca139e
SM
11412017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * server.c (handle_detach): New function.
1144 (process_serial_event): Move code out, call handle_detach.
1145
f8a4e119
SM
11462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1147
1148 * server.c (require_running): Rename to ...
1149 (require_running_or_return): ... this ...
1150 (require_running_or_break): ... and this.
1151 (handle_query, process_serial_event): Adjust.
1152
0eb0a407
SM
11532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1154
1155 * linux-low.c (linux_set_resume_request): Remove unused
1156 variables.
1157
785922a5
SM
11582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * server.c (first_thread_of): Remove.
1161 (process_serial_event): Replace usage of first_thread_of with
1162 find_any_thread_of_pid.
1163 * tracepoint.c (same_process_p): Remove.
1164 (gdb_agent_about_to_close): Replace usage of same_process_p with
1165 find_any_thread_of_pid.
1166 * linux-x86-low.c (same_process_callback): Remove.
1167 (x86_arch_setup_process_callback): Replace usage of
1168 same_process_callback with find_any_thread_of_pid.
1169 * thread-db.c (any_thread_of): Remove.
1170 (switch_to_process): Replace usage of any_thread_of with
1171 find_any_thread_of_pid.
1172 * inferiors.c (thread_pid_matches_callback): Remove.
1173 (find_thread_process): Adjust to use find_any_thread_of_pid.
1174
a059f00c
SDJ
11752017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1176
1177 * regcache.c (get_thread_regcache): Guard calls to "memset"
1178 with "!VEC_empty".
1179
cc397f3a
SDJ
11802017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1181
1182 * linux-low.c (handle_extended_wait): Use
1183 "allocate_target_description" instead of "XNEW".
1184 * linux-x86-low.c (initialize_low_arch): Likewise.
1185
22916b07
YQ
11862017-09-05 Yao Qi <yao.qi@linaro.org>
1187
1188 * configure.srv (srv_i386_regobj): Remove.
1189 (srv_amd64_regobj): Remove.
1190 (srv_regobj): Set it to "" for x86 non-linux targets.
1191 * linux-x86-tdesc.c (i386_linux_read_description):
1192 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1193 (init_registers_i386): Remove the declaration.
1194 (tdesc_i386): Remove the declaration.
1195 (lynx_i386_arch_setup): Call i386_create_target_description.
1196 * nto-x86-low.c: Likewise.
1197 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1198 [!__x86_64__]: include arch/i386.h.
1199 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1200
38602d55
YQ
12012017-09-05 Yao Qi <yao.qi@linaro.org>
1202
1203 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1204 i386/amd64-XXX-linux from it.
1205
44b886ff
YQ
12062017-09-05 Yao Qi <yao.qi@linaro.org>
1207
1208 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1209 false.
1210 (ipa_amd64_linux_regobj): Remove.
1211 (ipa_x32_linux_regobj): Remove.
1212
b4570e4b
YQ
12132017-09-05 Yao Qi <yao.qi@linaro.org>
1214
1215 * Makefile.in (arch-amd64.o): New rule.
1216 * configure.srv: Append arch-amd64.o.
1217 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1218 (get_ipa_tdesc): Call amd64_linux_read_description.
1219 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1220 and init_registers_amd64_XXX.
1221 * linux-x86-low.c (x86_linux_read_description): Call
1222 amd64_linux_read_description.
1223 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1224 (initialize_low_arch): Don't call init_registers_x32_XXX and
1225 init_registers_amd64_XXX.
1226 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1227 and tdesc_amd64_XXX.
1228 [__x86_64__] (amd64_tdesc_test): New function.
1229 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1230 and init_registers_amd64_XXX.
1231 * linux-x86-tdesc.c: Include arch/amd64.h.
1232 (xcr0_to_tdesc_idx): New function.
1233 (i386_linux_read_description): New function.
1234 (amd64_get_ipa_tdesc_idx): New function.
1235 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1236 (amd64_get_ipa_tdesc): Declare.
1237
d1f28ea2
YQ
12382017-09-05 Yao Qi <yao.qi@linaro.org>
1239
1240 * configure.srv (srv_i386_linux_xmlfiles): Remove
1241 i386/i386-XXX-linux.xml from it.
1242
25a93583
YQ
12432017-09-05 Yao Qi <yao.qi@linaro.org>
1244
1245 * configure.srv: Set srv_i386_linux_regobj empty if $development
1246 is false.
1247 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1248 initialize_low_tdesc.
1249 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1250 with #if initialize_low_tdesc.
1251 * linux-x86-tdesc-selftest.c: New file.
1252 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1253
5f035c07
YQ
12542017-09-05 Yao Qi <yao.qi@linaro.org>
1255
1256 * Makefile.in (arch-i386.o): New rule.
1257 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1258 (x86_64-*-linux*): Likewise.
1259 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1260 include arch/i386.h.
1261 (i386_linux_read_description): Remove code and call
1262 i386_create_target_description.
1263 * tdesc.c (allocate_target_description): New function.
1264 * tdesc.h (set_tdesc_architecture): Remove declaration.
1265 (set_tdesc_osabi): Likewise.
1266
0abe8a89
YQ
12672017-09-05 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1270 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1271 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1272 .xmltarget.
1273 * server.c (get_features_xml): Call tdesc_get_features_xml.
1274 * tdesc.c (set_tdesc_architecture): New function.
1275 (set_tdesc_osabi): New function.
1276 (tdesc_get_features_xml): New function.
1277 (tdesc_create_feature): Add an argument.
1278 * tdesc.h (struct target_desc) <features>: New field.
1279 <arch, osabi>: New field.
1280 (~target_desc): xfree features, arch, and osabi.
1281 (target_desc::oerator==): Don't compare .xmltarget.
1282 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1283 (set_tdesc_osabi): Likewise.
1284 (tdesc_get_features_xml): Likewise.
1285
0a188386
YQ
12862017-09-05 Yao Qi <yao.qi@linaro.org>
1287
1288 * linux-x86-tdesc.c: Include selftest.h.
1289 (i386_tdesc_test): New function.
1290 (initialize_low_tdesc): Call selftests::register_test.
1291 * tdesc.h: Include regdef.h.
1292 (target_desc): Override operator == and !=.
1293
f49ff000
YQ
12942017-09-05 Yao Qi <yao.qi@linaro.org>
1295
1296 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1297 (ipa_obj): Likewise.
1298 * linux-i386-ipa.c: Include common/x86-xstate.h
1299 (get_ipa_tdesc): Call i386_linux_read_description.
1300 (initialize_low_tracepoint): Don't call init_registers_XXX
1301 functions, call initialize_low_tdesc instead.
1302 * linux-x86-low.c (x86_linux_read_description): Call
1303 i386_linux_read_description.
1304 (initialize_low_arch): Don't call init_registers_i386_XXX
1305 functions, call initialize_low_tdesc.
1306 * linux-x86-tdesc.c: New file.
1307 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1308 (i386_get_ipa_tdesc_idx): Declare.
1309 (i386_get_ipa_tdesc): Declare.
1310 (initialize_low_tdesc): Declare.
1311
2b68ef2f
YQ
13122017-09-05 Yao Qi <yao.qi@linaro.org>
1313
1314 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1315 instead of 0.
1316
f7000548
YQ
13172017-09-05 Yao Qi <yao.qi@linaro.org>
1318
1319 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1320 * regcache.c (get_thread_regcache): Use VEC_length.
1321 (init_register_cache): Likewise.
1322 (regcache_cpy): Likewise.
1323 (registers_to_string): Iterate reg_defs via VEC_iterate.
1324 (find_regno): Likewise.
1325 (find_register_by_number): Use VEC_index.
1326 (register_size): Call find_register_by_number.
1327 (register_data): Call find_register_by_number.
1328 (supply_regblock): Use VEC_length.
1329 (regcache_raw_read_unsigned): Likewise.
1330 * tdesc.c (init_target_desc): Iterate reg_defs via
1331 VEC_iterate.
1332 (default_description): Update initializer.
1333 (copy_target_description): Don't update field num_registers.
1334 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1335 <num_registers>: Remove.
1336
50a421ac
SM
13372017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1338
1339 * Makefile.in (.SECONDARY): Define target.
1340
23fdd69e
SM
13412017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * linux-low.c (linux_wait_1): Adjust.
1344 * server.c (queue_stop_reply_callback): Adjust.
1345
0a2dde4a
SDJ
13462017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1347
1348 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1349 QEnvironmentUnset and QEnvironmentReset packets.
1350 (handle_query): Inform remote that QEnvironmentHexEncoded,
1351 QEnvironmentUnset and QEnvironmentReset are supported.
1352
6afd337d
SM
13532017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * inferiors.h (inferior_target_data): Rename to ...
1356 (thread_target_data): ... this.
1357 (inferior_regcache_data): Rename to ...
1358 (thread_regcache_data): ... this.
1359 (set_inferior_regcache_data): Rename to ...
1360 (set_thread_regcache_data): ... this.
1361 * inferiors.c (inferior_target_data): Rename to ...
1362 (thread_target_data): ... this.
1363 (inferior_regcache_data): Rename to ...
1364 (thread_regcache_data): ... this.
1365 (set_inferior_regcache_data): Rename to ...
1366 (set_thread_regcache_data): ... this.
1367 (free_one_thread): Update.
1368 * linux-low.h (get_thread_lwp): Update.
1369 * regcache.c (get_thread_regcache): Update.
1370 (regcache_invalidate_thread): Update.
1371 (free_register_cache_thread): Update.
1372 * win32-i386-low.c (update_debug_registers_callback): Update.
1373 (win32_get_current_dr): Update.
1374 * win32-low.c (thread_rec): Update.
1375 (delete_thread_info): Update.
1376 (continue_one_thread): Update.
1377 (suspend_one_thread): Update.
1378
a160cc46
SM
13792017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * inferiors.c (set_inferior_target_data): Remove.
1382 * inferiors.h (set_inferior_target_data): Remove.
1383
6d580b63
YQ
13842017-08-18 Yao Qi <yao.qi@linaro.org>
1385
1386 * Makefile.in (OBS): Add selftest.o.
1387 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1388 * configure, config.in: Re-generated.
1389 * server.c: Include common/sefltest.h.
1390 (captured_main): Handle option --selftest.
1391
f5a29eb0
YQ
13922017-08-09 Yao Qi <yao.qi@linaro.org>
1393
1394 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1395 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1396 i386-avx-mpx.o and i386-mmx.o.
1397 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1398 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1399 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1400 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1401 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1402 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1403 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1404 i386/amd64-avx-mpx.xml.
1405
57757c2f
YQ
14062017-08-09 Yao Qi <yao.qi@linaro.org>
1407
1408 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1409 and x32-avx-avx512.o.
1410 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1411 i386/x32-avx-avx512.xml.
1412
229d26fc
SM
14132017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1414
1415 * tracepoint.h (enum class fast_tpoint_collect_result): New
1416 enumeration.
1417 (fast_tracepoint_collecting): Change return type to
1418 fast_tpoint_collect_result.
1419 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1420 * linux-low.h: Include tracepoint.h.
1421 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1422 fast_tpoint_collect_result.
1423 * linux-low.c (handle_tracepoints): Adjust.
1424 (linux_fast_tracepoint_collecting): Change return type to
1425 fast_tpoint_collect_result.
1426 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1427 linux_wait_1, stuck_in_jump_pad_callback,
1428 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1429 proceed_one_lwp): Adjust to type change.
1430
2e1e43e1
YQ
14312017-07-10 Yao Qi <yao.qi@linaro.org>
1432
1433 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1434
adc764e7
YQ
14352017-06-29 Yao Qi <yao.qi@linaro.org>
1436
1437 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1438 Remove.
1439 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1440
a206891a
SM
14412017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1442
1443 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1444
9a6c7d9c
SDJ
14452017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1446
1447 * linux-low.c (linux_create_inferior): Adjust code to access the
1448 environment information via 'gdb_environ' class.
1449 * lynx-low.c (lynx_create_inferior): Likewise.
1450 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1451 (get_environ): Return a pointer to 'our_environ'.
1452 (captured_main): Initialize 'our_environ'.
1453 * server.h (get_environ): Adjust prototype.
1454 * spu-low.c (spu_create_inferior): Adjust code to access the
1455 environment information via 'gdb_environ' class.
1456
ae3e2ccf
SM
14572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1458
1459 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1460 usage of "register" keyword.
1461
3e019bdc
SM
14622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1463
1464 * configure: Re-generate.
1465
8465943a
SM
14662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * configure: Re-generate.
1469
cf0dd6f0
SM
14702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1471
1472 * Makefile.in (COMPILE.pre): Add "-x c++".
1473
9845682b
SDJ
14742017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1475
1476 * fork-child.c: Conditionally include <signal.h>.
1477
aefd8b33
SDJ
14782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1479
1480 * server.c (handle_general_set): Handle new packet
1481 "QStartupWithShell".
1482 (handle_query): Add "QStartupWithShell" to the list of supported
1483 packets.
1484 (gdbserver_usage): Add help text explaining the
1485 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1486 options.
1487 (captured_main): Recognize and act upon the presence of the new
1488 CLI options.
1489
2090129c
SDJ
14902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1491 Pedro Alves <palves@redhat.com>
1492
1493 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1494 * configure: Regenerate.
1495 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1496 "fork-inferior.o".
1497 (i[34567]86-*-lynxos*): Likewise.
1498 (spu*-*-*): Likewise.
1499 * fork-child.c: New file.
1500 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1501 and "environ.h".
1502 (linux_ptrace_fun): New function.
1503 (linux_create_inferior): Adjust function prototype to reflect
1504 change on "target.h". Adjust function code to use
1505 "fork_inferior".
1506 (linux_request_interrupt): Delete "signal_pid".
1507 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1508 (lynx_ptrace_fun): New function.
1509 (lynx_create_inferior): Adjust function prototype to reflect
1510 change on "target.h". Adjust function code to use
1511 "fork_inferior".
1512 * nto-low.c (nto_create_inferior): Adjust function prototype and
1513 code to reflect change on "target.h". Update comments.
1514 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1515 "common-terminal.h" and "environ.h".
1516 (terminal_fd): Moved to fork-child.c.
1517 (old_foreground_pgrp): Likewise.
1518 (restore_old_foreground_pgrp): Likewise.
1519 (last_status): Make it global.
1520 (last_ptid): Likewise.
1521 (our_environ): New variable.
1522 (startup_with_shell): Likewise.
1523 (program_name): Likewise.
1524 (program_argv): Rename to...
1525 (program_args): ...this.
1526 (wrapper_argv): New variable.
1527 (start_inferior): Delete function.
1528 (get_exec_wrapper): New function.
1529 (get_exec_file): Likewise.
1530 (get_environ): Likewise.
1531 (prefork_hook): Likewise.
1532 (post_fork_inferior): Likewise.
1533 (postfork_hook): Likewise.
1534 (postfork_child_hook): Likewise.
1535 (handle_v_run): Update code to deal with arguments coming from the
1536 remote host. Update calls from "start_inferior" to
1537 "create_inferior".
1538 (captured_main): Likewise. Initialize environment variable. Call
1539 "have_job_control".
1540 * server.h (post_fork_inferior): New prototype.
1541 (get_environ): Likewise.
1542 (last_status): Declare.
1543 (last_ptid): Likewise.
1544 (signal_pid): Likewise.
1545 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1546 (spu_ptrace_fun): New function.
1547 (spu_create_inferior): Adjust function prototype to reflect change
1548 on "target.h". Adjust function code to use "fork_inferior".
1549 * target.c (target_terminal_init): New function.
1550 (target_terminal_inferior): Likewise.
1551 (target_terminal_ours): Likewise.
1552 * target.h: Include <vector>.
1553 (struct target_ops) <create_inferior>: Update prototype.
1554 (create_inferior): Update macro.
1555 * utils.c (gdb_flush_out_err): New function.
1556 * win32-low.c (win32_create_inferior): Adjust function prototype
1557 and code to reflect change on "target.h".
1558
043a4934
SDJ
15592017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1560
1561 * inferiors.c (switch_to_thread): New function.
1562
15652511
SDJ
15632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1564
1565 * Makefile.in (SFILE): Add "common/job-control.c".
1566 (OBS): Add "job-control.o".
1567
21ea5acd
SDJ
15682017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1569
1570 * Makefile: Remove "@host_makefile_frag@".
1571
e13cb306
PA
15722017-05-05 Pedro Alves <palves@redhat.com>
1573
1574 * configure: Regenerate.
1575
c94fee56
SDJ
15762017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1577
1578 * configure: Regenerate.
1579
a0ff9e1a
SM
15802017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1581
1582 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1583 software_single_step change of return type to
1584 std::vector<CORE_ADDR>.
1585 * linux-low.c (install_software_single_step_breakpoints):
1586 Likewise.
1587 * linux-low.h (install_software_single_step_breakpoints):
1588 Likewise.
1589
be628ab8
SDJ
15902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1591
1592 * remote-utils.c: Include "gdb_termios.h" instead of
1593 "terminal.h".
1594 * terminal.h: Delete file.
1595
7c5ded6a
SDJ
15962017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1597
1598 * server.c: Include <vector>.
1599 <program_argv, wrapper_argv>: Convert to std::vector.
1600 (start_inferior): Rewrite function to use C++.
1601 (handle_v_run): Likewise. Update code that calculates the argv
1602 based on the vRun packet; use C++.
1603 (captured_main): Likewise.
1604
436252de
SM
16052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1606
1607 * server.c (handle_v_cont): Initialize thread_resume::thread
1608 with null_ptid.
1609
9bf2a700
PA
16102017-04-05 Pedro Alves <palves@redhat.com>
1611
1612 * configure: Regenerate.
1613
a121b7c1
PA
16142017-04-05 Pedro Alves <palves@redhat.com>
1615
1616 * gdbreplay.c (sync_error): Constify.
1617 * linux-x86-low.c (push_opcode): Constify.
1618
21c8a587
PA
16192017-04-05 Pedro Alves <palves@redhat.com>
1620
1621 * win32-low.c (get_child_debug_event)
1622 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1623 Report TARGET_WAITKIND_SPURIOUS instead.
1624
fb32b4f7
PA
16252017-04-05 Pedro Alves <palves@redhat.com>
1626
1627 * remote-utils.c (remote_prepare, remote_open): Constify.
1628 * remote-utils.h (remote_prepare, remote_open): Constify.
1629 * server.c (captured_main): Constify 'port' handling.
1630
65dd1e59
SM
16312017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * Makefile.in (clean): Clear .deps.
1634
8fa5b777
SM
16352017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1636
1637 * .gitignore: Remove generated files, replace with wildcard.
1638 * (clean): Replace removal of generated files with wildcard.
1639 (version.c): Replace with...
1640 (version-generated.c): ...this.
1641 (xml-builtin.c): Replace with...
1642 (xml-builtin-generated.c): ...this.
1643 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1644 (%.c: *regformats*): Replace with...
1645 (%-generated.c: *regformats*): ...this.
1646
a12e714b
MF
16472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1648
1649 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1650 (xtensa_fill_gregset): Call collect_register_by_name for
1651 threadptr register.
1652 (xtensa_store_gregset): Call supply_register_by_name for
1653 threadptr register.
1654
1a09b50a
MF
16552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1656
1657 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1658 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1659 (xtensa_store_gregset): Call supply_register for all registers in
1660 a0_regnum..a0_regnum + C0_NREGS range.
1661
1a01e7c6
SM
16622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1665 (ax-ipa.o: ax.c): Remove.
1666 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1667 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1668 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1669 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1670 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1671
36bc18a8
SM
16722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1675 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1676 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1677 (errors-ipa.o: ../common/errors.c): Remove.
1678 (format-ipa.o: ../common/format.c): Remove.
1679 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1680
a8ebe3d5
SM
16812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1682
1683 * Makefile.in (%-ipa.o: %.c): New rule.
1684 (tracepoint-ipa.o: tracepoint.c): Remove.
1685 (utils-ipa.o: utils.c): Remove.
1686 (remote-utils-ipa.o: remote-utils.c): Remove.
1687 (regcache-ipa.o: regcache.c): Remove.
1688 (i386-linux-ipa.o: i386-linux.c): Remove.
1689 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1690 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1691 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1692 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1693 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1694 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1695 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1696 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1697 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1698 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1699 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1700 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1701 (aarch64-ipa.o: aarch64.c): Remove.
1702 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1703 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1704 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1705 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1706 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1707 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1708 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1709 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1710 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1711 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1712 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1713 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1714 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1715 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1716 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1717 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1718 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1719 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1720 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1721 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1722 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1723 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1724 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1725 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1726 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1727 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1728 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1729 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1730 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1731 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1732 (tdesc-ipa.o: tdesc.c): Remove.
1733 (x32-linux-ipa.o: x32-linux.c): Remove.
1734 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1735 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1736
50cfacb7
SM
17372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1738
1739 * Makefile.in (%.o: ../arch/%.c): New rule.
1740 (arm.o: ../arch/arm.c): Remove.
1741 (arm-linux.o: ../arch/arm-linux.c): Remove.
1742 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1743 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1744
c5a22423
SM
17452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1746
1747 * Makefile.in (%.o: ../nat/%.c): New rule.
1748 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1749 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1750 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1751 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1752 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1753 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1754 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1755 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1756 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1757 (linux-personality.o: ../nat/linux-personality.c): Remove.
1758 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1759 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1760 (x86-linux.o: ../nat/x86-linux.c): Remove.
1761 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1762 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1763
6bda016b
SM
17642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * Makefile.in (%.o: ../common/%.c): New rule.
1767 (signals.o: ../common/signals.c): Remove.
1768 (print-utils.o: ../common/print-utils.c): Remove.
1769 (rsp-low.o: ../common/rsp-low.c): Remove.
1770 (common-utils.o: ../common/common-utils.c): Remove.
1771 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1772 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1773 (vec.o: ../common/vec.c): Remove.
1774 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1775 (xml-utils.o: ../common/xml-utils.c): Remove.
1776 (ptid.o: ../common/ptid.c): Remove.
1777 (buffer.o: ../common/buffer.c): Remove.
1778 (format.o: ../common/format.c): Remove.
1779 (filestuff.o: ../common/filestuff.c): Remove.
1780 (agent.o: ../common/agent.c): Remove.
1781 (errors.o: ../common/errors.c): Remove.
1782 (environ.o: ../common/environ.c): Remove.
1783 (common-debug.o: ../common/common-debug.c): Remove.
1784 (cleanups.o: ../common/cleanups.c): Remove.
1785 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1786 (fileio.o: ../common/fileio.c): Remove.
1787 (common-regcache.o: ../common/common-regcache.c): Remove.
1788 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1789 (new-op.o: ../common/new-op.c): Remove.
1790 (btrace-common.o: ../common/btrace-common.c): Remove.
1791
21122961
SM
17922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * Makefile.in (%.o: ../target/%.c): New rule.
1795 (waitstatus.o: ../target/waitstatus.c): Remove.
1796
c362e621
SM
17972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1798
1799 * Makefile.in
1800 (%.c: ../regformats/%.dat,
1801 (%.c: ../regformats/arm/%.dat,
1802 (%.c: ../regformats/i386/%.dat,
1803 (%.c: ../regformats/rs6000/%.dat): New rules.
1804 (aarch64.c): Remove.
1805 (reg-arm.c): Remove.
1806 (arm-with-iwmmxt.c): Remove.
1807 (arm-with-vfpv2.c): Remove.
1808 (arm-with-vfpv3.c): Remove.
1809 (arm-with-neon.c): Remove.
1810 (reg-bfin.c): Remove.
1811 (reg-cris.c): Remove.
1812 (reg-crisv32.c): Remove.
1813 (i386.c): Remove.
1814 (i386-linux.c): Remove.
1815 (i386-avx.c): Remove.
1816 (i386-avx-linux.c): Remove.
1817 (i386-avx-avx512.c): Remove.
1818 (i386-avx-avx512-linux.c): Remove.
1819 (i386-mpx.c): Remove.
1820 (i386-mpx-linux.c): Remove.
1821 (i386-avx-mpx-avx512-pku.c): Remove.
1822 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1823 (i386-avx-mpx.c): Remove.
1824 (i386-avx-mpx-linux.c): Remove.
1825 (i386-mmx.c): Remove.
1826 (i386-mmx-linux.c): Remove.
1827 (reg-ia64.c): Remove.
1828 (reg-m32r.c): Remove.
1829 (reg-m68k.c): Remove.
1830 (reg-cf.c): Remove.
1831 (mips-linux.c): Remove.
1832 (mips-dsp-linux.c): Remove.
1833 (mips64-linux.c): Remove.
1834 (mips64-dsp-linux.c): Remove.
1835 (nios2-linux.c): Remove.
1836 (powerpc-32.c): Remove.
1837 (powerpc-32l.c): Remove.
1838 (powerpc-altivec32l.c): Remove.
1839 (powerpc-cell32l.c): Remove.
1840 (powerpc-vsx32l.c): Remove.
1841 (powerpc-isa205-32l.c): Remove.
1842 (powerpc-isa205-altivec32l.c): Remove.
1843 (powerpc-isa205-vsx32l.c): Remove.
1844 (powerpc-e500l.c): Remove.
1845 (powerpc-64l.c): Remove.
1846 (powerpc-altivec64l.c): Remove.
1847 (powerpc-cell64l.c): Remove.
1848 (powerpc-vsx64l.c): Remove.
1849 (powerpc-isa205-64l.c): Remove.
1850 (powerpc-isa205-altivec64l.c): Remove.
1851 (powerpc-isa205-vsx64l.c): Remove.
1852 (s390-linux32.c): Remove.
1853 (s390-linux32v1.c): Remove.
1854 (s390-linux32v2.c): Remove.
1855 (s390-linux64.c): Remove.
1856 (s390-linux64v1.c): Remove.
1857 (s390-linux64v2.c): Remove.
1858 (s390-te-linux64.c): Remove.
1859 (s390-vx-linux64.c): Remove.
1860 (s390-tevx-linux64.c): Remove.
1861 (s390x-linux64.c): Remove.
1862 (s390x-linux64v1.c): Remove.
1863 (s390x-linux64v2.c): Remove.
1864 (s390x-te-linux64.c): Remove.
1865 (s390x-vx-linux64.c): Remove.
1866 (s390x-tevx-linux64.c): Remove.
1867 (tic6x-c64xp-linux.c): Remove.
1868 (tic6x-c64x-linux.c): Remove.
1869 (tic6x-c62x-linux.c): Remove.
1870 (reg-sh.c): Remove.
1871 (reg-sparc64.c): Remove.
1872 (reg-spu.c): Remove.
1873 (amd64.c): Remove.
1874 (amd64-linux.c): Remove.
1875 (amd64-avx.c): Remove.
1876 (amd64-avx-linux.c): Remove.
1877 (amd64-avx-avx512.c): Remove.
1878 (amd64-avx-avx512-linux.c): Remove.
1879 (amd64-mpx.c): Remove.
1880 (amd64-mpx-linux.c): Remove.
1881 (amd64-avx-mpx-avx512-pku.c): Remove.
1882 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1883 (amd64-avx-mpx.c): Remove.
1884 (amd64-avx-mpx-linux.c): Remove.
1885 (x32.c): Remove.
1886 (x32-linux.c): Remove.
1887 (x32-avx.c): Remove.
1888 (x32-avx-linux.c): Remove.
1889 (x32-avx-avx512.c): Remove.
1890 (x32-avx-avx512-linux.c): Remove.
1891 (reg-xtensa.c): Remove.
1892 (reg-tilegx.c): Remove.
1893 (reg-tilegx32.c): Remove.
1894
1672e0d9
SDJ
18952017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1896
1897 * Makefile.in (SFILES): Add "common/environ.c".
1898 (OBJS): Add "common/environ.h".
1899
239b6d10
WT
19002017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1901
1902 * configure.ac: Check if the fs_base and gs_base members of
1903 `struct user_regs_struct' exist.
1904 * config.in: Regenerated.
1905 * configure: Likewise.
1906
694b382c
AT
19072017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1908
1909 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1910 target_read_memory.
1911 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1912 (get_next_pcs_syscall_next_pc): Likewise.
1913
7dc53023
LM
19142016-12-23 Luis Machado <lgustavo@codesourcery.com>
1915
1916 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1917 * nto-x86-low.c: Likewise.
1918
ad02e4fe
SM
19192016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1920
1921 * Makefile.in: Include disable-implicit-rules.mk.
1922
dcb07cfa
PA
19232016-11-23 Pedro Alves <palves@redhat.com>
1924
1925 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1926 (debug_vprintf): Use std::chrono::steady_clock instead of
1927 gettimeofday. Use '.' instead of ':'.
1928 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1929 (get_timestamp): Use std::chrono::steady_clock instead of
1930 gettimeofday.
1931
8629c02c
SM
19322016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1933
1934 * Makefile.in: Fix whitespace formatting.
1935
b593ecca
SM
19362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 * Makefile.in (SFILES, OBS): Flatten list and order
1939 alphabetically.
1940
9986ba08
PA
19412016-11-23 Pedro Alves <palves@redhat.com>
1942
1943 * event-loop.c (handle_file_event): Use warning.
1944 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1945 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1946 Use warning.
1947
4eefa7bc
PA
19482016-11-23 Pedro Alves <palves@redhat.com>
1949
1950 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1951 output.
1952 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1953 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1954 debug_printf and debug_flush for debug output.
1955 * server.c (handle_general_set): Likewise.
1956 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1957 output.
1958
5443506e
SM
19592016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1960
1961 * Makefile.in (.c.o): Replace rule with ...
1962 (%.o: %.c): ... this one.
1963
3b165252
SM
19642016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1965
1966 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1967 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1968 make.
1969 * configure.ac: Remove checks for the make program.
1970 * configure: Re-generate.
1971
0bcda685
PA
19722016-10-28 Pedro Alves <palves@redhat.com>
1973
1974 * Makefile.in (CXX_DIALECT): Get from configure.
1975 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1976 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1977 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1978 * config.in: Regenerate.
1979 * configure: Regenerate.
1980
c3805894
YQ
19812016-10-27 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-low.c (linux_supports_range_stepping): Return true if
1984 can_software_single_step return true.
1985
89342618
YQ
19862016-10-27 Yao Qi <yao.qi@linaro.org>
1987
1988 * inferiors.c (find_inferior_in_random): New function.
1989 * inferiors.h (find_inferior_in_random): Declare.
1990 * linux-low.c (linux_wait_for_event_filtered): Call
1991 find_inferior_in_random instead of find_inferior.
1992
e3652c84
YQ
19932016-10-27 Yao Qi <yao.qi@linaro.org>
1994
1995 * linux-low.c (linux_wait_1): If single-step breakpoints are
1996 inserted, remove them.
1997
5a04c4cf
PA
19982016-10-26 Pedro Alves <palves@redhat.com>
1999
2000 * linux-low.c (handle_extended_wait): Link parent/child fork
2001 threads.
2002 (linux_wait_1): Unlink them.
2003 (linux_set_resume_request): Ignore resume requests for
2004 already-resumed and unhandled fork child threads.
2005 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2006 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2007 New functions.
2008 (handle_v_requests) <vCont>: Don't call require_running.
2009 * server.h (in_queued_stop_replies): New declaration.
2010
cb93dc7f
YQ
20112016-10-24 Yao Qi <yao.qi@linaro.org>
2012
2013 PR server/20733
2014 * linux-aarch64-low.c (append_insns): Cast the return value to
2015 'uint32_t *'.
2016
a1078bea
YQ
20172016-10-10 Yao Qi <yao.qi@linaro.org>
2018
2019 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2020
1fb77080
SDJ
20212016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2022
2023 * target.c (target_supports_multi_process): New function, moved
2024 from...
2025 * target.h (target_supports_multi_process): ... here. Remove
2026 macro.
2027
39b5a3b9
TT
20282016-10-05 Tom Tromey <tom@tromey.com>
2029
2030 PR remote/20655:
2031 * tracepoint.c (handle_tracepoint_bkpts): Check
2032 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2033
c1d0b70a
YQ
20342016-10-05 Yao Qi <yao.qi@linaro.org>
2035
2036 * configure.srv: Update the path of arm-*.xml files.
2037
0a69eedb
YQ
20382016-10-05 Terry Guo <terry.guo@arm.com>
2039 Yao Qi <yao.qi@linaro.org>
2040
2041 * Makefile.in: Adjust the path of rules.
2042 * configure.srv: Update the path of xml files.
2043 * regformats/arm-with-iwmmxt.dat: Regenerated.
2044 * regformats/arm-with-neon.dat: Likewise.
2045 * regformats/arm-with-vfpv2.dat: Likewise.
2046 * regformats/arm-with-vfpv3.dat Likewise.
2047
17e16485
YQ
20482016-09-30 Yao Qi <yao.qi@linaro.org>
2049
2050 PR gdbserver/20627
2051 * target.c (target_stop_and_wait): Don't call
2052 target_continue_no_signal, use resume_stop instead.
2053
edeeb602
YQ
20542016-09-26 Yao Qi <yao.qi@linaro.org>
2055
2056 * linux-low.c (linux_wait_1): Call debug_exit.
2057
503b1c39
PA
20582016-09-23 Pedro Alves <palves@redhat.com>
2059
2060 * Makefile.in (SFILES): Add common/new-op.c.
2061 (OBS): Add common/new-op.o.
2062 (new-op.o): New rule.
2063
74172ecf
SM
20642016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2065
2066 * .gitinore: Ignore more files.
2067
fc6cda2e
YQ
20682016-09-21 Yao Qi <yao.qi@linaro.org>
2069
2070 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2071 23.
2072
bc1e6c81
SDJ
20732016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2074
2075 * server.c (start_inferior): Call target_mourn_inferior instead of
2076 mourn_inferior; pass ptid_t argument to it.
2077 (resume): Likewise.
2078 (handle_target_event): Likewise.
2079 * target.c (target_mourn_inferior): New function.
2080 * target.h (mourn_inferior): Delete macro.
2081
0e00e962
AA
20822016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2083
2084 * linux-low.c (lwp_is_stepping): New function.
2085
1d8cb77d
CL
20862016-09-06 Carl Love <cel@us.ibm.com>
2087
2088 * server.c (start_inferior): Fixed comment, requested comment change
2089 didn't get updated correctly. Removed reference to ptrace () call as
2090 it is only true on Linux systems.
2091
7313bced
CL
20922016-09-06 Carl Love <cel@us.ibm.com>
2093
2094 * server.c (start_inferior): Do not call
2095 function target_post_create_inferior () if the
2096 inferior process has already exited.
2097
cf6de44d
PA
20982016-09-05 Pedro Alves <palves@redhat.com>
2099
2100 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2101 (COMPILE.pre, CC_LD): Use CXX directly.
2102 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2103 * acinclude.m4: Don't include build-with-cxx.m4.
2104 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2105 * configure: Regenerate.
2106
c1da6748
AT
21072016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2108
2109 PR gdb/19495
2110 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2111 call writing data to own_buf.
2112
f2b9e3df
SDJ
21132016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2114
2115 * target.c (mywait): Call target_wait instead of
2116 the_target->wait.
2117 (target_wait): New function.
2118
049a8570
SDJ
21192016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2120
2121 * server.c (start_inferior): New variable 'ptid'. Replace calls
2122 to the_target->resume by target_continue{,_no_signal}, depending
2123 on the case.
2124 * target.c (target_stop_and_wait): Call target_continue_no_signal
2125 instead of the_target->resume.
2126 (target_continue): New function.
2127
3aa5cfa0
AT
21282016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2129
2130 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2131
754653a7
AZ
21322016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2133
2134 PR server/20491
2135 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2136 ps_prochandle.
2137 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2138 * linux-arm-low.c (ps_get_thread_area): Likewise.
2139 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2140 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2141 * linux-mips-low.c (ps_get_thread_area): Likewise.
2142 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2143 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2144 * linux-x86-low.c (ps_get_thread_area): Likewise.
2145 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2146
ed036b40
PA
21472016-08-19 Pedro Alves <palves@redhat.com>
2148
2149 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2150
c8ef42ee
PA
21512016-08-19 Pedro Alves <palves@redhat.com>
2152
2153 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2154 comment. Use memcpy instead of casting through unsigned long.
2155
9c235a72
PA
21562016-08-19 Pedro Alves <palves@redhat.com>
2157
2158 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2159 allocating around 0x80000000.
2160
201506da
PA
21612016-08-19 Pedro Alves <palves@redhat.com>
2162
2163 PR gdb/20415
2164 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2165 (x32-avx512-linux-ipa.o): New rules.
2166 * configure.ac (x86_64-*-linux*): New x32 check.
2167 * configure.srv (ipa_x32_linux_regobj): New.
2168 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2169 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2170 descriptions.
2171 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2172 descriptions.
2173 * configure: Regenerate.
2174
f348d89a
PA
21752016-08-09 Pedro Alves <palves@redhat.com>
2176
2177 PR gdb/18653
2178 * Makefile.in (OBS): Add signals-state-save-restore.o.
2179 (signals-state-save-restore.o): New rule.
2180 * config.in: Regenerate.
2181 * configure: Regenerate.
2182 * linux-low.c: Include "signals-state-save-restore.h".
2183 (linux_create_inferior): Call
2184 restore_original_signals_state.
2185 * server.c: Include "dispositions-save-restore.h".
2186 (captured_main): Call save_original_signals_state.
2187
1baf5149
PA
21882016-08-05 Pedro Alves <palves@redhat.com>
2189
2190 * configure: Regenerate.
2191
fcd4a73d
YQ
21922016-08-04 Yao Qi <yao.qi@linaro.org>
2193
2194 * linux-low.c (regsets_fetch_inferior_registers): Check
2195 errno is ESRCH or not.
2196
979659d0
YQ
21972016-08-02 Yao Qi <yao.qi@linaro.org>
2198
2199 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2200 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2201 (thread_db_load_search): Update.
2202 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2203 td_ta_set_event and td_ta_event_getmsg.
2204
6598661d
PA
22052016-07-26 Pedro Alves <palves@redhat.com>
2206
2207 PR server/20414
2208 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2209 of unsigned long for 64-bit registers and use uint32_t instead of
2210 unsigned int for 32-bit registers.
2211
9cf12d57
PA
22122016-07-26 Pedro Alves <palves@redhat.com>
2213
2214 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2215 to 'ptrace'.
2216
305450ed
TT
22172016-07-21 Tom Tromey <tom@tromey.com>
2218
2219 * configure: Rebuild.
2220
2583da7c
YQ
22212016-07-21 Yao Qi <yao.qi@linaro.org>
2222
2223 * mem-break.c (find_gdb_breakpoint): Cast bp to
2224 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2225
21536b36
YQ
22262016-07-21 Yao Qi <yao.qi@linaro.org>
2227
2228 * server.c (handle_v_requests): Support s and S actions
2229 if target_supports_software_single_step return true.
2230
8901d193
YQ
22312016-07-21 Yao Qi <yao.qi@linaro.org>
2232
2233 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2234 is resume_step, call maybe_hw_step.
2235 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2236 and unstop them.
2237 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2238 breakpoints or not.
2239 (proceed_one_lwp): If resume request is resume_step, install
2240 reinsert breakpoints and call maybe_hw_step.
2241
0e9a339e
YQ
22422016-07-21 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-low.c (proceed_one_lwp): Declare.
2245 (linux_resume_one_thread): Remove local variable 'step'.
2246 Lift code enqueue signal. Call proceed_one_lwp instead of
2247 linux_resume_one_lwp.
2248
4281b351
YQ
22492016-07-21 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-low.c (linux_resume_one_thread): Call
2252 enqueue_pending_signal.
2253
984a2c04
YQ
22542016-07-21 Yao Qi <yao.qi@linaro.org>
2255
2256 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2257 * inferiors.c (do_restore_current_thread_cleanup): New function.
2258 (make_cleanup_restore_current_thread): Likewise.
2259 * linux-low.c (install_software_single_step_breakpoints): Call
2260 make_cleanup_restore_current_thread. Switch current_thread to
2261 thread.
2262
bec903c9
YQ
22632016-07-21 Yao Qi <yao.qi@linaro.org>
2264
2265 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2266 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2267 (clone_one_breakpoint): Likewise.
2268 (delete_reinsert_breakpoints): Change parameter to thread.
2269 Callers updated.
2270 (has_reinsert_breakpoints): Likewise.
2271 (uninsert_reinsert_breakpoints): Likewise.
2272 (reinsert_reinsert_breakpoints): Likewise.
2273 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2274 (delete_reinsert_breakpoints): Likewise.
2275 (reinsert_reinsert_breakpoints): Likewise.
2276 (uninsert_reinsert_breakpoints): Likewise.
2277 (has_reinsert_breakpoints): Likewise.
2278
63c40ec7
YQ
22792016-07-21 Yao Qi <yao.qi@linaro.org>
2280
2281 * inferiors.c (get_thread_process): Make parameter const.
2282 * inferiors.h (get_thread_process): Update declaration.
2283 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2284 Add new parameters child_thread and parent_thread. Callers
2285 updated.
2286 * mem-break.h (clone_all_breakpoints): Update declaration.
2287
9aa76cd0
YQ
22882016-07-21 Yao Qi <yao.qi@linaro.org>
2289
2290 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2291 <command_list, handler>: Remove.
2292 (struct gdb_breakpoint): New.
2293 (struct other_breakpoint): New.
2294 (struct reinsert_breakpoint): New.
2295 (is_gdb_breakpoint): New function.
2296 (any_persistent_commands): Update command_list if
2297 is_gdb_breakpoint returns true.
2298 (set_breakpoint): Create breakpoints according to their types.
2299 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2300 (set_gdb_breakpoint_1): Likewise.
2301 (set_gdb_breakpoint): Likewise.
2302 (clear_breakpoint_conditions): Change parameter type to
2303 'struct gdb_breakpoint *'.
2304 (clear_breakpoint_commands): Likewise.
2305 (clear_breakpoint_conditions_and_commands): Likewise.
2306 (add_condition_to_breakpoint): Likewise.
2307 (add_breakpoint_condition): Likewise.
2308 (add_commands_to_breakpoint): Likewise.
2309 (check_breakpoints): Check other_breakpoint.
2310 (clone_one_breakpoint): Clone breakpopint according to its type.
2311 * mem-break.h (struct gdb_breakpoint): Declare.
2312 (set_gdb_breakpoint): Update declaration.
2313 (clear_breakpoint_conditions_and_commands): Likewise.
2314 (add_breakpoint_condition): Likewise.
2315 (add_breakpoint_commands): Likewise.
2316 * server.c (process_point_options): Change parameter type to
2317 'struct gdb_breakpoint *'.
2318
811f8301
YQ
23192016-07-21 Yao Qi <yao.qi@linaro.org>
2320
2321 * mem-break.c (set_breakpoint_at): Rename it to ...
2322 (set_breakpoint_type_at): ... it.
2323 (set_breakpoint_at): Call set_breakpoint_type_at.
2324 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2325 * mem-break.h (set_breakpoint_at): Update comments.
2326
b1c51e36
CLT
23272016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2328
2329 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2330 to buf parameter.
2331 (nios2_store_gregset): Likewise.
2332
ced2dffb
PA
23332016-07-01 Pedro Alves <palves@redhat.com>
2334 Antoine Tremblay <antoine.tremblay@ericsson.com>
2335
2336 * linux-low.c: Change interface to take the target lwp_info
2337 pointer directly and return void. Handle detaching from a zombie
2338 thread.
2339 (linux_detach_lwp_callback): New function.
2340 (linux_detach): Detach from the leader thread after detaching from
2341 the clone threads.
2342
2ac09a5b
YQ
23432016-06-28 Yao Qi <yao.qi@linaro.org>
2344
2345 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2346 for variable new_offset.
2347 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2348 (aarch64_ftrace_insn_reloc_cb): Likewise.
2349 (aarch64_ftrace_insn_reloc_tb): Likewise.
2350 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2351 PRIx64 instead of PRIx32.
2352
79e7fd4f
YQ
23532016-06-28 Yao Qi <yao.qi@linaro.org>
2354
2355 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2356 (the_low_target): Install arm_get_syscall_trapinfo.
2357
061fc021
YQ
23582016-06-28 Yao Qi <yao.qi@linaro.org>
2359
2360 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2361 function.
2362 (the_low_target): Install aarch64_get_syscall_trapinfo.
2363
4cc32bec
YQ
23642016-06-28 Yao Qi <yao.qi@linaro.org>
2365
2366 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2367 Callers updated.
2368 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2369 Remove parameter sysno.
2370 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2371 sysret.
2372
782c1122
AA
23732016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2374
2375 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2376 (s390_emit_ne_goto): Likewise.
2377 (s390_emit_lt_goto): Likewise.
2378 (s390_emit_le_goto): Likewise.
2379 (s390_emit_gt_goto): Likewise.
2380 (s390_emit_ge_goto): Likewise.
2381 (s390x_emit_eq_goto): Likewise.
2382 (s390x_emit_ne_goto): Likewise.
2383 (s390x_emit_lt_goto): Likewise.
2384 (s390x_emit_le_goto): Likewise.
2385 (s390x_emit_gt_goto): Likewise.
2386 (s390x_emit_ge_goto): Likewise.
2387 (s390_emit_ops_impl): Mark variable static.
2388 (s390x_emit_ops): Likewise.
2389
2e7b624b
YQ
23902016-06-17 Yao Qi <yao.qi@linaro.org>
2391
2392 * linux-low.c (handle_extended_wait): Call
2393 uninsert_reinsert_breakpoints for the parent process. Remove
2394 reinsert breakpoints from the child process. Reinsert them to
2395 the parent process when vfork is done.
2396 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2397 (reinsert_reinsert_breakpoints): New function.
2398 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2399 (reinsert_reinsert_breakpoints): Declare.
2400
8a81c5d7
YQ
24012016-06-17 Yao Qi <yao.qi@linaro.org>
2402
2403 * linux-low.c (handle_extended_wait): If the parent is doing
2404 step-over, remove the reinsert breakpoints from the forked child.
2405
f50bf8e5
YQ
24062016-06-17 Yao Qi <yao.qi@linaro.org>
2407
2408 * linux-low.c (unsuspend_all_lwps): Declare.
2409 (linux_low_filter_event): If thread exited, call finish_step_over.
2410 If step-over is finished, unsuspend other threads.
2411
8376a3cb
YQ
24122016-06-17 Yao Qi <yao.qi@linaro.org>
2413
2414 * linux-low.c (linux_resume_one_lwp_throw): Assert
2415 has_reinsert_breakpoints returns false.
2416 * mem-break.c (delete_disabled_breakpoints): Assert
2417 bp type isn't reinsert_breakpoint.
2418
f79b145d
YQ
24192016-06-17 Yao Qi <yao.qi@linaro.org>
2420
2421 * linux-low.c (maybe_hw_step): New function.
2422 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2423 (finish_step_over): Switch current_thread to lwp temporarily,
2424 and assert has_reinsert_breakpoints returns true.
2425 (proceed_one_lwp): Call maybe_hw_step.
2426 * mem-break.c (has_reinsert_breakpoints): New function.
2427 * mem-break.h (has_reinsert_breakpoints): Declare.
2428
0ae534d2
JT
24292016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2430
2431 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2432
fcdad592
YQ
24332016-05-17 Yao Qi <yao.qi@linaro.org>
2434
2435 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2436 instead of find_inferior.
2437
9e784964
YQ
24382016-05-05 Yao Qi <yao.qi@linaro.org>
2439
2440 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2441 Initialize res to zero.
2442
cf2ebb6e
YQ
24432016-05-05 Yao Qi <yao.qi@linaro.org>
2444
2445 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2446 to uint32_t.
2447
c1aebf87
UW
24482016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2449
2450 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2451 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2452 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2453
35fd2deb 24542016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2455 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2456
2457 * tracepoint.c (write_inferior_int8): New function.
2458 (cmd_qtenable_disable): Write enable flag using
2459 write_inferior_int8.
2460
484b3c32
YQ
24612016-04-25 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2464 (need_step_over_p): Return zero if the LWP has pending signals
2465 can be delivered on software single step target.
2466
85ba7d86
YQ
24672016-04-25 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2470 return instead of error.
2471
3539aa13
YQ
24722016-04-22 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2475 to 23.
2476
5b061e98
YQ
24772016-04-22 Yao Qi <yao.qi@linaro.org>
2478
2479 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2480 signal when stepping over breakpoint with software single
2481 step.
2482
3451269c
PA
24832016-04-21 Pedro Alves <palves@redhat.com>
2484
2485 * linux-s390-low.c (s390_collect_ptrace_register)
2486 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2487 add casts.
2488 (s390_check_regset): Use void * instead of gdb_byte *.
2489
a2358508
PA
24902016-04-20 Pedro Alves <palves@redhat.com>
2491
2492 * configure: Renegerate.
2493
6885166d
YQ
24942016-04-20 Yao Qi <yao.qi@linaro.org>
2495
2496 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2497 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2498 number 16.
2499 (arm_store_gregset): Likewise.
2500
2b863f51
WT
25012016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2502
2503 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2504 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2505 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2506 (amd64-avx-mpx-linux.c): New rules.
2507 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2508 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2509 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2510 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2511 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2512 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2513 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2514 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2515 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2516 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2517 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2518 * linux-x86-low.c (x86_linux_read_description): Add case for
2519 X86_XSTATE_AVX_MPX_MASK.
2520 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2521 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2522 init_registers_i386_avx_mpx_linux.
2523 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2524 (initialize_low_tracepoint): Call
2525 init_registers_i386_avx_mpx_linux.
2526 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2527 (initialize_low_tracepoint): Call
2528 init_registers_amd64_avx_mpx_linux.
2529 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2530 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2531 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2532 declarations.
2533
9b30624b
PA
25342016-04-18 Pedro Alves <palves@redhat.com>
2535
2536 * configure: Regenerate.
2537
45e3745e
AT
25382016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2539
2540 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2541 (aarch64_emit_sub): Likewise.
2542
2afc13ff
PA
25432016-04-12 Pedro Alves <palves@redhat.com>
2544
2545 * utils.c (prepare_to_throw_exception): Delete.
2546
6e774b13
SM
25472016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2548
2549 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2550
4dca19f8
MK
25512016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2552
2553 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2554
d0a9981f
MK
25552016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2556
2557 * linux-aarch64-ipa.c: Add <elf.h> include.
2558 * linux-ppc-ipa.c: Add <elf.h> include.
2559 * linux-s390-ipa.c: Add <elf.h> include.
2560
252db07e
MK
25612016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2562
2563 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2564 (get_raw_reg_ptr): Likewise.
2565 (get_trace_state_variable_value_ptr): Likewise.
2566 (set_trace_state_variable_value_ptr): Likewise.
2567 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2568 char *.
2569
14e2b6d9
MK
25702016-03-31 Wei-cheng Wang <cole945@gmail.com>
2571 Marcin Kościelnicki <koriakin@0x04.net>
2572
2573 PR/17221
2574 * linux-ppc-low.c (emit_insns): New function.
2575 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2576 (ppc_emit_prologue): New function.
2577 (ppc_emit_epilogue): New function.
2578 (ppc_emit_add): New function.
2579 (ppc_emit_sub): New function.
2580 (ppc_emit_mul): New function.
2581 (ppc_emit_lsh): New function.
2582 (ppc_emit_rsh_signed): New function.
2583 (ppc_emit_rsh_unsigned): New function.
2584 (ppc_emit_ext): New function.
2585 (ppc_emit_zero_ext): New function.
2586 (ppc_emit_log_not): New function.
2587 (ppc_emit_bit_and): New function.
2588 (ppc_emit_bit_or): New function.
2589 (ppc_emit_bit_xor): New function.
2590 (ppc_emit_bit_not): New function.
2591 (ppc_emit_equal): New function.
2592 (ppc_emit_less_signed): New function.
2593 (ppc_emit_less_unsigned): New function.
2594 (ppc_emit_ref): New function.
2595 (ppc_emit_const): New function.
2596 (ppc_emit_reg): New function.
2597 (ppc_emit_pop): New function.
2598 (ppc_emit_stack_flush): New function.
2599 (ppc_emit_swap): New function.
2600 (ppc_emit_stack_adjust): New function.
2601 (ppc_emit_call): New function.
2602 (ppc_emit_int_call_1): New function.
2603 (ppc_emit_void_call_2): New function.
2604 (ppc_emit_if_goto): New function.
2605 (ppc_emit_goto): New function.
2606 (ppc_emit_eq_goto): New function.
2607 (ppc_emit_ne_goto): New function.
2608 (ppc_emit_lt_goto): New function.
2609 (ppc_emit_le_goto): New function.
2610 (ppc_emit_gt_goto): New function.
2611 (ppc_emit_ge_goto): New function.
2612 (ppc_write_goto_address): New function.
2613 (ppc_emit_ops_impl): New static variable.
2614 (ppc64v1_emit_prologue): New function.
2615 (ppc64v2_emit_prologue): New function.
2616 (ppc64_emit_epilogue): New function.
2617 (ppc64_emit_add): New function.
2618 (ppc64_emit_sub): New function.
2619 (ppc64_emit_mul): New function.
2620 (ppc64_emit_lsh): New function.
2621 (ppc64_emit_rsh_signed): New function.
2622 (ppc64_emit_rsh_unsigned): New function.
2623 (ppc64_emit_ext): New function.
2624 (ppc64_emit_zero_ext): New function.
2625 (ppc64_emit_log_not): New function.
2626 (ppc64_emit_bit_and): New function.
2627 (ppc64_emit_bit_or): New function.
2628 (ppc64_emit_bit_xor): New function.
2629 (ppc64_emit_bit_not): New function.
2630 (ppc64_emit_equal): New function.
2631 (ppc64_emit_less_signed): New function.
2632 (ppc64_emit_less_unsigned): New function.
2633 (ppc64_emit_ref): New function.
2634 (ppc64_emit_const): New function.
2635 (ppc64v1_emit_reg): New function.
2636 (ppc64v2_emit_reg): New function.
2637 (ppc64_emit_pop): New function.
2638 (ppc64_emit_stack_flush): New function.
2639 (ppc64_emit_swap): New function.
2640 (ppc64v1_emit_call): New function.
2641 (ppc64v2_emit_call): New function.
2642 (ppc64v1_emit_int_call_1): New function.
2643 (ppc64v2_emit_int_call_1): New function.
2644 (ppc64v1_emit_void_call_2): New function.
2645 (ppc64v2_emit_void_call_2): New function.
2646 (ppc64_emit_if_goto): New function.
2647 (ppc64_emit_eq_goto): New function.
2648 (ppc64_emit_ne_goto): New function.
2649 (ppc64_emit_lt_goto): New function.
2650 (ppc64_emit_le_goto): New function.
2651 (ppc64_emit_gt_goto): New function.
2652 (ppc64_emit_ge_goto): New function.
2653 (ppc64v1_emit_ops_impl): New static variable.
2654 (ppc64v2_emit_ops_impl): New static variable.
2655 (ppc_emit_ops): New function.
2656 (linux_low_target): Wire in ppc_emit_ops.
2657
a2174ba4
MK
26582016-03-31 Wei-cheng Wang <cole945@gmail.com>
2659 Marcin Kościelnicki <koriakin@0x04.net>
2660
2661 PR/17221
2662 * Makefile.in: Add powerpc-*-ipa.o
2663 * configure.srv: Add ipa_obj for powerpc*-linux.
2664 * linux-ppc-ipa.c: New file.
2665 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2666 includes.
2667 (PPC_FIELD): New macro.
2668 (PPC_SEXT): New macro.
2669 (PPC_OP6): New macro.
2670 (PPC_BO): New macro.
2671 (PPC_LI): New macro.
2672 (PPC_BD): New macro.
2673 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2674 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2675 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2676 (ppc_get_thread_area): New function.
2677 (is_elfv2_inferior): New function.
2678 (gen_ds_form): New function.
2679 (GEN_STD): New macro.
2680 (GEN_STDU): New macro.
2681 (GEN_LD): New macro.
2682 (GEN_LDU): New macro.
2683 (gen_d_form): New function.
2684 (GEN_ADDI): New macro.
2685 (GEN_ADDIS): New macro.
2686 (GEN_LI): New macro.
2687 (GEN_LIS): New macro.
2688 (GEN_ORI): New macro.
2689 (GEN_ORIS): New macro.
2690 (GEN_LWZ): New macro.
2691 (GEN_STW): New macro.
2692 (GEN_STWU): New macro.
2693 (gen_xfx_form): New function.
2694 (GEN_MFSPR): New macro.
2695 (GEN_MTSPR): New macro.
2696 (GEN_MFCR): New macro.
2697 (GEN_MTCR): New macro.
2698 (GEN_SYNC): New macro.
2699 (GEN_LWSYNC): New macro.
2700 (gen_x_form): New function.
2701 (GEN_OR): New macro.
2702 (GEN_MR): New macro.
2703 (GEN_LWARX): New macro.
2704 (GEN_STWCX): New macro.
2705 (GEN_CMPW): New macro.
2706 (gen_md_form): New function.
2707 (GEN_RLDICL): New macro.
2708 (GEN_RLDICR): New macro.
2709 (gen_i_form): New function.
2710 (GEN_B): New macro.
2711 (GEN_BL): New macro.
2712 (gen_b_form): New function.
2713 (GEN_BNE): New macro.
2714 (GEN_LOAD): New macro.
2715 (GEN_STORE): New macro.
2716 (gen_limm): New function.
2717 (gen_atomic_xchg): New function.
2718 (gen_call): New function.
2719 (ppc_relocate_instruction): New function.
2720 (ppc_install_fast_tracepoint_jump_pad): New function.
2721 (ppc_get_min_fast_tracepoint_insn_len): New function.
2722 (ppc_get_ipa_tdesc_idx): New function.
2723 (the_low_target): Wire in the new functions.
2724 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2725 tdescs.
2726 * linux-ppc-tdesc.h: New file.
2727
a13c4696
MK
27282016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2729
2730 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2731 (alloc_jump_pad_buffer): New function.
2732 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2733 (alloc_jump_pad_buffer): New function.
2734 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2735 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2736 (alloc_jump_pad_buffer): New function.
2737 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2738 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2739 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2740 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2741
1cda1512
MK
27422016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2743
2744 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2745 * linux-amd64-ipa.c: Likewise.
2746 * linux-i386-ipa.c: Likewise.
2747 * linux-s390-ipa.c: Likewise.
2748 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2749 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2750 set_trace_state_variable_value_ptr.
2751 (struct ipa_sym_addresses): Likewise.
2752 (symbol_list): Likewise.
2753 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2754 accessing gdb_collect directly.
2755 (gdb_collect_ptr_type): New typedef.
2756 (get_raw_reg_ptr_type): New typedef.
2757 (get_trace_state_variable_value_ptr_type): New typedef.
2758 (set_trace_state_variable_value_ptr_type): New typedef.
2759 (gdb_collect_ptr): New global.
2760 (get_raw_reg_ptr): New global.
2761 (get_trace_state_variable_value_ptr): New global.
2762 (set_trace_state_variable_value_ptr): New global.
2763 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2764 accessing get_raw_reg directly.
2765 (get_get_tsv_func_addr): Likewise for
2766 get_trace_state_variable_value_ptr.
2767 (get_set_tsv_func_addr): Likewise for
2768 set_trace_state_variable_value_ptr.
2769 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2770
72fb5488
SM
27712016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2772
2773 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2774
28170b88
MK
27752016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2776
2777 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2778 packets.
2779 (relocate_instruction): Remove own_buf.
2780 * server.c (own_buf): Make global.
2781 (handle_v_requests): Make global.
2782 * server.h (own_buf): New declaration.
2783 (handle_v_requests): New prototype.
2784
f39e8743
MK
27852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2786
2787 PR 18377
2788 * linux-s390-low.c (add_insns): New function.
2789 (s390_emit_prologue): New function.
2790 (s390_emit_epilogue): New function.
2791 (s390_emit_add): New function.
2792 (s390_emit_sub): New function.
2793 (s390_emit_mul): New function.
2794 (s390_emit_lsh): New function.
2795 (s390_emit_rsh_signed): New function.
2796 (s390_emit_rsh_unsigned): New function.
2797 (s390_emit_ext): New function.
2798 (s390_emit_log_not): New function.
2799 (s390_emit_bit_and): New function.
2800 (s390_emit_bit_or): New function.
2801 (s390_emit_bit_xor): New function.
2802 (s390_emit_bit_not): New function.
2803 (s390_emit_equal): New function.
2804 (s390_emit_less_signed): New function.
2805 (s390_emit_less_unsigned): New function.
2806 (s390_emit_ref): New function.
2807 (s390_emit_if_goto): New function.
2808 (s390_emit_goto): New function.
2809 (s390_write_goto_address): New function.
2810 (s390_emit_litpool): New function.
2811 (s390_emit_const): New function.
2812 (s390_emit_call): New function.
2813 (s390_emit_reg): New function.
2814 (s390_emit_pop): New function.
2815 (s390_emit_stack_flush): New function.
2816 (s390_emit_zero_ext): New function.
2817 (s390_emit_swap): New function.
2818 (s390_emit_stack_adjust): New function.
2819 (s390_emit_set_r2): New function.
2820 (s390_emit_int_call_1): New function.
2821 (s390_emit_void_call_2): New function.
2822 (s390_emit_eq_goto): New function.
2823 (s390_emit_ne_goto): New function.
2824 (s390_emit_lt_goto): New function.
2825 (s390_emit_le_goto): New function.
2826 (s390_emit_gt_goto): New function.
2827 (s390_emit_ge_goto): New function.
2828 (s390x_emit_prologue): New function.
2829 (s390x_emit_epilogue): New function.
2830 (s390x_emit_add): New function.
2831 (s390x_emit_sub): New function.
2832 (s390x_emit_mul): New function.
2833 (s390x_emit_lsh): New function.
2834 (s390x_emit_rsh_signed): New function.
2835 (s390x_emit_rsh_unsigned): New function.
2836 (s390x_emit_ext): New function.
2837 (s390x_emit_log_not): New function.
2838 (s390x_emit_bit_and): New function.
2839 (s390x_emit_bit_or): New function.
2840 (s390x_emit_bit_xor): New function.
2841 (s390x_emit_bit_not): New function.
2842 (s390x_emit_equal): New function.
2843 (s390x_emit_less_signed): New function.
2844 (s390x_emit_less_unsigned): New function.
2845 (s390x_emit_ref): New function.
2846 (s390x_emit_if_goto): New function.
2847 (s390x_emit_const): New function.
2848 (s390x_emit_call): New function.
2849 (s390x_emit_reg): New function.
2850 (s390x_emit_pop): New function.
2851 (s390x_emit_stack_flush): New function.
2852 (s390x_emit_zero_ext): New function.
2853 (s390x_emit_swap): New function.
2854 (s390x_emit_stack_adjust): New function.
2855 (s390x_emit_int_call_1): New function.
2856 (s390x_emit_void_call_2): New function.
2857 (s390x_emit_eq_goto): New function.
2858 (s390x_emit_ne_goto): New function.
2859 (s390x_emit_lt_goto): New function.
2860 (s390x_emit_le_goto): New function.
2861 (s390x_emit_gt_goto): New function.
2862 (s390x_emit_ge_goto): New function.
2863 (s390_emit_ops): New function.
2864 (struct linux_target_ops): Fill in emit_ops hook.
2865
abd9baf9
MK
28662016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2867
2868 PR 18377
2869 * Makefile.in: Add s390 IPA files.
2870 * configure.srv: Build IPA for s390.
2871 * linux-s390-ipa.c: New file.
2872 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2873 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2874 (tdesc_s390_linux32): Likewise.
2875 (init_registers_s390_linux32v1): Likewise.
2876 (tdesc_s390_linux32v1): Likewise.
2877 (init_registers_s390_linux32v2): Likewise.
2878 (tdesc_s390_linux32v2): Likewise.
2879 (init_registers_s390_linux64): Likewise.
2880 (tdesc_s390_linux64): Likewise.
2881 (init_registers_s390_linux64v1): Likewise.
2882 (tdesc_s390_linux64v1): Likewise.
2883 (init_registers_s390_linux64v2): Likewise.
2884 (tdesc_s390_linux64v2): Likewise.
2885 (init_registers_s390_te_linux64): Likewise.
2886 (tdesc_s390_te_linux64): Likewise.
2887 (init_registers_s390_vx_linux64): Likewise.
2888 (tdesc_s390_vx_linux64): Likewise.
2889 (init_registers_s390_tevx_linux64): Likewise.
2890 (tdesc_s390_tevx_linux64): Likewise.
2891 (init_registers_s390x_linux64): Likewise.
2892 (tdesc_s390x_linux64): Likewise.
2893 (init_registers_s390x_linux64v1): Likewise.
2894 (tdesc_s390x_linux64v1): Likewise.
2895 (init_registers_s390x_linux64v2): Likewise.
2896 (tdesc_s390x_linux64v2): Likewise.
2897 (init_registers_s390x_te_linux64): Likewise.
2898 (tdesc_s390x_te_linux64): Likewise.
2899 (init_registers_s390x_vx_linux64): Likewise.
2900 (tdesc_s390x_vx_linux64): Likewise.
2901 (init_registers_s390x_tevx_linux64): Likewise.
2902 (tdesc_s390x_tevx_linux64): Likewise.
2903 (have_hwcap_s390_vx): New static variable.
2904 (s390_arch_setup): Fill have_hwcap_s390_vx.
2905 (s390_get_thread_area): New function.
2906 (s390_ft_entry_gpr_esa): New const.
2907 (s390_ft_entry_gpr_zarch): New const.
2908 (s390_ft_entry_misc): New const.
2909 (s390_ft_entry_fr): New const.
2910 (s390_ft_entry_vr): New const.
2911 (s390_ft_main_31): New const.
2912 (s390_ft_main_64): New const.
2913 (s390_ft_exit_fr): New const.
2914 (s390_ft_exit_vr): New const.
2915 (s390_ft_exit_misc): New const.
2916 (s390_ft_exit_gpr_esa): New const.
2917 (s390_ft_exit_gpr_zarch): New const.
2918 (append_insns): New function.
2919 (s390_relocate_instruction): New function.
2920 (s390_install_fast_tracepoint_jump_pad): New function.
2921 (s390_get_min_fast_tracepoint_insn_len): New function.
2922 (s390_get_ipa_tdesc_idx): New function.
2923 (struct linux_target_ops): Wire in the above functions.
2924 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2925 * linux-s390-tdesc.h: New file.
2926
a4105d04
MK
29272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2928
2929 * linux-s390-low.c (s390_supports_tracepoints): New function.
2930 (struct linux_target_ops): Fill supports_tracepoints hook.
2931
35ac8b3e
YQ
29322016-03-18 Yao Qi <yao.qi@linaro.org>
2933
2934 * linux-low.c (lwp_signal_can_be_delivered): New function.
2935 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2936
94610ec4
YQ
29372016-03-18 Yao Qi <yao.qi@linaro.org>
2938
2939 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2940 0 if signal is enqueued. Remove 'signal' from one debugging
2941 message. Move one debugging message to some lines below.
2942 Remove code setting 'signal' to 0.
2943
80aea927
YQ
29442016-03-18 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-low.c (linux_low_filter_event): Remove redundant
2947 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2948
b04fd3be
MK
29492016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2950
2951 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2952 (struct linux_target_ops): Wire in the above.
2953
c40c8d4b
YQ
29542016-03-03 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-low.c: Update comments to start_step_over.
2957
0f8288ae
YQ
29582016-03-03 Yao Qi <yao.qi@linaro.org>
2959
2960 PR server/19736
2961 * linux-low.c (handle_extended_wait): Set child suspended
2962 if event_lwp->bp_reinsert isn't zero.
2963
fdbd04a8
YQ
29642016-03-02 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2967 enqueue_pending_signal.
2968
6896a8fa
MK
29692016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2970
2971 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2972 is actually loaded.
2973
ab503087
MK
29742016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2975
2976 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2977 (s390_regmap_3264) [!__s390x__]: New global.
2978 (s390_collect_ptrace_register): Skip map entries containing -1.
2979 (s390_supply_ptrace_register): Ditto.
2980 (s390_fill_gprs_high): New function.
2981 (s390_store_gprs_high): New function.
2982 (s390_regsets): Add NT_S390_HIGH_GPRS.
2983 (s390_get_hwcap): Enable on 31-bit.
2984 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2985 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2986 Detect NT_S390_HIGH_GPRS.
2987 (s390_usrregs_info_3264): Enable on 31-bit.
2988 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2989 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2990
ae91f625
MK
29912016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2992
2993 PR gdb/13808
2994 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2995 * configure.srv: Ditto.
2996 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2997 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2998 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2999 (init_registers_amd64_linux): Remove prototype.
3000 (tdesc_amd64_linux): Remove declaration.
3001 (get_ipa_tdesc): New function.
3002 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3003 initialize remaining tdescs.
3004 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3005 (init_registers_i386_linux): Remove prototype.
3006 (tdesc_i386_linux): Remove declaration.
3007 (get_ipa_tdesc): New function.
3008 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3009 initialize remaining tdescs.
3010 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3011 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3012 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3013 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3014 (x86_get_ipa_tdesc_idx): New function.
3015 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3016 * linux-x86-tdesc.h: New file.
3017 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3018 (target_get_ipa_tdesc_idx): New macro.
3019 * tracepoint.c (ipa_tdesc_idx): New macro.
3020 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3021 (symbol_list): Add ipa_tdesc_idx.
3022 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3023 (ipa_tdesc): Remove.
3024 (ipa_tdesc_idx): New variable.
3025 (get_context_regcache): Use get_ipa_tdesc.
3026 (gdb_collect): Ditto.
3027 (gdb_probe): Ditto.
3028 * tracepoint.h (get_ipa_tdesc): New prototype.
3029 (ipa_tdesc): Remove.
3030
e7ad2f14
PA
30312016-02-24 Pedro Alves <palves@redhat.com>
3032
3033 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3034 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3035 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3036 Factor out common code between the USE_SIGTRAP_SIGINFO and
3037 !USE_SIGTRAP_SIGINFO blocks.
3038 (linux_low_filter_event): Call save_stop_reason instead of
3039 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3040 Update comments.
3041 (linux_wait_1): Update comments.
3042
657f9cde
WW
30432016-02-24 Wei-cheng Wang <cole945@gmail.com>
3044
3045 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3046 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3047 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3048 ppc_insert_point, ppc_remove_point.
3049
b00b61e1
MK
30502016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3051
3052 * linux-s390-low.c (s390_supports_z_point_type): New function.
3053 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3054
553cb527
YQ
30552016-02-16 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3058 PC. Get pc from regcache_read_pc.
3059
a5652c21
YQ
30602016-02-12 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3063 or linux_get_pc_32bit.
3064 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3065
ed443b61
YQ
30662016-02-12 Yao Qi <yao.qi@linaro.org>
3067
3068 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3069 arm_linux_get_next_pcs_fixup.
3070
020ecd38
MK
30712016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3072
3073 * tracepoint.c (x_tracepoint_action_download): Change
3074 write_inferior_data_ptr to write_inferior_data_pointer.
3075 (cmd_qtstart): Likewise.
3076 (write_inferior_data_ptr): Remove.
3077 (download_agent_expr): Change write_inferior_data_ptr to
3078 write_inferior_data_pointer.
3079 (download_tracepoint_1): Likewise.
3080 (download_tracepoint): Likewise.
3081 (download_trace_state_variables): Likewise.
3082
7cae9051
WW
30832016-02-11 Wei-cheng Wang <cole945@gmail.com>
3084 Marcin Kościelnicki <koriakin@0x04.net>
3085
3086 * tracepoint.c (struct tracepoint_action_ops): Remove.
3087 (struct tracepoint_action): Remove ops.
3088 (m_tracepoint_action_download, r_tracepoint_action_download)
3089 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3090 size and offset accordingly.
3091 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3092 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3093 (tracepoint_action_send, tracepoint_action_download): New functions.
3094 Helpers for trace action handlers.
3095 (add_tracepoint_action): Remove setup actions ops.
3096 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3097
9f6a71b4
YQ
30982016-02-10 Yao Qi <yao.qi@linaro.org>
3099
3100 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3101
1e94266c
SM
31022016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3103
3104 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3105 to AC_OUTPUT.
3106 * configure: Regenerate.
3107
8adce034
SM
31082016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3109
3110 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3111 void * to gdb_byte *.
3112 * linux-low.c (siginfo_fixup): Likewise.
3113 (linux_xfer_siginfo): Likewise.
3114 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3115 Likewise.
3116 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3117
93813b37
WT
31182016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3119
3120 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3121 to srv_tgtobj.
3122 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3123 to srv_tgtobj.
3124 * linux-x86-low.c [__x86_64__]: Include
3125 "nat/amd64-linux-siginfo.h".
3126 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3127 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3128 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3129 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3130 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3131 (cpt_si_fd, si_timerid, si_overrun): Move from
3132 nat/amd64-linux-siginfo.c.
3133 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3134
8424cc97
SM
31352016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3136
3137 * server.c (skip_to_semicolon): Remove.
3138 (process_point_options): Use strchrnul instead of
3139 skip_to_semicolon.
3140
4d18591b
YQ
31412016-01-26 Yao Qi <yao.qi@linaro.org>
3142
3143 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3144 * linux-low.c (install_software_single_step_breakpoints): Don't
3145 call regcache_read_pc.
3146 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3147 argument pc.
3148
d8020970
YQ
31492016-01-26 Yao Qi <yao.qi@linaro.org>
3150
3151 * linux-low.c (install_software_single_step_breakpoints): Call
3152 regcache_read_pc instead of get_pc.
3153
8b207339
YQ
31542016-01-26 Yao Qi <yao.qi@linaro.org>
3155
3156 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3157 (unblock_async_io): Rename to ...
3158 (block_unblock_async_io): ... it. New function.
3159 (enable_async_io): Don't install SIGIO handler. Unblock it
3160 instead.
3161 (disable_async_io): Don't ignore SIGIO. Block it instead.
3162 (initialize_async_io): Install SIGIO handler. Don't call
3163 unblock_async_io.
3164
18879fef
YQ
31652016-01-26 Yao Qi <yao.qi@linaro.org>
3166
3167 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3168 first character is '\003', call *the_target->request_interrupt.
3169
a0f8e08a
YQ
31702016-01-25 Yao Qi <yao.qi@linaro.org>
3171
3172 * remote-utils.c (new_thread_notify): Remove.
3173 (dead_thread_notify): Likewise.
3174 * remote-utils.h (new_thread_notify): Remove declaration.
3175 (dead_thread_notify): Likewise.
3176
cc5fd9ab
MK
31772016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3178
3179 * gdb.trace/pending.exp: Fix expected message on continue.
3180
99e8eb11
MK
31812016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3182
3183 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3184 it works properly on big-endian machines where sizeof (CORE_ADDR)
3185 != sizeof (void *).
3186
a994041d
PA
31872016-01-21 Pedro Alves <palves@redhat.com>
3188
3189 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3190 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3191 * configure: Regenerate.
3192
f7a6a40d
YQ
31932016-01-21 Yao Qi <yao.qi@linaro.org>
3194
3195 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3196 is_thumb and set it according to CPSR saved on the stack.
3197 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3198 arm_sigreturn_next_pc.
3199
6f69e520
YQ
32002016-01-18 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-low.c (linux_set_pc_64bit): New function.
3203 (linux_get_pc_64bit): New function.
3204 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3205 Declare.
3206 * linux-sparc-low.c (debug_threads): Remove declaration.
3207 (sparc_get_pc): Remove.
3208 (the_low_target): Use linux_get_pc_64bit instead of
3209 sparc_get_pc.
3210 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3211 (the_low_target): Use linux_get_pc_64bit and
3212 linux_set_pc_64bit.
3213
276d4552
YQ
32142016-01-18 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-arm-low.c (debug_threads): Remove declaration.
3217 (arm_get_pc, arm_set_pc): Remove.
3218 (the_low_target): Use linux_get_pc_32bit and
3219 linux_set_pc_32bit.
3220 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3221 (the_low_target): Use linux_get_pc_32bit and
3222 linux_set_pc_32bit.
3223 * linux-cris-low.c (debug_threads): Remove declaration.
3224 (cris_get_pc, cris_set_pc,): Remove.
3225 (the_low_target): Use linux_get_pc_32bit and
3226 linux_set_pc_32bit.
3227 * linux-crisv32-low.c (debug_threads): Remove declaration.
3228 (cris_get_pc, cris_set_pc): Remove.
3229 (the_low_target): Use linux_get_pc_32bit and
3230 linux_set_pc_32bit.
3231 * linux-low.c: Include inttypes.h.
3232 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3233 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3234 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3235 (the_low_target): Use linux_get_pc_32bit and
3236 linux_set_pc_32bit.
3237 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3238 (the_low_target): Use linux_get_pc_32bit and
3239 linux_set_pc_32bit.
3240 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3241 (the_low_target): Use linux_get_pc_32bit and
3242 linux_set_pc_32bit.
3243 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3244 (the_low_target): Use linux_get_pc_32bit and
3245 linux_set_pc_32bit.
3246 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3247 (the_low_target): Use linux_get_pc_32bit and
3248 linux_set_pc_32bit.
3249
eb0edac8
GB
32502016-01-18 Gary Benson <gbenson@redhat.com>
3251
3252 * configure.ac (AC_FUNC_FORK): New check.
3253 * config.in: Regenerate.
3254 * configure: Likewise.
3255
1b451dda
YQ
32562016-01-14 Yao Qi <yao.qi@linaro.org>
3257
3258 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3259 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3260 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3261 arm_get_next_pcs_ctor.
3262
82075af2
JS
32632016-01-12 Josh Stone <jistone@redhat.com>
3264 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3265
3266 * inferiors.h: Include "gdb_vecs.h".
3267 (struct process_info): Add syscalls_to_catch.
3268 * inferiors.c (remove_process): Free syscalls_to_catch.
3269 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3270 syscall_return stops.
3271 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3272 * server.c (handle_general_set): Handle QCatchSyscalls.
3273 (handle_query): Report support for QCatchSyscalls.
3274 * target.h (struct target_ops): Add supports_catch_syscall.
3275 (target_supports_catch_syscall): New macro.
3276 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3277 (struct lwp_info): Add syscall_state.
3278 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3279 Maintain syscall_state and syscalls_to_catch across exec.
3280 (get_syscall_trapinfo): New function, proxy to the_low_target.
3281 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3282 (linux_low_filter_event): Toggle syscall_state entry/return for
3283 syscall traps, and set it ignored for all others.
3284 (gdb_catching_syscalls_p): New function.
3285 (gdb_catch_this_syscall_p): New function.
3286 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3287 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3288 (linux_supports_catch_syscall): New function.
3289 (linux_target_ops): Install it.
3290 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3291 (the_low_target): Install it.
3292
8f13a3ce
MF
32932016-01-12 Mike Frysinger <vapier@gentoo.org>
3294
3295 * acinclude.m4: Include new ../warning.m4 file.
3296 * configure: Regenerated.
3297 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3298
5b3da067
MF
32992016-01-12 Mike Frysinger <vapier@gentoo.org>
3300
3301 * ax.c (is_goto_target): Mark static.
3302 * linux-low.c (register_addr): Likewise.
3303 (linux_fetch_registers, linux_store_registers): Likewise.
3304 * mem-break.c (any_persistent_commands): Fix old prototype.
3305 (add_commands_to_breakpoint): Mark static.
3306 * regcache.c (find_register_by_name): Delete unused func.
3307 * remote-utils.c (hex_or_minus_one): Mark static.
3308 * server.c (monitor_show_help): Mark static.
3309 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3310 handle_v_requests): Likewise.
3311
bc504a31
PA
33122016-01-12 Pedro Alves <palves@redhat.com>
3313
3314 Remove use of the registered trademark symbol throughout.
3315
5a0dd67a
YQ
33162016-01-08 Yao Qi <yao.qi@linaro.org>
3317
3318 * remote-utils.c (getpkt): If c is '\003', call target hook
3319 request_interrupt.
3320
b2ca446f
YQ
33212016-01-06 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3324 linux-aarch32-low.c.
3325 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3326 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3327 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3328 (thumb2_breakpoint): Declare.
3329 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3330 linux-aarch32-low.h.
3331 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3332 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3333 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3334
edd88788
JB
33352016-01-01 Joel Brobecker <brobecker@adacore.com>
3336
3337 * gdbreplay.c (gdbreplay_version): Change copyright year in
3338 version message.
3339 * server.c (gdbserver_version): Likewise.
3340
65da7f14
PP
33412015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3342
3343 * server.c (crc32_table): Delete.
3344 (crc32): Use libiberty's xcrc32 function.
3345
4abd5ed2
JB
33462015-12-22 Joel Brobecker <brobecker@adacore.com>
3347
3348 * lynx-low.c (lynx_delete_thread_callback): New function.
3349 (lynx_mourn): Properly delete our process and all of its
3350 threads. Remove call to clear_inferiors.
3351
0e50fe5c
JB
33522015-12-22 Joel Brobecker <brobecker@adacore.com>
3353
3354 * target.c (thread_search_callback): Add check that
3355 the thread_stopped target callback is not NULL before
3356 calling it.
3357
35adc03f
YQ
33582015-12-21 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3361 arm breakpoint.
3362
bd2b2909
AT
33632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3364
3365 * server.c (handle_query): Call target_supports_software_single_step.
3366
7fe5e27e
AT
33672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3368
3369 * linux-low.c (single_step): New function.
3370 (linux_resume_one_lwp_throw): Call single_step.
3371 (start_step_over): Likewise.
3372
d9311bfa
AT
33732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3374
3375 * Makefile.in (SFILES): Append arch/arm-linux.c,
3376 arch/arm-get-next-pcs.c.
3377 (arm-linux.o): New rule.
3378 (arm-get-next-pcs.o): New rule.
3379 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3380 arm-linux.o.
3381 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3382 to linux-aarch32-low.c.
3383 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3384 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3385 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3386 (thumb2_breakpoint_len): Likewise.
3387 (arm_is_thumb_mode): Make non-static.
3388 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3389 from linux-aarch32-low.c.
3390 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3391 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3392 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3393 (thumb2_breakpoint_len): Likewise.
3394 (arm_is_thumb_mode): New declaration.
3395 * linux-arm-low.c: Include arch/arm-linux.h
3396 aarch/arm-get-next-pcs.h, sys/syscall.h.
3397 (get_next_pcs_ops): New struct.
3398 (get_next_pcs_addr_bits_remove): New function.
3399 (get_next_pcs_is_thumb): New function.
3400 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3401 (arm_sigreturn_next_pc): Likewise.
3402 (get_next_pcs_syscall_next_pc): Likewise.
3403 (arm_gdbserver_get_next_pcs): Likewise.
3404 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3405 Initialize.
3406 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3407 * server.h: Include gdb_vecs.h.
3408
68ce2059
AT
34092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3410
3411 * Makefile.in (SFILES): Append common/common-regcache.c.
3412 (OBS): Append common-regcache.o.
3413 (common-regcache.o): New rule.
3414 * regcache.c (init_register_cache): Initialize cache to
3415 REG_UNAVAILABLE.
3416 (regcache_raw_read_unsigned): New function.
3417 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3418 register_status enum.
3419
fa5308bd
AT
34202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3421
3422 * linux-aarch64-low.c (the_low_targets): Rename
3423 breakpoint_reinsert_addr to get_next_pcs.
3424 * linux-arm-low.c (the_low_targets): Likewise.
3425 * linux-bfin-low.c (the_low_targets): Likewise.
3426 * linux-cris-low.c (the_low_targets): Likewise.
3427 * linux-crisv32-low.c (the_low_targets): Likewise.
3428 * linux-low.c (can_software_single_step): Likewise.
3429 (install_software_single_step_breakpoints): New function.
3430 (start_step_over): Use install_software_single_step_breakpoints.
3431 * linux-low.h: New CORE_ADDR vector.
3432 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3433 get_next_pcs.
3434 * linux-mips-low.c (the_low_targets): Likewise.
3435 * linux-nios2-low.c (the_low_targets): Likewise.
3436 * linux-sparc-low.c (the_low_targets): Likewise.
3437
4a6ed09b
PA
34382015-12-17 Pedro Alves <palves@redhat.com>
3439
3440 * linux-low.c (linux_kill_one_lwp): Remove references to
3441 LinuxThreads.
3442 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3443 to 'kill'.
3444 (linux_init_signals): Delete.
3445 (initialize_low): Adjust.
3446 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3447
7544db95
PA
34482015-12-16 Pedro Alves <palves@redhat.com>
3449
3450 * configure.ac (compiler warning flags): When testing a
3451 -Wno-foo option, check whether -Wfoo works instead.
3452 * configure: Regenerate.
3453
8020350c
DB
34542015-12-11 Don Breazeal <donb@codesourcery.com>
3455
3456 * server.c (process_serial_event): Don't exit from gdbserver
3457 in remote mode if there are still active inferiors.
3458
db91f502
YQ
34592015-12-11 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3462 arm_breakpoint_at if the process is 32-bit.
3463
b37a6290
YQ
34642015-12-11 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3467 arm breakpoint.
3468
17b1509a
YQ
34692015-12-07 Yao Qi <yao.qi@linaro.org>
3470
3471 * configure.srv: Append arm.o to srv_tgtobj for
3472 aarch64*-*-linux* target.
3473 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3474 from linux-arm-low.c.
3475 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3476 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3477 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3478 (thumb2_breakpoint_len): Likewise.
3479 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3480 (arm_breakpoint_kinds): Likewise.
3481 (arm_breakpoint_kind_from_pc): Likewise.
3482 (arm_sw_breakpoint_from_kind): Likewise.
3483 (arm_breakpoint_kind_from_current_state): Likewise.
3484 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3485 (arm_sw_breakpoint_from_kind): Declare.
3486 (arm_breakpoint_kind_from_current_state): Declare.
3487 (arm_breakpoint_at): Declare.
3488 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3489 arm_sw_breakpoint_from_kind if process is 32-bit.
3490 (aarch64_breakpoint_kind_from_pc): New function.
3491 (aarch64_breakpoint_kind_from_current_state): New function.
3492 (the_low_target): Initialize fields breakpoint_kind_from_pc
3493 and breakpoint_kind_from_current_state.
3494 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3495 linux-aarch32-low.c.
3496 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3497 (arm_breakpoint, arm_breakpoint_len): Likewise.
3498 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3499 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3500 (arm_is_thumb_mode): Likewise.
3501 (arm_breakpoint_at): Likewise.
3502 (arm_breakpoint_kind_from_pc): Likewise.
3503 (arm_sw_breakpoint_from_kind): Likewise.
3504 (arm_breakpoint_kind_from_current_state): Likewise.
3505
3506 Revert:
3507 2015-08-04 Yao Qi <yao.qi@linaro.org>
3508
3509 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3510 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3511 * server.c (extended_protocol): Remove "static".
3512 * server.h (extended_protocol): Declare it.
3513
ece66d65
JS
35142015-12-04 Josh Stone <jistone@redhat.com>
3515
3516 * target.h (struct target_ops) <arch_setup>: Rename to ...
3517 (struct target_ops) <post_create_inferior>: ... this.
3518 (target_arch_setup): Rename to ...
3519 (target_post_create_inferior): ... this, calling post_create_inferior.
3520 * server.c (start_inferior): Update target_arch_setup calls to
3521 target_post_create_inferior.
3522 * linux-low.c (linux_low_ptrace_options): Forward declare.
3523 (linux_arch_setup): Update its comment for general use.
3524 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3525 (struct linux_target_ops): Use linux_post_create_inferior.
3526 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3527 to post_create_inferior.
3528 * nto-low.c (struct nto_target_ops): Likewise.
3529 * spu-low.c (struct spu_target_ops): Likewise.
3530 * win32-low.c (struct win32_target_ops): Likewise.
3531
e58c48b4
AT
35322015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3533
3534 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3535
fbec8956
AT
35362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3537
3538 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3539 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3540 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3541 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3542 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3543 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3544 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3545 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3546 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3547 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3548 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3549 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3550
9b4c5f87
AT
35512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3552
3553 * linux-low.c (linux_look_up_symbols): Don't call
3554 linux_supports_traceclone.
3555 * linux-low.h (thread_db_init): Remove use_events argument.
3556 * thread-db.c (thread_db_use_event): Remove global variable.
3557 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3558 (struct thread_db) <td_create_bp>: Remove field.
3559 (thread_db_create_event): Remove function.
3560 (thread_db_enable_reporting): Likewise.
3561 (find_one_thread): Don't check for thread_db_use_events.
3562 (attach_thread): Likewise.
3563 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3564 (try_thread_db_load_1): Don't check for thread_db_use_events.
3565 (thread_db_init): Remove use_events argument and thread events
3566 handling.
3567 (remove_thread_event_breakpoints): Remove function.
3568 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3569
7d00775e
AT
35702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3571
3572 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3573 New function.
3574 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3575 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3577 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3578 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3579 Initialize.
3580 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3581 New function.
3582 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3583 * linux-low.c (can_hardware_single_step): Use
3584 supports_hardware_single_step.
3585 (can_software_single_step): New function.
3586 (start_step_over): Call can_software_single_step.
3587 (linux_supports_hardware_single_step): New function.
3588 (struct target_ops) <supports_software_single_step>: Initialize.
3589 * linux-low.h (struct linux_target_ops)
3590 <supports_hardware_single_step>: Initialize.
3591 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3593 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3594 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3595 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3597 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3599 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3600 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3601 Initialize.
3602 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3603 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3604 Initialize.
3605 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3607 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3608 New function.
3609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3610 * target.h (struct target_ops): <supports_software_single_step>:
3611 New field.
3612 (target_supports_software_single_step): New macro.
3613
2d97cd35
AT
36142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3615
3616 * linux-low.c (linux_wait_1): Fix pc advance condition.
3617 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3618 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3619
769ef81f
AT
36202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3621
3622 * linux-arm-low.c (arm_is_thumb_mode): New function.
3623 (arm_breakpoint_at): Use arm_is_thumb_mode.
3624 (arm_breakpoint_kind_from_current_state): New function.
3625 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3626 Initialize.
3627 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3628 (linux_breakpoint_kind_from_current_state): New function.
3629 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3630 * linux-low.h (struct linux_target_ops)
3631 <breakpoint_kind_from_current_state>: New field.
3632 * target.h (struct target_ops): Likewise.
3633 (target_breakpoint_kind_from_current_state): New macro.
3634
1bebeeca
PA
36352015-11-30 Pedro Alves <palves@redhat.com>
3636
3637 * linux-low.c (linux_resume): Wake up the event loop before
3638 returning.
3639
a67a9fae
PA
36402015-11-30 Pedro Alves <palves@redhat.com>
3641
3642 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3643 check.
3644 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3645 to -1.
3646 * target.c (struct thread_search): New structure.
3647 (thread_search_callback): New function.
3648 (prev_general_thread): New global.
3649 (prepare_to_access_memory, done_accessing_memory): New functions.
3650 * target.h (prepare_to_access_memory, done_accessing_memory):
3651 Replace macros with function declarations.
3652
f2faf941
PA
36532015-11-30 Pedro Alves <palves@redhat.com>
3654
3655 PR 14618
3656 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3657 report TARGET_WAITKIND_NO_RESUMED.
3658 * remote-utils.c (prepare_resume_reply): Handle
3659 TARGET_WAITKIND_NO_RESUMED.
3660 * server.c (report_no_resumed): New global.
3661 (handle_query) <qSupported>: Handle "no-resumed+". Report
3662 "no-resumed+" support.
3663 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3664 return error if the client doesn't support no-resumed events.
3665 (push_stop_notification): New function.
3666 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3667 events if the client supports them.
3668
a681f9c9
PA
36692015-11-30 Pedro Alves <palves@redhat.com>
3670
3671 * linux-low.c (thread_still_has_status_pending_p): Don't check
3672 vCont;t here.
3673 (lwp_resumed): New function.
3674 (status_pending_p_callback): Return early if the LWP is not
3675 supposed to be resumed.
3676
65706a29
PA
36772015-11-30 Pedro Alves <palves@redhat.com>
3678
3679 * linux-low.c (handle_extended_wait): Assert that the LWP's
3680 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3681 thread create events, leave the new child's status pending.
3682 (linux_low_filter_event): If GDB wants to hear about thread exit
3683 events, leave the LWP marked dead and don't delete it.
3684 (linux_wait_for_event_filtered): Don't check for thread exit.
3685 (filter_exit_event): New function.
3686 (linux_wait_1): Use it, when returning an exit event.
3687 (linux_resume_one_lwp_throw): Assert that the LWP's
3688 waitstatus is TARGET_WAITKIND_IGNORE.
3689 * remote-utils.c (prepare_resume_reply): Handle
3690 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3691 * server.c (report_thread_events): New global.
3692 (handle_general_set): Handle QThreadEvents.
3693 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3694 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3695 TARGET_WAITKIND_THREAD_EXITED.
3696 * server.h (report_thread_events): Declare.
3697
56cf4bed
PA
36982015-11-30 Pedro Alves <palves@redhat.com>
3699
3700 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3701 the thread's last_resume_kind was resume_stop.
3702
500c1d85
PA
37032015-11-30 Pedro Alves <palves@redhat.com>
3704
3705 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3706 before returning.
3707
de979965
PA
37082015-11-30 Pedro Alves <palves@redhat.com>
3709
3710 * server.c (handle_v_requests): Handle vCtrlC.
3711
34c65914
PA
37122015-11-30 Pedro Alves <palves@redhat.com>
3713
3714 * gdbthread.h (find_any_thread_of_pid): Declare.
3715 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3716 functions.
3717 * server.c (handle_query): If current_thread is NULL, look for
3718 another thread of the selected process.
3719
79efa585 37202015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3721 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3722
3723 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3724 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3725 name in reply.
3726 * target.h (struct target_ops) <thread_name>: New field.
3727 (target_thread_name): New macro.
3728
80d82c19
JB
37292015-11-23 Joel Brobecker <brobecker@adacore.com>
3730
3731 * regcache.h (regcache_invalidate_pid): Add declaration.
3732 * regcache.c (regcache_invalidate_pid): New function, extracted
3733 from regcache_invalidate.
3734 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3735 Add trivial documentation comment.
3736 * lynx-low.c: Use regcache_invalidate_pid instead of
3737 regcache_invalidate.
3738
64da5dd5
JB
37392015-11-23 Joel Brobecker <brobecker@adacore.com>
3740
3741 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3742 and Elf64_auxv_t if the target is Android.
3743
37ce4055
DE
37442015-11-22 Doug Evans <xdje42@gmail.com>
3745
3746 * target.h: #include <sys/types.h>.
3747
06e03fff
PA
37482015-11-19 Pedro Alves <palves@redhat.com>
3749
3750 * linux-low.c (linux_process_qsupported): Change prototype.
3751 Adjust.
3752 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3753 Change prototype.
3754 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3755 and adjust to loop over all features.
3756 * server.c (handle_query) <qSupported>: Adjust to call
3757 target_process_qsupported once, passing it a vector of unprocessed
3758 features.
3759 * target.h (struct target_ops) <process_qsupported>: Change
3760 prototype.
3761 (target_process_qsupported): Adjust.
3762
9a084706
PA
37632015-11-19 Pedro Alves <palves@redhat.com>
3764
3765 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3766 mode.
3767 * configure: Regenerate.
3768
dad44a1f
PA
37692015-11-19 Pedro Alves <palves@redhat.com>
3770
3771 * configure: Regenerate.
3772
231c0592
YQ
37732015-11-19 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3776 type to uint32_t.
3777
6c1c9a8b
YQ
37782015-11-19 Yao Qi <yao.qi@linaro.org>
3779
3780 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3781 (struct aarch64_operand): Move enum out.
3782
9caa3311
YQ
37832015-11-19 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3786 struct user_fpsimd_state *.
3787 (aarch64_store_fpregset): Likewise.
3788
6a69a054
YQ
37892015-11-19 Yao Qi <yao.qi@linaro.org>
3790
3791 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3792 struct user_pt_regs *.
3793 (aarch64_store_gregset): Likewise.
3794
1798301e
PA
37952015-11-18 Pedro Alves <palves@redhat.com>
3796
3797 * Makefile.in (all_object_files): Add $IPA_OBJS.
3798
ce7715e2
PA
37992015-11-17 Pedro Alves <palves@redhat.com>
3800
3801 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3802 GDB_SIGNAL_0 and gdb_signal_to_string.
3803
c0879059
PA
38042015-11-17 Pedro Alves <palves@redhat.com>
3805
3806 * win32-low.c (handle_output_debug_string): Remove parameter.
3807 (win32_kill): Remove our_status local and adjust call to
3808 handle_output_debug_string.
3809 (get_child_debug_event): Adjust call to
3810 handle_output_debug_string.
3811
1996e237
SM
38122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3813
3814 * linux-mips-low.c (mips_fill_gregset): Add cast.
3815 (mips_store_gregset): Likewise.
3816 (mips_fill_fpregset): Likewise.
3817 (mips_store_fpregset): Likewise.
3818
cbec665b
SM
38192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3822 priv.
3823
eb3e3c67
SM
38242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3825
3826 * linux-mips-low.c (mips_linux_new_thread): Change type of
3827 watch_type to enum target_hw_bp_type.
3828
171de4b8
SM
38292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3830
3831 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3832 Change return type to arm_hwbp_type.
3833
04248ead
SM
38342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3835
3836 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3837 (arm_store_gregset): Likewise.
3838 * linux-arm-low.c (arm_get_hwcap): Likewise.
3839 (arm_read_description): Likewise.
3840
04b3479c
SM
38412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3842
3843 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3844
2bc84e8a
SM
38452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3846
3847 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3848 (ppc_fill_vsxregset): Likewise.
3849 (ppc_store_vsxregset): Likewise.
3850 (ppc_fill_vrregset): Likewise.
3851 (ppc_store_vrregset): Likewise.
3852 (ppc_fill_evrregset): Likewise.
3853 (ppc_store_evrregset): Likewise.
3854
e6c5bb05
SM
38552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3856
3857 * linux-ppc-low.c (ppc_usrregs_info): Remove
3858 forward-declaration.
3859 (ppc_arch_setup): Move lower in file.
3860
7ea45d72
SM
38612015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3862
3863 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3864 (ps_pdwrite): Likewise.
3865
69291610
HW
38662015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3867
3868 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3869 to after assert checks.
3870
b42945fd
SM
38712015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3872
3873 * proc-service.c (ps_pdread): Add/adjust casts.
3874 (ps_pdwrite): Add/adjust casts.
3875
d6f85c84
SM
38762015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3877
3878 * server.c (handle_search_memory_1): Cast return value of
3879 memmem.
3880
f98cd059
SM
38812015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3882
3883 * server.c (write_qxfer_response): Change type of data to
3884 gdb_byte *.
3885
d2412fa5
PA
38862015-10-29 Pedro Alves <palves@redhat.com>
3887
3888 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3889
c17414a2
PA
38902015-10-29 Pedro Alves <palves@redhat.com>
3891
3892 * tracepoint.c (clear_installed_tracepoints): Add casts.
3893
e053fbc4
PA
38942015-10-29 Pedro Alves <palves@redhat.com>
3895
3896 * server.c (handle_v_cont, process_serial_event): Add enum
3897 gdb_signal casts to signal parsing code.
3898
add67df8
PA
38992015-10-29 Pedro Alves <palves@redhat.com>
3900
3901 * linux-low.h (NULL_REGSET): Define.
3902 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3903 * linux-arm-low.c (arm_regsets): Likewise.
3904 * linux-crisv32-low.c (cris_regsets): Likewise.
3905 * linux-m68k-low.c (m68k_regsets): Likewise.
3906 * linux-mips-low.c (mips_regsets): Likewise.
3907 * linux-nios2-low.c (nios2_regsets): Likewise.
3908 * linux-ppc-low.c (ppc_regsets): Likewise.
3909 * linux-s390-low.c (s390_regsets): Likewise.
3910 * linux-sh-low.c (sh_regsets): Likewise.
3911 * linux-sparc-low.c (sparc_regsets): Likewise.
3912 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3913 * linux-tile-low.c (tile_regsets): Likewise.
3914 * linux-x86-low.c (x86_regsets): Likewise.
3915 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3916
50bc912a
PA
39172015-10-29 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.h (NULL_REGSET): Define.
3920 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3921 * linux-arm-low.c (arm_regsets): Likewise.
3922 * linux-crisv32-low.c (cris_regsets): Likewise.
3923 * linux-m68k-low.c (m68k_regsets): Likewise.
3924 * linux-mips-low.c (mips_regsets): Likewise.
3925 * linux-nios2-low.c (nios2_regsets): Likewise.
3926 * linux-ppc-low.c (ppc_regsets): Likewise.
3927 * linux-s390-low.c (s390_regsets): Likewise.
3928 * linux-sh-low.c (sh_regsets): Likewise.
3929 * linux-sparc-low.c (sparc_regsets): Likewise.
3930 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3931 * linux-tile-low.c (tile_regsets): Likewise.
3932 * linux-x86-low.c (x86_regsets): Likewise.
3933 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3934
682b2546
DE
39352015-10-26 Doug Evans <dje@google.com>
3936
3937 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3938
963843d4
DE
39392015-10-26 Doug Evans <dje@google.com>
3940
3941 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3942
d41401ac
DE
39432015-10-26 Doug Evans <dje@google.com>
3944
3945 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3946 for debug_printf.
3947 (attach_thread, find_new_threads_callback): Ditto.
3948
3db28855
AT
39492015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3950
3951 * mem-break.h (set_breakpoint_data): Remove.
3952
fb78e89c
AT
39532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3954
3955 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3956 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3957 (initialize_low): Remove set_breakpoint_data call.
3958 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3959 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3960 (initialize_low): Remove set_breakpoint_data call.
3961 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3962 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3963 (initialize_low): Remove set_breakpoint_data call.
3964
2e6ee069
AT
39652015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3966
3967 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3968 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3969 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3970 * target.h (target_breakpoint_kind_from_pc): New macro.
3971
1652a986
AT
39722015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3973
3974 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3975 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3976 the default breakpoint kind.
3977
abeead09
AT
39782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3979
3980 * linux-arm-low.c (arm_supports_z_point_type): Add software
3981 breakpoint support.
3982
b0b4b501
AT
39832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3984
3985 * linux-arm-low.c: Refactor breakpoint definitions.
3986 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3987 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3988
8689682c
AT
39892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3990
3991 * Makefile.in: Add arm.c/o.
3992 * configure.srv: Likewise.
3993 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3994 (arm_breakpoint_kind_from_pc): New function.
3995 (arm_sw_breakpoint_from_kind): Return proper kind.
3996 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3997
27165294
AT
39982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3999
4000 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4001 removal.
4002 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4003 (struct raw_breakpoint) <size>: Remove.
4004 (struct raw_breakpoint) <kind>: Add.
4005 (bp_size): New function.
4006 (bp_opcode): Likewise.
4007 (find_raw_breakpoint_at): Adjust for kind.
4008 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4009 (remove_memory_breakpoint): Adjust for kind call bp_size.
4010 (set_raw_breakpoint_at): Adjust for kind.
4011 (set_breakpoint): Likewise.
4012 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4013 (delete_raw_breakpoint): Adjust for kind.
4014 (delete_breakpoint): Likewise.
4015 (find_gdb_breakpoint): Likewise.
4016 (set_gdb_breakpoint_1): Likewise.
4017 (set_gdb_breakpoint): Likewise.
4018 (delete_gdb_breakpoint_1): Likewise.
4019 (delete_gdb_breakpoint): Likewise.
4020 (uninsert_raw_breakpoint): Likewise.
4021 (reinsert_raw_breakpoint): Likewise.
4022 (set_breakpoint_data): Remove.
4023 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4024 (check_mem_read): Adjust for kind call bp_size.
4025 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4026 (clone_one_breakpoint): Adjust for kind.
4027 * mem-break.h (set_gdb_breakpoint): Likewise.
4028 (delete_gdb_breakpoint): Likewise.
4029 * server.c (process_serial_event): Likewise.
4030
dd373349
AT
40312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4032
4033 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4034 (struct linux_target_ops) <breakpoint>: Remove.
4035 (struct linux_target_ops) <breakpoint_len>: Remove.
4036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4038 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4039 (arm_sw_breakpoint_from_kind): New function.
4040 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4041 (struct linux_target_ops) <breakpoint>: Remove.
4042 (struct linux_target_ops) <breakpoint_len>: Remove.
4043 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4044 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4045 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4046 (struct linux_target_ops) <breakpoint>: Remove.
4047 (struct linux_target_ops) <breakpoint_len>: Remove.
4048 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4049 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4050 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4051 (struct linux_target_ops) <breakpoint>: Remove.
4052 (struct linux_target_ops) <breakpoint_len>: Remove.
4053 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4054 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4055 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4056 and sw_breakpoint_from_kind to increment the pc.
4057 (linux_breakpoint_kind_from_pc): New function.
4058 (linux_sw_breakpoint_from_kind): New function.
4059 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4060 (initialize_low): Call breakpoint_kind_from_pc and
4061 sw_breakpoint_from_kind to replace breakpoint_data/len.
4062 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4063 New field.
4064 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4065 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4066 (struct linux_target_ops) <breakpoint>: Remove.
4067 (struct linux_target_ops) <breakpoint_len>: Remove.
4068 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4069 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4070 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4071 (struct linux_target_ops) <breakpoint>: Remove.
4072 (struct linux_target_ops) <breakpoint_len>: Remove.
4073 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4074 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4075 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4076 (struct linux_target_ops) <breakpoint>: Remove.
4077 (struct linux_target_ops) <breakpoint_len>: Remove.
4078 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4079 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4080 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4081 (struct linux_target_ops) <breakpoint>: Remove.
4082 (struct linux_target_ops) <breakpoint_len>: Remove.
4083 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4084 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4085 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4086 (struct linux_target_ops) <breakpoint>: Remove.
4087 (struct linux_target_ops) <breakpoint_len>: Remove.
4088 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4089 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4090 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4091 (struct linux_target_ops) <breakpoint>: Remove.
4092 (struct linux_target_ops) <breakpoint_len>: Remove.
4093 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4094 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4095 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4096 (struct linux_target_ops) <breakpoint>: Remove.
4097 (struct linux_target_ops) <breakpoint_len>: Remove.
4098 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4099 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4100 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4101 (struct linux_target_ops) <breakpoint>: Remove.
4102 (struct linux_target_ops) <breakpoint_len>: Remove.
4103 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4104 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4105 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4106 (struct linux_target_ops) <breakpoint>: Remove.
4107 (struct linux_target_ops) <breakpoint_len>: Remove.
4108 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4110 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4111 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4112 (struct linux_target_ops) <breakpoint>: Remove.
4113 (struct linux_target_ops) <breakpoint_len>: Remove.
4114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4115 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4116 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4117 (struct linux_target_ops) <breakpoint>: Remove.
4118 (struct linux_target_ops) <breakpoint_len>: Remove.
4119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4121
4cd98a19
AT
41222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4123
4124 * linux-cris-low.c (cris_get_pc): Remove void arg.
4125
774ee6d2
AR
41262015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4127
4128 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4129 variable name.
4130
833dcd29
AR
41312015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4132
4133 * inferiors.c (thread_pid_matches_callback): New function.
4134 (find_thread_process): New function.
4135 (remove_thread): Reset current_thread.
4136 (remove_process): Assert threads have been removed first.
4137
8d689ee5
YQ
41382015-10-15 Yao Qi <yao.qi@linaro.org>
4139
4140 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4141 if it is 3.
4142 (aarch64_remove_point): Likewise.
4143 * regcache.c (regcache_register_size): New function.
4144
1c2e1515
YQ
41452015-10-12 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-aarch64-low.c: Update all callers as emit_load_store
4148 is renamed to aarch64_emit_load_store.
4149
e1c587c3
YQ
41502015-10-12 Yao Qi <yao.qi@linaro.org>
4151
4152 * linux-aarch64-low.c: Update all callers of function renaming
4153 from emit_insn to aarch64_emit_insn.
4154
b6542f81
YQ
41552015-10-12 Yao Qi <yao.qi@linaro.org>
4156
4157 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4158 arch/aarch64-insn.h.
4159 (struct aarch64_memory_operand): Likewise.
4160 (ENCODE): Likewise.
4161 (emit_insn): Move to arch/aarch64-insn.c.
4162 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4163 (emit_load_store): Move to arch/aarch64-insn.c.
4164 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4165 (can_encode_int32): Remove.
4166
246994ce
YQ
41672015-10-12 Yao Qi <yao.qi@linaro.org>
4168
4169 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4170 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4171 (aarch64_relocate_instruction): Likewise.
4172 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4173 (struct aarch64_insn_visitor): Likewise.
4174
0badd99f
YQ
41752015-10-12 Yao Qi <yao.qi@linaro.org>
4176
4177 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4178 (struct aarch64_insn_visitor): New.
4179 (struct aarch64_insn_relocation_data): New.
4180 (aarch64_ftrace_insn_reloc_b): New function.
4181 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4182 (aarch64_ftrace_insn_reloc_cb): Likewise.
4183 (aarch64_ftrace_insn_reloc_tb): Likewise.
4184 (aarch64_ftrace_insn_reloc_adr): Likewise.
4185 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4186 (aarch64_ftrace_insn_reloc_others): Likewise.
4187 (visitor): New.
4188 (aarch64_relocate_instruction): Use visitor.
4189
dfaffe9d
YQ
41902015-10-12 Yao Qi <yao.qi@linaro.org>
4191
4192 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4193 int. Add argument buf.
4194 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4195 aarch64_relocate_instruction.
4196
70b439f0
YQ
41972015-10-12 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4200 argument insn. Remove local variable insn. Don't call
4201 target_read_uint32.
4202 (aarch64_install_fast_tracepoint_jump_pad): Call
4203 target_read_uint32.
4204
7781c06f
YQ
42052015-09-30 Yao Qi <yao.qi@linaro.org>
4206
4207 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4208 (emit_load_store_pair): Likewise.
4209
9a3c8263
SM
42102015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4211
4212 * dll.c (match_dll): Add cast(s).
4213 (unloaded_dll): Likewise.
4214 * linux-low.c (second_thread_of_pid_p): Likewise.
4215 (delete_lwp_callback): Likewise.
4216 (count_events_callback): Likewise.
4217 (select_event_lwp_callback): Likewise.
4218 (linux_set_resume_request): Likewise.
4219 * server.c (accumulate_file_name_length): Likewise.
4220 (emit_dll_description): Likewise.
4221 (handle_qxfer_threads_worker): Likewise.
4222 (visit_actioned_threads): Likewise.
4223 * thread-db.c (any_thread_of): Likewise.
4224 * tracepoint.c (same_process_p): Likewise.
4225 (match_blocktype): Likewise.
4226 (build_traceframe_info_xml): Likewise.
4227
224c3ddb
SM
42282015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4229
4230 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4231 assignment.
4232 (gdb_unparse_agent_expr): Likewise.
4233 * hostio.c (require_data): Likewise.
4234 (handle_pread): Likewise.
4235 * linux-low.c (disable_regset): Likewise.
4236 (fetch_register): Likewise.
4237 (store_register): Likewise.
4238 (get_dynamic): Likewise.
4239 (linux_qxfer_libraries_svr4): Likewise.
4240 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4241 (set_fast_tracepoint_jump): Likewise.
4242 (uninsert_fast_tracepoint_jumps_at): Likewise.
4243 (reinsert_fast_tracepoint_jumps_at): Likewise.
4244 (validate_inserted_breakpoint): Likewise.
4245 (clone_agent_expr): Likewise.
4246 * regcache.c (init_register_cache): Likewise.
4247 * remote-utils.c (putpkt_binary_1): Likewise.
4248 (decode_M_packet): Likewise.
4249 (decode_X_packet): Likewise.
4250 (look_up_one_symbol): Likewise.
4251 (relocate_instruction): Likewise.
4252 (monitor_output): Likewise.
4253 * server.c (handle_search_memory): Likewise.
4254 (handle_qxfer_exec_file): Likewise.
4255 (handle_qxfer_libraries): Likewise.
4256 (handle_qxfer): Likewise.
4257 (handle_query): Likewise.
4258 (handle_v_cont): Likewise.
4259 (handle_v_run): Likewise.
4260 (captured_main): Likewise.
4261 * target.c (write_inferior_memory): Likewise.
4262 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4263 * tracepoint.c (init_trace_buffer): Likewise.
4264 (add_tracepoint_action): Likewise.
4265 (add_traceframe): Likewise.
4266 (add_traceframe_block): Likewise.
4267 (cmd_qtdpsrc): Likewise.
4268 (cmd_qtdv): Likewise.
4269 (cmd_qtstatus): Likewise.
4270 (response_source): Likewise.
4271 (response_tsv): Likewise.
4272 (cmd_qtnotes): Likewise.
4273 (gdb_collect): Likewise.
4274 (initialize_tracepoint): Likewise.
4275
afbe19f8
PL
42762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4277
4278 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4279 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4280 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4281 <NOP>: New.
4282 (enum aarch64_condition_codes): New enum.
4283 (w0): New static global.
4284 (fp): Likewise.
4285 (lr): Likewise.
4286 (struct aarch64_memory_operand) <type>: New
4287 MEMORY_OPERAND_POSTINDEX type.
4288 (postindex_memory_operand): New helper function.
4289 (emit_ret): New function.
4290 (emit_load_store_pair): New function, factored out of emit_stp
4291 with support for MEMORY_OPERAND_POSTINDEX.
4292 (emit_stp): Rewrite using emit_load_store_pair.
4293 (emit_ldp): New function.
4294 (emit_load_store): Likewise.
4295 (emit_ldr): Mention post-index instruction in comment.
4296 (emit_ldrh): New function.
4297 (emit_ldrb): New function.
4298 (emit_ldrsw): Mention post-index instruction in comment.
4299 (emit_str): Likewise.
4300 (emit_subs): New function.
4301 (emit_cmp): Likewise.
4302 (emit_and): Likewise.
4303 (emit_orr): Likewise.
4304 (emit_orn): Likewise.
4305 (emit_eor): Likewise.
4306 (emit_mvn): Likewise.
4307 (emit_lslv): Likewise.
4308 (emit_lsrv): Likewise.
4309 (emit_asrv): Likewise.
4310 (emit_mul): Likewise.
4311 (emit_sbfm): Likewise.
4312 (emit_sbfx): Likewise.
4313 (emit_ubfm): Likewise.
4314 (emit_ubfx): Likewise.
4315 (emit_csinc): Likewise.
4316 (emit_cset): Likewise.
4317 (emit_nop): Likewise.
4318 (emit_ops_insns): New helper function.
4319 (emit_pop): Likewise.
4320 (emit_push): Likewise.
4321 (aarch64_emit_prologue): New function.
4322 (aarch64_emit_epilogue): Likewise.
4323 (aarch64_emit_add): Likewise.
4324 (aarch64_emit_sub): Likewise.
4325 (aarch64_emit_mul): Likewise.
4326 (aarch64_emit_lsh): Likewise.
4327 (aarch64_emit_rsh_signed): Likewise.
4328 (aarch64_emit_rsh_unsigned): Likewise.
4329 (aarch64_emit_ext): Likewise.
4330 (aarch64_emit_log_not): Likewise.
4331 (aarch64_emit_bit_and): Likewise.
4332 (aarch64_emit_bit_or): Likewise.
4333 (aarch64_emit_bit_xor): Likewise.
4334 (aarch64_emit_bit_not): Likewise.
4335 (aarch64_emit_equal): Likewise.
4336 (aarch64_emit_less_signed): Likewise.
4337 (aarch64_emit_less_unsigned): Likewise.
4338 (aarch64_emit_ref): Likewise.
4339 (aarch64_emit_if_goto): Likewise.
4340 (aarch64_emit_goto): Likewise.
4341 (aarch64_write_goto_address): Likewise.
4342 (aarch64_emit_const): Likewise.
4343 (aarch64_emit_call): Likewise.
4344 (aarch64_emit_reg): Likewise.
4345 (aarch64_emit_pop): Likewise.
4346 (aarch64_emit_stack_flush): Likewise.
4347 (aarch64_emit_zero_ext): Likewise.
4348 (aarch64_emit_swap): Likewise.
4349 (aarch64_emit_stack_adjust): Likewise.
4350 (aarch64_emit_int_call_1): Likewise.
4351 (aarch64_emit_void_call_2): Likewise.
4352 (aarch64_emit_eq_goto): Likewise.
4353 (aarch64_emit_ne_goto): Likewise.
4354 (aarch64_emit_lt_goto): Likewise.
4355 (aarch64_emit_le_goto): Likewise.
4356 (aarch64_emit_gt_goto): Likewise.
4357 (aarch64_emit_ge_got): Likewise.
4358 (aarch64_emit_ops_impl): New static global variable.
4359 (aarch64_emit_ops): New target function, return
4360 &aarch64_emit_ops_impl.
4361 (struct linux_target_ops): Install it.
4362
bb903df0
PL
43632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4364
4365 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4366 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4367 aarch64-ipa.o.
4368 * linux-aarch64-ipa.c: New file.
4369 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4370 and endian.h.
4371 (aarch64_get_thread_area): New target method.
4372 (extract_signed_bitfield): New helper function.
4373 (aarch64_decode_ldr_literal): New function.
4374 (enum aarch64_opcodes): New enum.
4375 (struct aarch64_register): New struct.
4376 (struct aarch64_operand): New struct.
4377 (x0): New static global.
4378 (x1): Likewise.
4379 (x2): Likewise.
4380 (x3): Likewise.
4381 (x4): Likewise.
4382 (w2): Likewise.
4383 (ip0): Likewise.
4384 (sp): Likewise.
4385 (xzr): Likewise.
4386 (aarch64_register): New helper function.
4387 (register_operand): Likewise.
4388 (immediate_operand): Likewise.
4389 (struct aarch64_memory_operand): New struct.
4390 (offset_memory_operand): New helper function.
4391 (preindex_memory_operand): Likewise.
4392 (enum aarch64_system_control_registers): New enum.
4393 (ENCODE): New macro.
4394 (emit_insn): New helper function.
4395 (emit_b): New function.
4396 (emit_bcond): Likewise.
4397 (emit_cb): Likewise.
4398 (emit_tb): Likewise.
4399 (emit_blr): Likewise.
4400 (emit_stp): Likewise.
4401 (emit_ldp_q_offset): Likewise.
4402 (emit_stp_q_offset): Likewise.
4403 (emit_load_store): Likewise.
4404 (emit_ldr): Likewise.
4405 (emit_ldrsw): Likewise.
4406 (emit_str): Likewise.
4407 (emit_ldaxr): Likewise.
4408 (emit_stxr): Likewise.
4409 (emit_stlr): Likewise.
4410 (emit_data_processing_reg): Likewise.
4411 (emit_data_processing): Likewise.
4412 (emit_add): Likewise.
4413 (emit_sub): Likewise.
4414 (emit_mov): Likewise.
4415 (emit_movk): Likewise.
4416 (emit_mov_addr): Likewise.
4417 (emit_mrs): Likewise.
4418 (emit_msr): Likewise.
4419 (emit_sevl): Likewise.
4420 (emit_wfe): Likewise.
4421 (append_insns): Likewise.
4422 (can_encode_int32_in): New helper function.
4423 (aarch64_relocate_instruction): New function.
4424 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4425 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4426 (struct linux_target_ops): Install aarch64_get_thread_area,
4427 aarch64_install_fast_tracepoint_jump_pad and
4428 aarch64_get_min_fast_tracepoint_insn_len.
4429
787749ea
PL
44302015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4431
4432 * Makefile.in (aarch64-insn.o): New rule.
4433 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4434
9812b2e6
YQ
44352015-09-21 Yao Qi <yao.qi@linaro.org>
4436
4437 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4438
18fe412b
YQ
44392015-09-21 Yao Qi <yao.qi@linaro.org>
4440
4441 * tracepoint.c (max_jump_pad_size): Remove.
4442
a0cc84cd
YQ
44432015-09-18 Yao Qi <yao.qi@linaro.org>
4444
4445 * linux-aarch64-low.c: Don't include sys/uio.h.
4446 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4447
d78908cf
WW
44482015-09-16 Wei-cheng Wang <cole945@gmail.com>
4449
4450 * tracepoint.c (eval_result_type): Change prototype.
4451 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4452
d57e0d50
PA
44532015-09-15 Pedro Alves <palves@redhat.com>
4454
4455 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4456 Check whether to report exec events instead of checking whether
4457 multiprocess is enabled.
4458
5a676acc
PA
44592015-09-15 Pedro Alves <palves@redhat.com>
4460
4461 PR remote/18965
4462 * remote-utils.c (prepare_resume_reply): Merge
4463 TARGET_WAITKIND_VFORK_DONE switch case with the
4464 TARGET_WAITKIND_FORKED case.
4465
7c5d0fad
YQ
44662015-09-15 Yao Qi <yao.qi@linaro.org>
4467
4468 * server.c (handle_query): Check string comparison using
4469 "else if" instead of "if".
4470
750ce8d1
YQ
44712015-09-15 Yao Qi <yao.qi@linaro.org>
4472
4473 * server.c (vCont_supported): New global variable.
4474 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4475 matches. Append ";vContSupported+" to own_buf.
4476 (handle_v_requests): Append ";s;S" to own_buf if target supports
4477 hardware single step or vCont_supported is false.
4478 (capture_main): Set vCont_supported to zero.
4479
70b90b91
YQ
44802015-09-15 Yao Qi <yao.qi@linaro.org>
4481
4482 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4483 it to ...
4484 (linux_supports_hardware_single_step): ... New function.
4485 (linux_target_ops): Update.
4486 * lynx-low.c (lynx_target_ops): Set field
4487 supports_hardware_single_step to target_can_do_hardware_single_step.
4488 * nto-low.c (nto_target_ops): Likewise.
4489 * spu-low.c (spu_target_ops): Likewise.
4490 * win32-low.c (win32_target_ops): Likewise.
4491 * target.c (target_can_do_hardware_single_step): New function.
4492 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4493 Remove. <supports_hardware_single_step>: New field.
4494 (target_supports_conditional_breakpoints): Remove.
4495 (target_supports_hardware_single_step): New macro.
4496 (target_can_do_hardware_single_step): Declare.
4497 * server.c (handle_query): Use target_supports_hardware_single_step
4498 instead of target_supports_conditional_breakpoints.
4499
ade90bde
YQ
45002015-09-15 Yao Qi <yao.qi@linaro.org>
4501
4502 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4503 function.
4504 (struct linux_target_ops the_low_target): Install
4505 aarch64_linux_siginfo_fixup.
4506
94585166
DB
45072015-09-11 Don Breazeal <donb@codesourcery.com>
4508 Luis Machado <lgustavo@codesourcery.com>
4509
4510 * linux-low.c (linux_mourn): Static declaration.
4511 (linux_arch_setup): Move in front of
4512 handle_extended_wait.
4513 (linux_arch_setup_thread): New function.
4514 (handle_extended_wait): Handle exec events. Call
4515 linux_arch_setup_thread. Make event_lwp argument a
4516 pointer-to-a-pointer.
4517 (check_zombie_leaders): Do not check stopped threads.
4518 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4519 (linux_low_filter_event): Add lwp and thread for exec'ing
4520 non-leader thread if leader thread has been deleted.
4521 Refactor code into linux_arch_setup_thread and call it.
4522 Pass child lwp pointer by reference to handle_extended_wait.
4523 (linux_wait_for_event_filtered): Update comment.
4524 (linux_wait_1): Prevent clobbering exec event status.
4525 (linux_supports_exec_events): New function.
4526 (linux_target_ops) <supports_exec_events>: Initialize new member.
4527 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4528 new member.
4529 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4530 * server.c (report_exec_events): New global variable.
4531 (handle_query): Handle qSupported query for exec-events feature.
4532 (captured_main): Initialize report_exec_events.
4533 * server.h (report_exec_events): Declare new global variable.
4534 * target.h (struct target_ops) <supports_exec_events>: New
4535 member.
4536 (target_supports_exec_events): New macro.
4537 * win32-low.c (win32_target_ops) <supports_exec_events>:
4538 Initialize new member.
4539
0568462b
MM
45402015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4541
4542 * linux-low.c (linux_low_enable_btrace): Remove.
4543 (linux_target_ops): Replace linux_low_enable_btrace with
4544 linux_enable_btrace.
4545
39edd165
YQ
45462015-09-03 Yao Qi <yao.qi@linaro.org>
4547
4548 * linux-aarch64-low.c (aarch64_insert_point): Call
4549 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4550 returns true.
4551
1db33b5a
UW
45522015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4553
4554 * linux-low.c (check_stopped_by_breakpoint): Use
4555 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4556
ab290430
PA
45572015-08-27 Pedro Alves <palves@redhat.com>
4558
4559 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4560
8d749320
SM
45612015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4562
6711b7f8
SM
4563 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4564 the XNEW-family equivalent.
8d749320
SM
4565 (compile_bytecodes): Likewise.
4566 * dll.c (loaded_dll): Likewise.
4567 * event-loop.c (append_callback_event): Likewise.
4568 (create_file_handler): Likewise.
4569 (create_file_event): Likewise.
4570 * hostio.c (handle_open): Likewise.
4571 * inferiors.c (add_thread): Likewise.
4572 (add_process): Likewise.
4573 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4574 * linux-arm-low.c (arm_new_process): Likewise.
4575 (arm_new_thread): Likewise.
4576 * linux-low.c (add_to_pid_list): Likewise.
4577 (linux_add_process): Likewise.
4578 (handle_extended_wait): Likewise.
4579 (add_lwp): Likewise.
4580 (enqueue_one_deferred_signal): Likewise.
4581 (enqueue_pending_signal): Likewise.
4582 (linux_resume_one_lwp_throw): Likewise.
4583 (linux_resume_one_thread): Likewise.
4584 (linux_read_memory): Likewise.
4585 (linux_write_memory): Likewise.
4586 * linux-mips-low.c (mips_linux_new_process): Likewise.
4587 (mips_linux_new_thread): Likewise.
4588 (mips_add_watchpoint): Likewise.
4589 * linux-x86-low.c (initialize_low_arch): Likewise.
4590 * lynx-low.c (lynx_add_process): Likewise.
4591 * mem-break.c (set_raw_breakpoint_at): Likewise.
4592 (set_breakpoint): Likewise.
4593 (add_condition_to_breakpoint): Likewise.
4594 (add_commands_to_breakpoint): Likewise.
4595 (clone_agent_expr): Likewise.
4596 (clone_one_breakpoint): Likewise.
4597 * regcache.c (new_register_cache): Likewise.
4598 * remote-utils.c (look_up_one_symbol): Likewise.
4599 * server.c (queue_stop_reply): Likewise.
4600 (start_inferior): Likewise.
4601 (queue_stop_reply_callback): Likewise.
4602 (handle_target_event): Likewise.
4603 * spu-low.c (fetch_ppc_memory): Likewise.
4604 (store_ppc_memory): Likewise.
4605 * target.c (set_target_ops): Likewise.
4606 * thread-db.c (thread_db_load_search): Likewise.
4607 (try_thread_db_load_1): Likewise.
4608 * tracepoint.c (add_tracepoint): Likewise.
4609 (add_tracepoint_action): Likewise.
4610 (create_trace_state_variable): Likewise.
4611 (cmd_qtdpsrc): Likewise.
4612 (cmd_qtro): Likewise.
4613 (add_while_stepping_state): Likewise.
4614 * win32-low.c (child_add_thread): Likewise.
4615 (get_image_name): Likewise.
4616
ed8b7b42
YQ
46172015-08-25 Yao Qi <yao.qi@linaro.org>
4618
4619 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4620
db3cb7cb
YQ
46212015-08-25 Yao Qi <yao.qi@linaro.org>
4622
4623 * Makefile.in (aarch64-linux.o): New rule.
4624 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4625 srv_tgtobj.
4626 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4627 (aarch64_init_debug_reg_state): Make it extern.
4628 (aarch64_linux_prepare_to_resume): Remove.
4629
f6011a1c
YQ
46302015-08-25 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4633 lwp_arch_private_info and ptid_of_lwp.
4634
88e2cf7e
YQ
46352015-08-25 Yao Qi <yao.qi@linaro.org>
4636
4637 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4638 Find proc_info by find_process_pid. All callers updated.
4639
5e35436e
YQ
46402015-08-25 Yao Qi <yao.qi@linaro.org>
4641
4642 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4643 Remove.
4644 (debug_reg_change_callback): Remove.
4645 (aarch64_notify_debug_reg_change): Remove.
4646
4a8a7965
YQ
46472015-08-25 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4650 Call current_lwp_ptid.
4651
32a271ee
YQ
46522015-08-25 Yao Qi <yao.qi@linaro.org>
4653
4654 * linux-aarch64-low.c (debug_reg_change_callback): Use
4655 debug_printf.
4656
0d51c8d7
YQ
46572015-08-25 Yao Qi <yao.qi@linaro.org>
4658
4659 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4660
31a43dd5
YQ
46612015-08-25 Yao Qi <yao.qi@linaro.org>
4662
4663 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4664
8ee52567
YQ
46652015-08-25 Yao Qi <yao.qi@linaro.org>
4666
4667 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4668 the code.
4669
ff3f0f45
YQ
46702015-08-25 Yao Qi <yao.qi@linaro.org>
4671
4672 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4673 Remove.
4674 (debug_reg_change_callback): Remove argument entry and add argument
4675 lwp. Remove local variable thread. Don't print thread id in the
4676 debugging output. Don't check whether pid of thread equals to pid.
4677 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4678 iterate_over_lwps instead find_inferior.
4679
3d40fbb5
PA
46802015-08-24 Pedro Alves <palves@redhat.com>
4681
4682 * inferiors.c (get_first_process): New function.
4683 * inferiors.h (get_first_process): New declaration.
4684 * remote-utils.c (read_ptid): Default to the first process in the
4685 list, instead of to the current thread's process.
4686
438e1e42
PA
46872015-08-24 Pedro Alves <palves@redhat.com>
4688
4689 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4690 * event-loop.c: Likewise.
4691 * remote-utils.c: Likewise.
4692 * tracepoint.c: Likewise.
4693
a8c6d4fc
PA
46942015-08-24 Pedro Alves <palves@redhat.com>
4695
4696 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4697 ptid_get_lwp.
4698
99b0bb12
PA
46992015-08-21 Pedro Alves <palves@redhat.com>
4700
4701 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4702 instead of literal 1.
4703
f8904751
PA
47042015-08-21 Pedro Alves <palves@redhat.com>
4705
4706 * tdesc.c (default_description): Explicitly zero-initialize.
4707
465a859e
PA
47082015-08-21 Pedro Alves <palves@redhat.com>
4709
4710 PR gdb/18749
4711 * inferiors.c (remove_thread): Discard any pending stop reply for
4712 this thread.
4713 * server.c (remove_all_on_match_pid): Rename to ...
4714 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4715 instead of a pid.
4716 (discard_queued_stop_replies): Change parameter to a ptid. Now
4717 extern.
4718 (handle_v_kill, kill_inferior_callback, captured_main)
4719 (process_serial_event): Adjust.
4720 * server.h (discard_queued_stop_replies): Declare.
4721
f0db101d
PA
47222015-08-21 Pedro Alves <palves@redhat.com>
4723
4724 * linux-low.c (wait_for_sigstop): Always switch to no thread
4725 selected if the previously current thread dies.
4726 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4727 process instead of the current thread's.
4728 * remote-utils.c (input_interrupt): Don't check if there's no
4729 current thread.
4730 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4731 current thread to the general thread fails, error out.
4732 (handle_qxfer_auxv, handle_qxfer_libraries)
4733 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4734 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4735 (handle_query): Check if there's a thread selected instead of
4736 checking whether there's any thread in the thread list.
4737 (handle_qxfer_threads, handle_qxfer_btrace)
4738 (handle_qxfer_btrace_conf): Don't error out early if there's no
4739 thread in the thread list.
4740 (handle_v_cont, myresume): Don't set the current thread to the
4741 continue thread.
4742 (process_serial_event) <Hg handling>: Also set thread_id if the
4743 previous general thread is still alive.
4744 (process_serial_event) <g/G handling>: If setting the current
4745 thread to the general thread fails, error out.
4746 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4747 thread's lwp instead of the current thread's.
4748 * target.c (set_desired_thread): If the desired thread was not
4749 found, leave the current thread pointing to NULL. Return an int
4750 (boolean) indicating success.
4751 * target.h (set_desired_thread): Change return type to int.
4752
40045d91
MF
47532015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4754
4755 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4756 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4757 #includes.
4758 (ps_get_thread_area): New function.
4759
45face3b
GB
47602015-08-19 Gary Benson <gbenson@redhat.com>
4761
4762 * hostio.c (handle_pread): Do not attempt to read more data
4763 than hostio_reply_with_data can fit in a packet.
4764
16d5f642
JB
47652015-08-18 Joel Brobecker <brobecker@adacore.com>
4766
4767 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4768
a738da3a
MF
47692015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4770
4771 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4772
33ebda9d
PA
47732015-08-06 Pedro Alves <palves@redhat.com>
4774
4775 * tracepoint.c (expr_eval_result): Now an int.
4776
a44892be
PA
47772015-08-06 Pedro Alves <palves@redhat.com>
4778
4779 * gdbthread.h (struct regcache): Forward declare.
4780 (struct thread_info) <regcache_data>: Now a struct regcache
4781 pointer.
4782 * inferiors.c (inferior_regcache_data)
4783 (set_inferior_regcache_data): Now work with struct regcache
4784 pointers.
4785 * inferiors.h (struct regcache): Forward declare.
4786 (inferior_regcache_data, set_inferior_regcache_data): Now work
4787 with struct regcache pointers.
4788 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4789 (free_register_cache_thread): Remove struct regcache pointer
4790 casts.
4791
608a1e46
PA
47922015-08-06 Pedro Alves <palves@redhat.com>
4793
4794 * server.c (captured_main): On error, print the exception message
4795 to stderr, and if run_once is set, throw a quit.
4796
f0ce0d3a
PA
47972015-08-06 Pedro Alves <palves@redhat.com>
4798
4799 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4800 the current thread.
4801
bf47e248
PA
48022015-08-06 Pedro Alves <palves@redhat.com>
4803
4804 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4805 reading beyond the passed in buffer length.
4806
b6b9ffcc
PL
48072015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4808
4809 * tracepoint.c (symbol_list) <required>: Remove.
4810
863d01bd
PA
48112015-08-06 Pedro Alves <palves@redhat.com>
4812
4813 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4814 count if stopping and suspending threads.
4815 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4816 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4817 (linux_detach): Complete an ongoing step-over.
4818 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4819 throughout.
4820 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4821 (linux_wait_1): If passing a signal to the inferior after
4822 finishing a step-over, unsuspend and re-resume all lwps. If we
4823 see a single-step event but the thread should be continuing, don't
4824 pass the trap to gdb.
4825 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4826 internal_error instead of gdb_assert.
4827 (enqueue_pending_signal): New function.
4828 (check_ptrace_stopped_lwp_gone): Add debug output.
4829 (start_step_over): Use internal_error instead of gdb_assert.
4830 (complete_ongoing_step_over): New function.
4831 (linux_resume_one_thread): Don't resume a suspended thread.
4832 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4833 it stepping.
4834
00db26fa
PA
48352015-08-06 Pedro Alves <palves@redhat.com>
4836
4837 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4838 (linux_thread_alive): Use lwp_is_marked_dead.
4839 (extended_event_reported): Delete.
4840 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4841 instead of extended_event_reported.
4842 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4843 as well.
4844 (lwp_is_marked_dead): New function.
4845 (lwp_running): Use lwp_is_marked_dead.
4846 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4847 comment.
4848
ad071a30
PA
48492015-08-06 Pedro Alves <palves@redhat.com>
4850
4851 * linux-low.c (linux_wait_1): Move fork event output out of the
4852 !report_to_gdb check. Pass event_child->waitstatus to
4853 target_waitstatus_to_string instead of ourstatus.
4854
524b57e6
YQ
48552015-08-04 Yao Qi <yao.qi@linaro.org>
4856
4857 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4858 if current_thread is 32 bit.
4859
6085d6f6
YQ
48602015-08-04 Yao Qi <yao.qi@linaro.org>
4861
4862 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4863 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4864 * server.c (extended_protocol): Remove "static".
4865 * server.h (extended_protocol): Declare it.
4866
8a7e4587
YQ
48672015-08-04 Yao Qi <yao.qi@linaro.org>
4868
4869 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4870 both aarch64 and aarch32.
4871 (aarch64_set_pc): Likewise.
4872
3b53ae99
YQ
48732015-08-04 Yao Qi <yao.qi@linaro.org>
4874
4875 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4876 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4877 arm-with-neon.xml to srv_xmlfiles.
4878 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4879 (is_64bit_tdesc): New function.
4880 (aarch64_linux_read_description): New function.
4881 (aarch64_arch_setup): Call aarch64_linux_read_description.
4882 (regs_info): Rename to regs_info_aarch64.
4883 (aarch64_regs_info): Return right regs_info.
4884 (initialize_low_arch): Call initialize_low_arch_aarch32.
4885
bd9e6534
YQ
48862015-08-04 Yao Qi <yao.qi@linaro.org>
4887
4888 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4889 * linux-aarch32-low.c: New file.
4890 * linux-aarch32-low.h: New file.
4891 * linux-arm-low.c (arm_fill_gregset): Move it to
4892 linux-aarch32-low.c.
4893 (arm_store_gregset): Likewise.
4894 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4895 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4896 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4897 (regs_info): Rename to regs_info_arm.
4898 (arm_regs_info): Return regs_info_aarch32 if
4899 have_ptrace_getregset is 1 and target description is
4900 arm_with_neon or arm_with_vfpv3.
4901 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4902 Call initialize_low_arch_aarch32 instead.
4903
ded48a5e
YQ
49042015-08-04 Yao Qi <yao.qi@linaro.org>
4905
4906 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4907 * linux-low.c: ... here.
4908 * linux-low.h (have_ptrace_getregset): Declare it.
4909
96e9210f
PA
49102015-08-04 Pedro Alves <palves@redhat.com>
4911
4912 * thread-db.c (struct thread_db): Use new typedefs.
4913 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4914 CHK calls.
4915 (disable_thread_event_reporting): Cast result of dlsym to
4916 destination function pointer type.
4917 (thread_db_mourn): Use td_ta_delete_ftype.
4918
af60a1ef
SL
49192015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4920
4921 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4922 arch variant.
4923 (CDX_BREAKPOINT): Define for R2.
4924 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4925 (the_low_target): Add comments.
4926
e8b41681
YQ
49272015-07-30 Yao Qi <yao.qi@linaro.org>
4928
4929 * linux-arm-low.c (arm_hwcap): Remove it.
4930 (arm_read_description): New local variable arm_hwcap. Don't
4931 set arm_hwcap to zero.
4932
89abb039
YQ
49332015-07-30 Yao Qi <yao.qi@linaro.org>
4934
4935 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4936 Use regcache->tdesc instead.
4937 (arm_store_wmmxregset): Likewise.
4938 (arm_fill_vfpregset): Likewise.
4939 (arm_store_vfpregset): Likewise.
4940
deca266c
YQ
49412015-07-30 Yao Qi <yao.qi@linaro.org>
4942
4943 * linux-arm-low.c: Include arch/arm.h.
4944 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4945 (arm_store_gregset): Likewise.
4946
aa58a496
SM
49472015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4948
4949 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4950 ptrace's 4th parameter.
4951
50904b25
YQ
49522015-07-27 Yao Qi <yao.qi@linaro.org>
4953
4954 * configure.srv (case aarch64*-*-linux*): Don't set
4955 srv_linux_usrregs.
4956
5826e159
PA
49572015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4958
4959 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4960 sys/ptrace.h.
4961 * linux-arm-low.c: Likewise.
4962 * linux-cris-low.c: Likewise.
4963 * linux-crisv32-low.c: Likewise.
4964 * linux-low.c: Likewise.
4965 * linux-m68k-low.c: Likewise.
4966 * linux-mips-low.c: Likewise.
4967 * linux-nios2-low.c: Likewise.
4968 * linux-s390-low.c: Likewise.
4969 * linux-sparc-low.c: Likewise.
4970 * linux-tic6x-low.c: Likewise.
4971 * linux-tile-low.c: Likewise.
4972 * linux-x86-low.c: Likewise.
4973
54019719
PA
49742015-07-24 Pedro Alves <palves@redhat.com>
4975
4976 * config.in: Regenerate.
4977 * configure: Regenerate.
4978
eb7aa561
PA
49792015-07-24 Pedro Alves <palves@redhat.com>
4980
4981 * acinclude.m4: Include ../ptrace.m4.
4982 * configure.ac: Call GDB_AC_PTRACE.
4983 * config.in, configure: Regenerate.
4984
55d7b841
YQ
49852015-07-24 Yao Qi <yao.qi@linaro.org>
4986
4987 * linux-low.c (linux_create_inferior): Remove setting to
4988 proc->priv->new_inferior.
4989 (linux_attach): Likewise.
4990 (linux_low_filter_event): Likewise.
4991 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4992
c06cbd92
YQ
49932015-07-24 Yao Qi <yao.qi@linaro.org>
4994
4995 * linux-low.c (linux_arch_setup): New function.
4996 (linux_low_filter_event): If proc->tdesc is NULL and
4997 proc->attached is true, call the_low_target.arch_setup.
4998 Otherwise, keep status pending, and return.
4999 (linux_resume_one_lwp_throw): Don't call get_pc if
5000 thread->while_stepping isn't NULL. Don't call
5001 get_thread_regcache if proc->tdesc is NULL.
5002 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5003 (linux_target_ops): Install arch_setup.
5004 * server.c (start_inferior): Call the_target->arch_setup.
5005 * target.h (struct target_ops) <arch_setup>: New field.
5006 (target_arch_setup): New marco.
5007 * lynx-low.c (lynx_target_ops): Update.
5008 * nto-low.c (nto_target_ops): Update.
5009 * spu-low.c (spu_target_ops): Update.
5010 * win32-low.c (win32_target_ops): Update.
5011
5ae3ebba
YQ
50122015-07-24 Yao Qi <yao.qi@linaro.org>
5013
5014 * linux-low.c (linux_add_process): Don't set
5015 proc->priv->new_inferior.
5016 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5017 (linux_attach): Likewise.
5018
eb97750b
YQ
50192015-07-24 Yao Qi <yao.qi@linaro.org>
5020
5021 * server.c (start_inferior): Code refactor.
5022
51aee833
YQ
50232015-07-24 Yao Qi <yao.qi@linaro.org>
5024
5025 * server.c (process_serial_event): Set general_thread.
5026
af1b22f3
YQ
50272015-07-21 Yao Qi <yao.qi@linaro.org>
5028
5029 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5030 aarch64_linux_get_debug_reg_capacity.
5031
554717a3
YQ
50322015-07-17 Yao Qi <yao.qi@linaro.org>
5033
5034 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5035 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5036 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5037 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5038 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5039 (AARCH64_HWP_ALIGNMENT): Likewise.
5040 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5041 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5042 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5043 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5044 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5045 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5046 (struct aarch64_debug_reg_state): Likewise.
5047 (struct arch_lwp_info): Likewise.
5048 (aarch64_align_watchpoint): Likewise.
5049 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5050 (aarch64_watchpoint_length): Likewise.
5051 (aarch64_point_encode_ctrl_reg): Likewise
5052 (aarch64_point_is_aligned): Likewise.
5053 (aarch64_align_watchpoint): Likewise.
5054 (aarch64_linux_set_debug_regs):
5055 (aarch64_dr_state_insert_one_point): Likewise.
5056 (aarch64_dr_state_remove_one_point): Likewise.
5057 (aarch64_handle_breakpoint): Likewise.
5058 (aarch64_handle_aligned_watchpoint): Likewise.
5059 (aarch64_handle_unaligned_watchpoint): Likewise.
5060 (aarch64_handle_watchpoint): Likewise.
5061
c67ca4de
YQ
50622015-07-17 Yao Qi <yao.qi@linaro.org>
5063
5064 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5065 and don't aarch64_get_debug_reg_state. All callers update.
5066 (aarch64_handle_aligned_watchpoint): Likewise.
5067 (aarch64_handle_unaligned_watchpoint): Likewise.
5068 (aarch64_handle_watchpoint): Likewise.
5069 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5070 (aarch64_remove_point): Likewise.
5071
25abf979
YQ
50722015-07-17 Yao Qi <yao.qi@linaro.org>
5073
5074 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5075 debug_printf.
5076 (aarch64_handle_unaligned_watchpoint): Likewise.
5077
db1ff28b
JK
50782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5079
5080 Revert the previous 3 commits:
5081 Move gdb_regex* to common/
5082 Move linux_find_memory_regions_full & co.
5083 gdbserver build-id attribute generator
5084
700ca40f
JK
50852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5086 Jan Kratochvil <jan.kratochvil@redhat.com>
5087
5088 gdbserver build-id attribute generator.
5089 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5090 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5091 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5092 (find_phdr): New.
5093 (get_dynamic): Use find_pdhr to traverse program headers.
5094 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5095 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5096 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5097 (get_hex_build_id): New.
5098 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5099 to reply XML document.
5100
9904185c
JK
51012015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5102 Jan Kratochvil <jan.kratochvil@redhat.com>
5103
5104 * target.c: Include target/target-utils.h and fcntl.h.
5105 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5106 (target_fileio_read_stralloc): New functions.
5107
6e5b4429
JK
51082015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5109
5110 * Makefile.in (OBS): Add gdb_regex.o.
5111 (gdb_regex.o): New.
5112 * config.in: Rebuilt.
5113 * configure: Rebuilt.
5114
ddc98fbf
JK
51152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5116 Jan Kratochvil <jan.kratochvil@redhat.com>
5117
5118 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5119 * Makefile.in (OBS): Add target-utils.o.
5120 (linux-maps.o, target-utils.o): New.
5121 * configure.srv (srv_linux_obj): Add linux-maps.o.
5122
e57bb7a0
PL
51232015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5124
5125 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5126 function, return 1.
5127 (the_low_target): Install it.
5128
586b02a9
PA
51292015-07-14 Pedro Alves <palves@redhat.com>
5130
5131 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5132 Instead, ignore ECHILD, and throw an error for other errnos.
5133
58c1b36c
PA
51342015-07-10 Pedro Alves <palves@redhat.com>
5135
5136 * event-loop.c (struct callback_event) <data>: Change type to
5137 gdb_client_data instance instead of gdb_client_data pointer.
5138 (append_callback_event): Adjust.
5139
421530db
PL
51402015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5141
5142 * linux-aarch64-low.c: Add comments for each linux_target_ops
5143 method. Remove comments already covered in target_ops and
5144 linux_target_ops definitions.
5145 (the_low_target): Add comments for each unimplemented method.
5146
c2d65f38
YQ
51472015-07-09 Yao Qi <yao.qi@linaro.org>
5148
5149 * linux-aarch64-low.c (aarch64_regmap): Remove.
5150 (aarch64_usrregs_info): Remove.
5151 (regs_info): Set field usrregs to NULL.
5152
b20a6524
MM
51532015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5154
5155 * linux-low.c: Include "rsp-low.h"
5156 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5157 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5158 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5159 (handle_btrace_enable_pt): New.
5160 (handle_btrace_general_set): Support "pt".
5161 (handle_btrace_conf_general_set): Support "pt:size".
5162
96c97461
PL
51632015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5164
5165 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5166 Z_PACKET_SW_BP.
5167
37d66942
PL
51682015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5169
5170 * linux-aarch64-low.c: Remove comment about endianness.
5171 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5172 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5173 memcmp.
5174
dc06243f
GB
51752015-06-24 Gary Benson <gbenson@redhat.com>
5176
5177 * linux-i386-ipa.c (stdint.h): Do not include.
5178 * lynx-i386-low.c (stdint.h): Likewise.
5179 * lynx-ppc-low.c (stdint.h): Likewise.
5180 * mem-break.c (stdint.h): Likewise.
5181 * thread-db.c (stdint.h): Likewise.
5182 * tracepoint.c (stdint.h): Likewise.
5183 * win32-low.c (stdint.h): Likewise.
5184
124e13d9
SM
51852015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5186
5187 * server.c (write_qxfer_response): Update call to
5188 remote_escape_output.
5189
909c2cda
JK
51902015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5191 Jan Kratochvil <jan.kratochvil@redhat.com>
5192
5193 Merge multiple hex conversions.
5194 * gdbreplay.c (tohex): Rename to 'fromhex'.
5195 (logchar): Use fromhex.
5196
24c05f46
JK
51972015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5198
5199 * server.c (handle_qxfer_libraries): Set `version' attribute for
5200 <library-list>.
5201
14d2069a
GB
52022015-06-10 Gary Benson <gbenson@redhat.com>
5203
5204 * target.h (struct target_ops) <multifs_open>: New field.
5205 <multifs_unlink>: Likewise.
5206 <multifs_readlink>: Likewise.
5207 * linux-low.c (nat/linux-namespaces.h): New include.
5208 (linux_target_ops): Initialize the_target->multifs_open,
5209 the_target->multifs_unlink and the_target->multifs_readlink.
5210 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5211 * hostio.c (hostio_fs_pid): New static variable.
5212 (hostio_handle_new_gdb_connection): New function.
5213 (handle_setfs): Likewise.
5214 (handle_open): Use the_target->multifs_open as appropriate.
5215 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5216 (handle_readlink): Use the_target->multifs_readlink as
5217 appropriate.
5218 (handle_vFile): Handle vFile:setfs packets.
5219 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5220 after target_handle_new_gdb_connection.
5221
4b8b5e72
GB
52222015-06-10 Gary Benson <gbenson@redhat.com>
5223
5224 * configure.ac (AC_CHECK_FUNCS): Add setns.
5225 * config.in: Regenerate.
5226 * configure: Likewise.
5227 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5228 (linux-namespaces.o): New rule.
5229 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5230
3ac2e371
GB
52312015-06-09 Gary Benson <gbenson@redhat.com>
5232
5233 * hostio.c (handle_open): Process mode argument with
5234 fileio_to_host_mode.
5235
ca9b78ce
YQ
52362015-06-01 Yao Qi <yao.qi@linaro.org>
5237
5238 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5239 * linux-x86-low.c: Likewise.
5240
bfacd19d
DB
52412015-05-28 Don Breazeal <donb@codesourcery.com>
5242
5243 * linux-low.c (handle_extended_wait): Initialize
5244 thread_info.last_resume_kind for new fork children.
5245
452003ef
PA
52462015-05-15 Pedro Alves <palves@redhat.com>
5247
5248 * target.h (target_handle_new_gdb_connection): Rewrite using if
5249 wrapped in do/while.
5250
1041a03c
JB
52512015-05-14 Joel Brobecker <brobecker@adacore.com>
5252
5253 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5254 * configure, config.in: Regenerate.
5255 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5256 Declare typedef.
5257
c269dbdb
DB
52582015-05-12 Don Breazeal <donb@codesourcery.com>
5259
5260 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5261 PTRACE_EVENT_VFORK_DONE.
5262 (linux_low_ptrace_options, extended_event_reported): Add vfork
5263 events.
5264 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5265 and "vforkdone" for RSP 'T' Stop Reply Packet.
5266 * server.h (report_vfork_events): Declare
5267 global variable.
5268
3a8a0396
DB
52692015-05-12 Don Breazeal <donb@codesourcery.com>
5270
5271 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5272 (the_low_target) <new_fork>: Initialize new member.
5273 * linux-arm-low.c (arm_new_fork): New function.
5274 (the_low_target) <new_fork>: Initialize new member.
5275 * linux-low.c (handle_extended_wait): Call new target function
5276 new_fork.
5277 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5278 * linux-mips-low.c (mips_add_watchpoint): New function
5279 extracted from mips_insert_point.
5280 (the_low_target) <new_fork>: Initialize new member.
5281 (mips_linux_new_fork): New function.
5282 (mips_insert_point): Call mips_add_watchpoint.
5283 * linux-x86-low.c (x86_linux_new_fork): New function.
5284 (the_low_target) <new_fork>: Initialize new member.
5285
de0d863e
DB
52862015-05-12 Don Breazeal <donb@codesourcery.com>
5287
5288 * linux-low.c (handle_extended_wait): Implement return value,
5289 rename argument 'event_child' to 'event_lwp', handle
5290 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5291 (linux_low_ptrace_options): New function.
5292 (linux_low_filter_event): Call linux_low_ptrace_options,
5293 use different argument fo linux_enable_event_reporting,
5294 use return value from handle_extended_wait.
5295 (extended_event_reported): New function.
5296 (linux_wait_1): Call extended_event_reported and set
5297 status to report fork events.
5298 (linux_write_memory): Add pid to debug message.
5299 (reset_lwp_ptrace_options_callback): New function.
5300 (linux_handle_new_gdb_connection): New function.
5301 (linux_target_ops): Initialize new structure member.
5302 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5303 * lynx-low.c: Initialize new structure member.
5304 * remote-utils.c (prepare_resume_reply): Implement stop reason
5305 "fork" for "T" stop message.
5306 * server.c (handle_query): Call handle_new_gdb_connection.
5307 * server.h (report_fork_events): Declare global flag.
5308 * target.h (struct target_ops) <handle_new_gdb_connection>:
5309 New member.
5310 (target_handle_new_gdb_connection): New macro.
5311 * win32-low.c: Initialize new structure member.
5312
ddcbc397
DB
53132015-05-12 Don Breazeal <donb@codesourcery.com>
5314
5315 * mem-break.c (APPEND_TO_LIST): Define macro.
5316 (clone_agent_expr): New function.
5317 (clone_one_breakpoint): New function.
5318 (clone_all_breakpoints): New function.
5319 * mem-break.h: Declare new functions.
5320
89245bc0
DB
53212015-05-12 Don Breazeal <donb@codesourcery.com>
5322
5323 * linux-low.c (linux_supports_fork_events): New function.
5324 (linux_supports_vfork_events): New function.
5325 (linux_target_ops): Initialize new structure members.
5326 (initialize_low): Call linux_check_ptrace_features.
5327 * lynx-low.c (lynx_target_ops): Initialize new structure
5328 members.
5329 * server.c (report_fork_events, report_vfork_events):
5330 New global flags.
5331 (handle_query): Add new features to qSupported packet and
5332 response.
5333 (captured_main): Initialize new global variables.
5334 * target.h (struct target_ops) <supports_fork_events>:
5335 New member.
5336 <supports_vfork_events>: New member.
5337 (target_supports_fork_events): New macro.
5338 (target_supports_vfork_events): New macro.
5339 * win32-low.c (win32_target_ops): Initialize new structure
5340 members.
5341
835205d0
GB
53422015-05-12 Gary Benson <gbenson@redhat.com>
5343
5344 * server.c (handle_qxfer_exec_file): Use current process
5345 if annex is empty.
5346
21e94bd9
SL
53472015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5348
5349 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5350 Remove HAVE_PTRACE_GETREGS conditionals.
5351 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5352 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5353
45614f15
YQ
53542015-05-08 Yao Qi <yao.qi@linaro.org>
5355
5356 * linux-low.c (linux_supports_conditional_breakpoints): New
5357 function.
5358 (linux_target_ops): Install new target method.
5359 * lynx-low.c (lynx_target_ops): Install NULL hook for
5360 supports_conditional_breakpoints.
5361 * nto-low.c (nto_target_ops): Likewise.
5362 * spu-low.c (spu_target_ops): Likewise.
5363 * win32-low.c (win32_target_ops): Likewise.
5364 * server.c (handle_query): Check
5365 target_supports_conditional_breakpoints.
5366 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5367 New field.
5368 (target_supports_conditional_breakpoints): New macro.
5369
80ad801e
PA
53702015-05-06 Pedro Alves <palves@redhat.com>
5371
5372 PR server/18081
5373 * server.c (start_inferior): If the process exits, mourn it.
5374
819843c7
GB
53752015-04-21 Gary Benson <gbenson@redhat.com>
5376
5377 * hostio.c (fileio_open_flags_to_host): Factored out to
5378 fileio_to_host_openflags in common/fileio.c. Single use
5379 updated.
5380
a2d5a9d7
MF
53812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5382
5383 * linux-xtensa-low.c (xtensa_fill_gregset)
5384 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5385 XCHAL_HAVE_LOOP.
5386
deb44829
MF
53872015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5388
5389 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5390 (regs_info): Replace usrregs pointer with NULL.
5391
e57f1de3
GB
53922015-04-17 Gary Benson <gbenson@redhat.com>
5393
5394 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5395 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5396 * server.c (handle_qxfer_exec_file): New function.
5397 (qxfer_packets): Add exec-file entry.
5398 (handle_query): Report qXfer:exec-file:read as supported packet.
5399
62828379
RN
54002015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5401
5402 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5403
b88bb450
GB
54042015-04-09 Gary Benson <gbenson@redhat.com>
5405
5406 * hostio-errno.c (errno_to_fileio_error): Remove function.
5407 Update caller to use remote_fileio_to_fio_error.
5408
c8f4bfdd
YQ
54092015-04-09 Yao Qi <yao.qi@linaro.org>
5410
5411 * linux-low.c (linux_insert_point): Call
5412 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5413 (linux_remove_point): Call remove_memory_breakpoint if type is
5414 raw_bkpt_type_sw.
5415 * linux-x86-low.c (x86_insert_point): Don't call
5416 insert_memory_breakpoint.
5417 (x86_remove_point): Don't call remove_memory_breakpoint.
5418
41f98f02
PA
54192015-04-01 Pedro Alves <palves@redhat.com>
5420 Cleber Rosa <crosa@redhat.com>
5421
5422 * server.c (gdbserver_usage): Reorganize and extend the usage
5423 message.
5424
2bf6fb9d
PA
54252015-03-24 Pedro Alves <palves@redhat.com>
5426
5427 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5428 output. Also dump TRAP_TRACE.
5429 (linux_low_filter_event): In debug output, distinguish a
5430 resume_stop SIGSTOP from a delayed SIGSTOP.
5431
369f6daa
GB
54322015-03-24 Gary Benson <gbenson@redhat.com>
5433
5434 * linux-x86-low.c (x86_linux_new_thread): Moved to
5435 nat/x86-linux.c.
5436 (x86_linux_prepare_to_resume): Likewise.
5437
8e5d4070
GB
54382015-03-24 Gary Benson <gbenson@redhat.com>
5439
5440 * Makefile.in (x86-linux-dregs.o): New rule.
5441 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5442 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5443 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5444 (x86_linux_dr_get): Likewise.
5445 (x86_linux_dr_set): Likewise.
5446 (update_debug_registers_callback): Likewise.
5447 (x86_linux_dr_set_addr): Likewise.
5448 (x86_linux_dr_get_addr): Likewise.
5449 (x86_linux_dr_set_control): Likewise.
5450 (x86_linux_dr_get_control): Likewise.
5451 (x86_linux_dr_get_status): Likewise.
5452 (x86_linux_update_debug_registers): Likewise.
5453
2b95d440
GB
54542015-03-24 Gary Benson <gbenson@redhat.com>
5455
5456 * linux-x86-low.c (x86_linux_update_debug_registers):
5457 New function, factored out from...
5458 (x86_linux_prepare_to_resume): ...this.
5459
14b0bc68
GB
54602015-03-24 Gary Benson <gbenson@redhat.com>
5461
5462 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5463 (x86_linux_dr_set): Likewise.
5464 (update_debug_registers_callback): Likewise.
5465 (x86_linux_dr_set_addr): Likewise.
5466 (x86_linux_dr_get_addr): Likewise.
5467 (x86_linux_dr_set_control): Likewise.
5468 (x86_linux_dr_get_control): Likewise.
5469 (x86_linux_dr_get_status): Likewise.
5470 (x86_linux_prepare_to_resume): Likewise.
5471
5dfe6ca8
GB
54722015-03-24 Gary Benson <gbenson@redhat.com>
5473
5474 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5475 Use perror_with_name. Pass string through gettext.
5476 (x86_linux_dr_set): Likewise.
5477
d33472ad
GB
54782015-03-24 Gary Benson <gbenson@redhat.com>
5479
5480 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5481 (x86_linux_dr_set_addr): ...this.
5482 (x86_dr_low_get_addr): Rename to...
5483 (x86_linux_dr_get_addr): ...this.
5484 (x86_dr_low_set_control): Rename to...
5485 (x86_linux_dr_set_control): ...this.
5486 (x86_dr_low_get_control): Rename to...
5487 (x86_linux_dr_get_control): ...this.
5488 (x86_dr_low_get_status): Rename to...
5489 (x86_linux_dr_get_status): ...this.
5490 (x86_dr_low): Update with new function names.
5491
4b134ca1
GB
54922015-03-24 Gary Benson <gbenson@redhat.com>
5493
5494 * Makefile.in (x86-linux.o): New rule.
5495 * configure.srv: Add x86-linux.o to relevant targets.
5496 * linux-low.c (lwp_set_arch_private_info): New function.
5497 (lwp_arch_private_info): Likewise.
5498 * linux-x86-low.c: Include nat/x86-linux.h.
5499 (arch_lwp_info): Removed structure.
5500 (update_debug_registers_callback):
5501 Use lwp_set_debug_registers_changed.
5502 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5503 and lwp_set_debug_registers_changed.
5504 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5505
34c703da
GB
55062015-03-24 Gary Benson <gbenson@redhat.com>
5507
5508 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5509 * linux-arm-low.c (arm_new_thread): Likewise.
5510 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5511 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5512 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5513 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5514
cff068da
GB
55152015-03-24 Gary Benson <gbenson@redhat.com>
5516
5517 * linux-low.c (ptid_of_lwp): New function.
5518 (lwp_is_stopped): Likewise.
5519 (lwp_stop_reason): Likewise.
5520 * linux-x86-low.c (update_debug_registers_callback):
5521 Use lwp_is_stopped.
5522 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5523 lwp_stop_reason.
5524
b2f7c7e8
GB
55252015-03-24 Gary Benson <gbenson@redhat.com>
5526
5527 * linux-low.h (linux_stop_lwp): Remove declaration.
5528
6d4ee8c6
GB
55292015-03-24 Gary Benson <gbenson@redhat.com>
5530
5531 * linux-low.h: Include nat/linux-nat.h.
5532 * linux-low.c (iterate_over_lwps_args): New structure.
5533 (iterate_over_lwps_filter): New function.
5534 (iterate_over_lwps): Likewise.
5535 * linux-x86-low.c (update_debug_registers_callback):
5536 Update signature to what iterate_over_lwps expects.
5537 Remove PID check that iterate_over_lwps now performs.
5538 (x86_dr_low_set_addr): Use iterate_over_lwps.
5539 (x86_dr_low_set_control): Likewise.
5540
70a0bb6b
GB
55412015-03-24 Gary Benson <gbenson@redhat.com>
5542
5543 * linux-x86-low.c (x86_debug_reg_state): New function.
5544 (x86_linux_prepare_to_resume): Use the above.
5545
7b669087
GB
55462015-03-24 Gary Benson <gbenson@redhat.com>
5547
5548 * linux-low.c (current_lwp_ptid): New function.
5549 * linux-x86-low.c: Include nat/linux-nat.h.
5550 (x86_dr_low_get_addr): Use current_lwp_ptid.
5551 (x86_dr_low_get_control): Likewise.
5552 (x86_dr_low_get_status): Likewise.
5553
eef49a3d
PA
55542015-03-20 Pedro Alves <palves@redhat.com>
5555
5556 * tracepoint.c (cmd_qtstatus): Make "str" const.
5557
b2333d22
PA
55582015-03-20 Pedro Alves <palves@redhat.com>
5559
5560 * server.c (handle_general_set): Make "req_str" const.
5561
23f238d3
PA
55622015-03-19 Pedro Alves <palves@redhat.com>
5563
5564 * linux-low.c (linux_resume_one_lwp): Rename to ...
5565 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5566 instead call perror_with_name.
5567 (check_ptrace_stopped_lwp_gone): New function.
5568 (linux_resume_one_lwp): Reimplement as wrapper around
5569 linux_resume_one_lwp_throw that swallows errors if the LWP is
5570 gone.
5571
91baf43f
PA
55722015-03-19 Pedro Alves <palves@redhat.com>
5573
5574 * linux-low.c (count_events_callback, select_event_lwp_callback):
5575 No longer check whether the thread has resume_stop as last resume
5576 kind.
5577
8bf3b159
PA
55782015-03-19 Pedro Alves <palves@redhat.com>
5579
5580 * linux-low.c (count_events_callback, select_event_lwp_callback):
5581 Use the lwp's status_pending_p field, not the thread's.
5582
b90fc188
PA
55832015-03-19 Pedro Alves <palves@redhat.com>
5584
5585 * linux-low.c (select_event_lwp_callback): Update comments to
5586 no longer mention SIGTRAP.
5587
464b0089
GB
55882015-03-18 Gary Benson <gbenson@redhat.com>
5589
5590 * server.c (handle_query): Do not report vFile:fstat as supported.
5591
aa9e327f
GB
55922015-03-11 Gary Benson <gbenson@redhat.com>
5593
5594 * hostio.c (sys/types.h): New include.
5595 (sys/stat.h): Likewise.
5596 (common-remote-fileio.h): Likewise.
5597 (handle_fstat): New function.
5598 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5599
791c0056
GB
56002015-03-11 Gary Benson <gbenson@redhat.com>
5601
5602 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5603 struct stat.st_blocks and struct stat.st_blksize.
5604 * configure: Regenerate.
5605 * config.in: Likewise.
5606 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5607 (OBS): Add common-remote-fileio.o.
5608 (common-remote-fileio.o): New rule.
5609
9a9df970
PA
56102015-03-09 Pedro Alves <palves@redhat.com>
5611
5612 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5613 'struct sockaddr' pointer in 'accept' call.
5614
9eb1356e
PA
56152015-03-09 Pedro Alves <palves@redhat.com>
5616
5617 Revert:
5618 2015-03-07 Pedro Alves <palves@redhat.com>
5619 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5620 or <winsock2.h> here. Instead include "gdb_socket.h".
5621 (remote_open): Use union gdb_sockaddr_u.
5622 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5623 or <winsock2.h> here. Instead include "gdb_socket.h".
5624 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5625 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5626 or <sys/un.h>.
5627 (init_named_socket, gdb_agent_helper_thread): Use union
5628 gdb_sockaddr_u.
5629
aac331e4
PA
56302015-03-07 Pedro Alves <palves@redhat.com>
5631
5632 * configure.ac (build_warnings): Move
5633 -Wdeclaration-after-statement to the C-specific set.
5634 * configure: Regenerate.
5635
366c75fc
PA
56362015-03-07 Pedro Alves <palves@redhat.com>
5637
5638 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5639 or <winsock2.h> here. Instead include "gdb_socket.h".
5640 (remote_open): Use union gdb_sockaddr_u.
5641 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5642 or <winsock2.h> here. Instead include "gdb_socket.h".
5643 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5644 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5645 or <sys/un.h>.
5646 (init_named_socket, gdb_agent_helper_thread): Use union
5647 gdb_sockaddr_u.
5648
492d29ea
PA
56492015-03-07 Pedro Alves <palves@redhat.com>
5650
5651 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5652 instead.
5653
60a191ed
YQ
56542015-03-06 Yao Qi <yao.qi@linaro.org>
5655
5656 * linux-aarch64-low.c (aarch64_insert_point): Use
5657 show_debug_regs as a boolean.
5658 (aarch64_remove_point): Likewise.
5659
f5771b1d
PA
56602015-03-05 Pedro Alves <palves@redhat.com>
5661
5662 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5663 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5664 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5665 * nto-low.c (nto_target_ops): Likewise.
5666 * spu-low.c (spu_target_ops): Likewise.
5667 * win32-low.c (win32_target_ops): Likewise.
5668
3e572f71
PA
56692015-03-04 Pedro Alves <palves@redhat.com>
5670
72f4393d 5671 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5672 Decide whether a breakpoint triggered based on the SIGTRAP's
5673 siginfo.si_code.
72f4393d
L
5674 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5675 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5676 (linux_low_filter_event): Check for breakpoints before checking
5677 watchpoints.
5678 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5679 siginfo.si_code.
72f4393d
L
5680 (linux_stopped_by_sw_breakpoint)
5681 (linux_supports_stopped_by_sw_breakpoint)
5682 (linux_stopped_by_hw_breakpoint)
5683 (linux_supports_stopped_by_hw_breakpoint): New functions.
5684 (linux_target_ops): Install new target methods.
3e572f71 5685
1ec68e26
PA
56862015-03-04 Pedro Alves <palves@redhat.com>
5687
5688 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5689 * server.c (swbreak_feature, hwbreak_feature): New globals.
5690 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5691 (captured_main): Clear swbreak_feature and hwbreak_feature.
5692 * server.h (swbreak_feature, hwbreak_feature): Declare.
5693 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5694 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5695 supports_stopped_by_hw_breakpoint>: New fields.
5696 (target_supports_stopped_by_sw_breakpoint)
5697 (target_stopped_by_sw_breakpoint)
5698 (target_supports_stopped_by_hw_breakpoint)
5699 (target_stopped_by_hw_breakpoint): Declare.
5700
15c66dd6
PA
57012015-03-04 Pedro Alves <palves@redhat.com>
5702
5703 enum lwp_stop_reason -> enum target_stop_reason
5704 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5705 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5706 (linux_wait_1, stuck_in_jump_pad_callback)
5707 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5708 (linux_stopped_by_watchpoint):
5709 * linux-low.h (enum lwp_stop_reason): Delete.
5710 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5711 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5712
98fc70d6
YQ
57132015-03-04 Yao Qi <yao.qi@linaro.org>
5714
5715 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5716
dd2ac174
GB
57172015-03-03 Gary Benson <gbenson@redhat.com>
5718
5719 * hostio.c (handle_vFile): Fix prefix lengths.
5720
d68e53f4
MM
57212015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5722
5723 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5724 ptr_bits.
5725
bf2d68ab
AA
57262015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5727
5728 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5729 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5730 (clean): Add "rm -f" for above C files.
5731 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5732 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5733 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5734 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5735 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5736 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5737 (init_registers_s390x_vx_linux64)
5738 (init_registers_s390x_tevx_linux64)
5739 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5740 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5741 declarations.
5742 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5743 (s390_store_vxrs_high): New functions.
5744 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5745 NT_S390_VXRS_HIGH.
5746 (s390_arch_setup): Add logic for selecting one of the new target
5747 descriptions. Activate the new vector regsets if applicable.
5748 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5749 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5750 and init_registers_s390x_tevx_linux64.
5751
c966a859
PA
57522015-03-01 Pedro Alves <palves@redhat.com>
5753
5754 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5755 parameter.
5756
4180215b
PA
57572015-02-27 Pedro Alves <palves@redhat.com>
5758
5759 * linux-x86-low.c (u_debugreg_offset): New function.
5760 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5761
749bab01
PA
57622015-02-27 Pedro Alves <palves@redhat.com>
5763
5764 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5765 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5766 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5767 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5768 (ps_lsetfpregs, ps_getpid)
5769 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5770 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5771 (ps_lsetxregs, ps_plog): Declare.
5772
3c14e5a3
PA
57732015-02-27 Pedro Alves <palves@redhat.com>
5774
5775 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5776 IP_AGENT_EXPORT_FUNC.
5777 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5778 IP_AGENT_EXPORT_FUNC.
5779 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5780 (IP_AGENT_EXPORT): Delete.
5781 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5782 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5783 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5784 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5785 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5786 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5787 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5788 (traceframe_read_count, traceframe_write_count)
5789 (traceframes_created, trace_state_variables, get_raw_reg)
5790 (get_trace_state_variable_value, set_trace_state_variable_value)
5791 (ust_loaded, helper_thread_id, cmd_buf): Use
5792 IPA_SYM_EXPORTED_NAME.
5793 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5794 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5795 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5796 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5797 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5798 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5799 EXTERN_C_PUSH/EXTERN_C_POP.
5800 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5801 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5802 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5803 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5804 (traceframe_write_count, traceframe_read_count)
5805 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5806 (about_to_request_buffer_space, get_trace_state_variable_value)
5807 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5808 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5809 EXTERN_C_PUSH/EXTERN_C_POP.
5810 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5811 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5812 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5813 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5814 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5815 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5816 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5817 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5818 Define.
5819 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5820 (IP_AGENT_EXPORT_VAR_DECL): Define.
5821 (tracing): Declare.
5822 (gdb_agent_get_raw_reg): Declare.
5823
fe978cb0
PA
58242015-02-27 Tom Tromey <tromey@redhat.com>
5825 Pedro Alves <palves@redhat.com>
5826
5827 Rename symbols whose names are reserved C++ keywords throughout.
5828
3bc3d82a
PA
58292015-02-27 Pedro Alves <palves@redhat.com>
5830
5831 * Makefile.in (COMPILER): New, get it from autoconf.
5832 (CXX): Get from autoconf instead.
5833 (COMPILE.pre): Use COMPILER.
5834 (CC-LD): Rename to ...
5835 (CC_LD): ... this. Use COMPILER.
5836 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5837 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5838 * acinclude.m4: Include build-with-cxx.m4.
5839 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5840 Disable -Werror by default if building in C++ mode.
5841 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5842 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5843 the C++ compiler. Save/restore CXXFLAGS too.
5844 * configure: Regenerate.
5845
07697489
PA
58462015-02-27 Pedro Alves <palves@redhat.com>
5847
5848 * acinclude.m4: Include libiberty.m4.
5849 * configure.ac: Call libiberty_INIT.
5850 * config.in, configure: Regenerate.
5851
9beb7c4e
PA
58522015-02-26 Pedro Alves <palves@redhat.com>
5853
5854 * linux-low.c (linux_wait_1): When incrementing the PC past a
5855 program breakpoint always use the_low_target.breakpoint_len as
5856 increment, rather than the maximum between that and
5857 the_low_target.decr_pc_after_break.
5858
8090aef2
PA
58592015-02-23 Pedro Alves <palves@redhat.com>
5860
5861 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5862 thread was doing a step-over; always adjust the PC if
5863 we stepped over a permanent breakpoint.
5864 (linux_wait_1): If we stepped over breakpoint that was on top of a
5865 permanent breakpoint, manually advance the PC past it.
5866
bc9540e8
PA
58672015-02-23 Pedro Alves <palves@redhat.com>
5868
5869 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5870 modes.
5871 (x86_fill_gregset, x86_store_gregset): Use it when handling
5872 $orig_eax.
5873
2db9a427
PA
58742015-02-20 Pedro Alves <palves@redhat.com>
5875
5876 * thread-db.c: Include "nat/linux-procfs.h".
5877 (thread_db_init): Skip listing new threads if the kernel supports
5878 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5879
afa8d396
PA
58802015-02-20 Pedro Alves <palves@redhat.com>
5881
5882 * linux-low.c (status_pending_p_callback): Use ptid_match.
5883
c9587f88
AT
58842015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5885
5886 PR breakpoints/16812
5887 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5888 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5889 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5890
b05ec7a5
AT
58912015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5892
5893 PR breakpoints/15956
5894 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5895
d33501a5
MM
58962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5897
5898 * linux-low.c (linux_low_btrace_conf): Print size.
5899 * server.c (handle_btrace_conf_general_set): New.
5900 (hanle_general_set): Call handle_btrace_conf_general_set.
5901 (handle_query): Report Qbtrace-conf:bts:size as supported.
5902
f4abbc16
MM
59032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5904
5905 * linux-low.c (linux_low_enable_btrace): Update parameters.
5906 (linux_low_btrace_conf): New.
5907 (linux_target_ops)<to_btrace_conf>: Initialize.
5908 * server.c (current_btrace_conf): New.
5909 (handle_btrace_enable): Rename to ...
5910 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5911 to target_enable_btrace. Update comment. Update users.
5912 (handle_qxfer_btrace_conf): New.
5913 (qxfer_packets): Add btrace-conf entry.
5914 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5915 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5916 (target_ops)<read_btrace_conf>: New.
5917 (target_enable_btrace): Update parameters.
5918 (target_read_btrace_conf): New.
5919
043c3577
MM
59202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5921
5922 * server.c (handle_btrace_general_set): Remove call to
5923 target_supports_btrace.
5924 (supported_btrace_packets): New.
5925 (handle_query): Call supported_btrace_packets.
5926 * target.h: include btrace-common.h.
5927 (btrace_target_info): Removed.
5928 (supports_btrace, target_supports_btrace): Update parameters.
5929
734b0e4b
MM
59302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5931
5932 * Makefile.in (SFILES): Add common/btrace-common.c.
5933 (OBS): Add common/btrace-common.o.
5934 (btrace-common.o): Add build rules.
5935 * linux-low: Include btrace-common.h.
5936 (linux_low_read_btrace): Use struct btrace_data. Call
5937 btrace_data_init and btrace_data_fini.
5938
d6c146e9
PA
59392015-02-06 Pedro Alves <palves@redhat.com>
5940
5941 * thread-db.c (find_new_threads_callback): Add debug output.
5942
20ba1ce6
PA
59432015-02-04 Pedro Alves <palves@redhat.com>
5944
5945 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5946 (resume_stopped_resumed_lwps): New function.
5947 (linux_wait_for_event_filtered): Use it.
5948
8cc73a39
SDJ
59492015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5950
5951 * Makefile.in (SFILES): Add linux-personality.c.
5952 (linux-personality.o): New rule.
5953 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5954 list of objects to be built.
5955 * linux-low.c: Include nat/linux-personality.h.
5956 (linux_create_inferior): Remove code to disable address space
5957 randomization (moved to ../nat/linux-personality.c). Create
5958 cleanup to disable address space randomization.
5959
fb23d554
SDJ
59602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5961
5962 * Makefile.in (posix-strerror.o): New rule.
5963 (mingw-strerror.o): Likewise.
5964 * configure: Regenerated.
5965 * configure.ac: Source file ../common/common.host. Initialize new
5966 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5967
cdf43629
YQ
59682015-01-14 Yao Qi <yao@codesourcery.com>
5969
5970 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5971 (ppc-linux.o): New rule.
5972 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5973 * configure.ac: AC_CHECK_FUNCS(getauxval).
5974 * config.in: Re-generated.
5975 * configure: Re-generated.
5976 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5977 ppc64_64bit_inferior_p
5978
514c5338
YQ
59792015-01-14 Yao Qi <yao@codesourcery.com>
5980
5981 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5982 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5983 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5984 (PT_ORIG_R3, PT_TRAP): Likewise.
5985 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5986 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5987 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5988
3368c1e5
JB
59892015-01-10 Joel Brobecker <brobecker@adacore.com>
5990
5991 * i387-fp.c (i387_cache_to_xsave): In look over
5992 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5993 zmmh_low_space field by use of zmmh_high_space.
5994
582511be
PA
59952015-01-09 Pedro Alves <palves@redhat.com>
5996
5997 * linux-low.c (step_over_bkpt): Move higher up in the file.
5998 (handle_extended_wait): Don't store the stop_pc here.
5999 (get_stop_pc): Adjust comments and rename to ...
6000 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6001 stopped for a software breakpoint or hardware breakpoint.
6002 (thread_still_has_status_pending_p): New function.
6003 (status_pending_p_callback): Use
6004 thread_still_has_status_pending_p. If the event is no longer
6005 interesting, resume the LWP.
6006 (handle_tracepoints): Add assert.
6007 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6008 (wstatus_maybe_breakpoint): New function.
6009 (cancel_breakpoint): Delete function.
6010 (check_stopped_by_watchpoint): New function, factored out from
6011 linux_low_filter_event.
6012 (lp_status_maybe_breakpoint): Delete function.
6013 (linux_low_filter_event): Remove filter_ptid argument.
6014 Leave thread group exits pending here. Store the LWP's stop PC.
6015 Always leave events pending.
6016 (linux_wait_for_event_filtered): Pull all events out of the
6017 kernel, and leave them all pending.
6018 (count_events_callback, select_event_lwp_callback): Consider all
6019 events.
6020 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6021 (select_event_lwp): Only give preference to the stepping LWP in
6022 all-stop mode. Adjust comments.
6023 (ignore_event): New function.
6024 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6025 references to cancel_breakpoints. Adjust to renames. Also give
6026 equal priority to all LWPs that have had events in non-stop mode.
6027 If reporting a software breakpoint event, unadjust the LWP's PC.
6028 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6029 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6030 Adjust.
6031 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6032 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6033 (linux_stopped_by_watchpoint): Adjust.
6034 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6035 * linux-low.h (enum lwp_stop_reason): New.
6036 (struct lwp_info) <stop_pc>: Adjust comment.
6037 <stopped_by_watchpoint>: Delete field.
6038 <stop_reason>: New field.
6039 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6040 * mem-break.c (software_breakpoint_inserted_here)
6041 (hardware_breakpoint_inserted_here): New function.
6042 * mem-break.h (software_breakpoint_inserted_here)
6043 (hardware_breakpoint_inserted_here): Declare.
6044 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6045 (cancel_breakpoints): Delete.
6046 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6047 (upload_fast_traceframes): Remove references to
6048 cancel_breakpoints.
6049
a33e3959
PA
60502015-01-09 Pedro Alves <palves@redhat.com>
6051
6052 * thread-db.c (find_new_threads_callback): Ignore thread if the
6053 kernel thread ID is -1.
6054
8784d563
PA
60552015-01-09 Pedro Alves <palves@redhat.com>
6056
6057 * linux-low.c (linux_attach_fail_reason_string): Move to
6058 nat/linux-ptrace.c, and rename.
6059 (linux_attach_lwp): Update comment.
6060 (attach_proc_task_lwp_callback): New function.
6061 (linux_attach): Adjust to rename and use
6062 linux_proc_attach_tgid_threads.
6063 (linux_attach_fail_reason_string): Delete declaration.
6064
76f2b779
JB
60652015-01-01 Joel Brobecker <brobecker@adacore.com>
6066
6067 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6068 * server.c (gdbserver_version): Likewise.
6069
fafcc06a
SDJ
60702014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6071
6072 * remote-utils.c: Include ctype.h.
6073 (input_interrupt): Explicitly handle the case when the char
6074 received is the NUL byte. Improve the printing of non-ASCII
6075 characters.
6076
beed38b8
JB
60772014-12-16 Joel Brobecker <brobecker@adacore.com>
6078
6079 * linux-low.c (linux_low_filter_event): Update call to
6080 linux_enable_event_reporting following the addition of
6081 a new parameter to that function.
6082
bf330350
CU
60832014-12-16 Catalin Udma <catalin.udma@freescale.com>
6084
6085 PR server/17457
6086 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6087 (AARCH64_FPCR_REGNO): Likewise.
6088 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6089 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6090 (aarch64_store_fpregset): Likewise.
6091
5227d625
JB
60922014-12-15 Joel Brobecker <brobecker@adacore.com>
6093
6094 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6095 Remove FIXME comment about assumption about N.
6096
f93b65a0
JB
60972014-12-13 Joel Brobecker <brobecker@adacore.com>
6098
6099 * configure.ac: If large-file support is disabled in GDBserver,
6100 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6101 * configure: Regenerate.
6102
e5a9158d
AA
61032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6104
6105 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6106 warning upon ENODATA from ptrace.
6107 * linux-s390-low.c (s390_store_tdb): New.
6108 (s390_regsets): Add regset for NT_S390_TDB.
6109
feea5f36
AA
61102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6111
6112 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6113 without a fill_function.
6114 * linux-s390-low.c (s390_fill_last_break): Remove.
6115 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6116 (s390_arch_setup): Use regset's size instead of fill_function for
6117 loop end condition.
6118
098dbe61
AA
61192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6120
6121 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6122 the regset's store function when ptrace returned an error.
6123 * regcache.c (get_thread_regcache): Invalidate register cache
6124 before fetching inferior's registers.
6125
28eef672
AA
61262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6127
6128 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6129 while-loop as for-loop.
6130 (regsets_store_inferior_registers): Likewise.
6131
bdca27a2
YQ
61322014-11-28 Yao Qi <yao@codesourcery.com>
6133
6134 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6135 * config.in, configure: Re-generate.
6136 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6137 is defined.
6138
9c232dda
YQ
61392014-11-21 Yao Qi <yao@codesourcery.com>
6140
6141 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6142 (AC_CHECK_HEADERS): Remove malloc.h.
6143 * configure: Re-generated.
6144 * config.in: Re-generated.
6145 * server.h: Don't include alloca.h and malloc.h.
6146 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6147 Don't include malloc.h.
6148
43968415
JB
61492014-11-17 Joel Brobecker <brobecker@adacore.com>
6150
6151 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6152 corresponding ERRNO check in same block.
6153
40e91bc7
PA
61542014-11-12 Pedro Alves <palves@redhat.com>
6155
6156 * server.c (cont_thread): Update comment.
6157 (start_inferior, attach_inferior): No longer clear cont_thread.
6158 (handle_v_cont): No longer set cont_thread.
6159 (captured_main): Clear cont_thread each time a GDB connects.
6160
c2c118cf
PA
61612014-11-12 Pedro Alves <palves@redhat.com>
6162
6163 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6164 thread, and don't resume all threads if the Hc thread has exited.
6165
78708b7c
PA
61662014-11-12 Pedro Alves <palves@redhat.com>
6167
6168 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6169 the process group instead of to a specific LWP.
6170
a2abc7de
PA
61712014-10-15 Pedro Alves <palves@redhat.com>
6172
6173 PR server/17487
6174 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6175 parameter.
6176 (arm_set_thread_context): Delete.
6177 (the_low_target): Adjust.
6178 * win32-i386-low.c (debug_registers_changed)
6179 (debug_registers_used): Delete.
6180 (update_debug_registers_callback): New function.
6181 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6182 needing to update their debug registers.
6183 (win32_get_current_dr): New function.
6184 (x86_dr_low_get_addr, x86_dr_low_get_control)
6185 (x86_dr_low_get_status): Fetch the debug register from the thread
6186 record's context.
6187 (i386_initial_stuff): Adjust.
6188 (i386_get_thread_context): Remove current_event parameter. Don't
6189 clear debug_registers_changed nor copy DR values to
6190 debug_reg_state.
6191 (i386_set_thread_context): Delete.
6192 (i386_prepare_to_resume): New function.
6193 (i386_thread_added): Mark the thread as needing to update irs
6194 debug registers.
6195 (the_low_target): Remove i386_set_thread_context and install
6196 i386_prepare_to_resume.
6197 * win32-low.c (win32_get_thread_context): Adjust.
6198 (win32_set_thread_context): Use SetThreadContext
6199 directly.
6200 (win32_prepare_to_resume): New function.
6201 (win32_require_context): New function, factored out from ...
6202 (thread_rec): ... this.
6203 (continue_one_thread): Call win32_prepare_to_resume on each thread
6204 we're about to continue.
6205 (win32_resume): Call win32_prepare_to_resume on the event thread.
6206 * win32-low.h (struct win32_thread_info)
6207 <debug_registers_changed>: New field.
6208 (struct win32_target_ops): Change prototype of set_thread_context,
6209 delete set_thread_context and add prepare_to_resume.
6210 (win32_require_context): New declaration.
6211
a442d071
GB
62122014-10-08 Gary Benson <gbenson@redhat.com>
6213
6214 * server.h: Do not include common-exceptions.h.
6215
6f1947e8
GB
62162014-10-08 Gary Benson <gbenson@redhat.com>
6217
6218 * server.h: Do not include cleanups.h.
6219
63b434a4
JH
62202014-09-30 James Hogan <james.hogan@imgtec.com>
6221
6222 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6223 mips64-dsp-linux.c.
6224
c4d9ceb6
YQ
62252014-09-23 Yao Qi <yao@codesourcery.com>
6226
6227 * linux-low.c (lp_status_maybe_breakpoint): New function.
6228 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6229 (count_events_callback): Likewise.
6230 (select_event_lwp_callback): Likewise.
6231 (cancel_breakpoints_callback): Likewise.
6232
89a5711c
DB
62332014-09-19 Don Breazeal <donb@codesourcery.com>
6234
6235 * linux-low.c (handle_extended_wait): Call
6236 linux_ptrace_get_extended_event.
6237 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6238 linux_is_extended_waitstatus.
6239
bffc0964
JB
62402014-09-16 Joel Brobecker <brobecker@adacore.com>
6241
6242 * Makefile.in (CPPFLAGS): Define.
6243 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6244 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6245
0bfdf32f
GB
62462014-09-16 Gary Benson <gbenson@redhat.com>
6247
6248 * inferiors.h (current_inferior): Renamed as...
6249 (current_thread): New variable. All uses updated.
6250 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6251 (maybe_move_out_of_jump_pad): Likewise.
6252 (cancel_breakpoint): Likewise.
6253 (linux_low_filter_event): Likewise.
6254 (wait_for_sigstop): Likewise.
6255 (linux_resume_one_lwp): Likewise.
6256 (need_step_over_p): Likewise.
6257 (start_step_over): Likewise.
6258 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6259 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6260 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6261 and save_inferior as saved_thread.
6262 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6263 saved_thread.
6264 (regcache_invalidate_thread): Likewise.
6265 * remote-utils.c (prepare_resume_reply): Likewise.
6266 * thread-db.c (thread_db_get_tls_address): Likewise.
6267 (disable_thread_event_reporting): Likewise.
6268 (remove_thread_event_breakpoints): Likewise.
6269 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6270 as saved_thread.
6271 * target.h (set_desired_inferior): Renamed as...
6272 (set_desired_thread): New declaration. All uses updated.
6273 * server.c (myresume): Updated comment to reference thread instead
6274 of inferior.
6275 (handle_serial_event): Likewise.
6276 (handle_target_event): Likewise.
6277
361c8ade
GB
62782014-09-12 Tom Tromey <tromey@redhat.com>
6279 Gary Benson <gbenson@redhat.com>
6280
6281 * regcache.h: Include common-regcache.h.
6282 (regcache_read_pc): Don't declare.
6283 * regcache.c (get_thread_regcache_for_ptid): New function.
6284
bd9269f7
GB
62852014-09-11 Tom Tromey <tromey@redhat.com>
6286 Gary Benson <gbenson@redhat.com>
6287
6288 * symbol.c: New file.
6289 * Makefile.in (SFILES): Add symbol.c.
6290 (OBS): Add symbol.o.
6291
f8c1d06b
GB
62922014-09-11 Gary Benson <gbenson@redhat.com>
6293
6294 * target.c (target_stop_ptid, target_continue_ptid): New
6295 functions.
6296
721ec300
GB
62972014-09-11 Tom Tromey <tromey@redhat.com>
6298 Gary Benson <gbenson@redhat.com>
6299
6300 * target.h: Include target/target.h.
6301 * target.c (target_read_memory, target_read_uint32)
6302 (target_write_memory): New functions.
6303
c5e92cca
GB
63042014-09-11 Gary Benson <gbenson@redhat.com>
6305
6306 * server.h (debug_hw_points): Don't declare.
6307 * server.c (debug_hw_points): Don't define. Replace all uses
6308 with show_debug_regs.
6309 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6310 all uses with show_debug_regs.
6311
2e4bb98a
EBM
63122014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6313
6314 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6315 endianness into account.
6316 (ppc_supply_ptrace_register): Likewise.
6317
ac740bc7
JH
63182014-09-03 James Hogan <james.hogan@imgtec.com>
6319
6320 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6321 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6322
97ea6506
GB
63232014-09-03 Gary Benson <gbenson@redhat.com>
6324
6325 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6326 ALL_DEBUG_ADDRESS_REGISTERS.
6327
df7e5265
GB
63282014-09-02 Gary Benson <gbenson@redhat.com>
6329
6330 * i386-low.h: Renamed as...
6331 * x86-low.h: New file. All type, function and variable name
6332 prefixes changed from "i386_" to "x86_". All references updated.
6333 * i386-low.c: Renamed as...
6334 * x86-low.c: New file. All type, function and variable name
6335 prefixes changed from "i386_" to "x86_". All references updated.
6336
ed859da7
GB
63372014-09-02 Gary Benson <gbenson@redhat.com>
6338
6339 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6340 (x86_linux_new_thread): Likewise.
6341
860789c7
GB
63422014-08-29 Gary Benson <gbenson@redhat.com>
6343
6344 * server.h (setjmp.h): Do not include.
6345 (toplevel): Do not declare.
6346 (common-exceptions.h): Include.
6347 (cleanups.h): Likewise.
6348 * server.c (toplevel): Do not define.
6349 (exit_code): New static global.
6350 (detach_or_kill_for_exit_cleanup): New function.
6351 (main): New function. Original main renamed to...
6352 (captured_main): New function.
6353 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6354
ff55e1b5
GB
63552014-08-29 Gary Benson <gbenson@redhat.com>
6356
6357 * Makefile.in (SFILES): Add common/common-exceptions.c.
6358 (OBS): Add common-exceptions.o.
6359 (common-exceptions.o): New rule.
6360 * utils.c (prepare_to_throw_exception): New function.
6361
e9bcb658
GB
63622014-08-29 Gary Benson <gbenson@redhat.com>
6363
6364 * config.in: Regenerate.
6365 * configure: Likewise.
6366
e3180625
GB
63672014-08-29 Gary Benson <gbenson@redhat.com>
6368
6369 * Makefile.in (SFILES): Add common/cleanups.c.
6370 (OBS): cleanups.o.
6371 (cleanups.o): New rule.
6372
e3d6ba5d
GB
63732014-08-29 Gary Benson <gbenson@redhat.com>
6374
6375 * utils.c (internal_vwarning): New function.
6376
7096e886
GB
63772014-08-28 Gary Benson <gbenson@redhat.com>
6378
6379 * utils.h (fatal): Remove declaration.
6380 * utils.c (fatal): Remove function.
6381
14ce3192
GB
63822014-08-28 Gary Benson <gbenson@redhat.com>
6383
6384 * tracepoint.c (gdb_agent_init): Replace fatal with
6385 perror_with_name.
6386 (initialize_tracepoint): Likewise.
6387
50278d59
GB
63882014-08-28 Gary Benson <gbenson@redhat.com>
6389
6390 * remote-utils.c (remote_prepare): Replace fatal with error.
6391
aa96c426
GB
63922014-08-28 Gary Benson <gbenson@redhat.com>
6393
6394 * linux-low.c (linux_async): Replace fatal with warning.
6395 Tidy up and return.
6396 (linux_start_non_stop): Return -1 if linux_async failed.
6397
f7160e97
GB
63982014-08-28 Gary Benson <gbenson@redhat.com>
6399
6400 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6401 gdb_assert.
6402 (i386_dr_low_get_addr): Remove vague comment.
6403 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6404 gdb_assert.
6405
38e08fca
GB
64062014-08-28 Gary Benson <gbenson@redhat.com>
6407
6408 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6409 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6410 internal_error.
6411 (linux_resume_one_lwp): Likewise.
6412 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6413 gdb_assert.
6414 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6415 with internal_error.
6416 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6417 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6418 (find_register_by_name): Replace fatal with internal_error.
6419 (find_regno): Likewise.
6420 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6421 * thread-db.c (thread_db_create_event): Likewise.
6422 (thread_db_load_search): Likewise.
6423 (try_thread_db_load_1): Likewise.
6424 * tracepoint.c (get_jump_space_head): Replace fatal with
6425 internal_error.
6426 (claim_trampoline_space): Likewise.
6427 (have_fast_tracepoint_trampoline_buffer): Likewise.
6428 (cmd_qtstart): Likewise.
6429 (stop_tracing): Likewise.
6430 (fast_tracepoint_collecting): Likewise.
6431 (target_malloc): Likewise.
6432 (download_tracepoint): Likewise.
6433 (download_trace_state_variables): Replace check with gdb_assert.
6434 (upload_fast_traceframes): Replace fatal with internal_error.
6435
34abf635
GB
64362014-08-19 Tom Tromey <tromey@redhat.com>
6437 Gary Benson <gbenson@redhat.com>
6438
6439 * Makefile.in (SFILES): Add common/common-debug.c.
6440 (OBS): Add common-debug.o.
6441 (common-debug.o): New rule.
6442 * debug.h (debug_printf): Don't declare.
6443 * debug.c (debug_printf): Renamed and rewritten as...
6444 (debug_vprintf): New function.
6445
f6e94d78
GB
64462014-08-19 Gary Benson <gbenson@redhat.com>
6447
6448 * utils.h: Do not include print-utils.h.
6449
9239eeab
GB
64502014-08-19 Tom Tromey <tromey@redhat.com>
6451 Gary Benson <gbenson@redhat.com>
6452
6453 * server.h: Add static assertion.
6454 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6455
ef87c8bb
GB
64562014-08-19 Tom Tromey <tromey@redhat.com>
6457 Gary Benson <gbenson@redhat.com>
6458
6459 * Makefile.in (SFILES): Add common/errors.c.
6460 (OBS): Add errors.o.
6461 (IPA_OBS): Add errors-ipa.o.
6462 (errors.o): New rule.
6463 (errors-ipa.o): Likewise.
6464 * utils.h (perror_with_name, error, warning): Don't declare.
6465 * utils.c (warning): Renamed and rewritten as...
6466 (vwarning): New function.
6467 (error): Renamed and rewritten as...
6468 (verror): New function.
6469 (internal_error): Renamed and rewritten as...
6470 (internal_verror): New function.
6471
bb974a24
GB
64722014-08-07 Gary Benson <gbenson@redhat.com>
6473
6474 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6475 * configure: Regenerate.
6476 * config.in: Likewise.
6477 * server.h: Do not include errno.h.
6478 * event-loop.c: Likewise.
6479 * hostio-errno.c: Likewise.
6480 * linux-low.c: Likewise.
6481 * remote-utils.c: Likewise.
6482 * spu-low.c: Likewise.
6483 * utils.c: Likewise.
6484 * gdbreplay.c: Unconditionally include errno.h.
6485
6d3d12eb
GB
64862014-08-07 Gary Benson <gbenson@redhat.com>
6487
6488 * server.h: Do not include string.h.
6489 * event-loop.c: Likewise.
6490 * linux-low.c: Likewise.
6491 * regcache.c: Likewise.
6492 * remote-utils.c: Likewise.
6493 * spu-low.c: Likewise.
6494 * utils.c: Likewise.
6495
dccbb609
GB
64962014-08-07 Gary Benson <gbenson@redhat.com>
6497
6498 * server.h: Do not include gdb_assert.h.
6499
e76df0d0
GB
65002014-08-07 Gary Benson <gbenson@redhat.com>
6501
6502 * server.h: Do not include common-utils.h.
6503
4cb9c816
GB
65042014-08-07 Gary Benson <gbenson@redhat.com>
6505
6506 * server.h: Do not include ptid.h.
6507 * notif.h: Likewise.
6508
3995eeee
GB
65092014-08-07 Gary Benson <gbenson@redhat.com>
6510
6511 * server.h: Do not include gdb_locale.h.
6512
cb9f1a9b
GB
65132014-08-07 Gary Benson <gbenson@redhat.com>
6514
6515 * server.h: Do not include gdb/signals.h.
6516 * win32-low.c: Likewise.
6517
a5fceff8
GB
65182014-08-07 Gary Benson <gbenson@redhat.com>
6519
6520 * server.h: Do not include pathmax.h.
6521
b9391142
GB
65222014-08-07 Gary Benson <gbenson@redhat.com>
6523
6524 * server.h: Do not include libiberty.h.
6525 * linux-bfin-low.c: Likewise.
6526
0e443c87
GB
65272014-08-07 Gary Benson <gbenson@redhat.com>
6528
6529 * server.h: Do not include ansidecl.h.
6530
8ebb3f56
GB
65312014-08-07 Gary Benson <gbenson@redhat.com>
6532
6533 * linux-x86-low.c: Do not include stddef.h.
6534 * lynx-ppc-low.c: Likewise.
6535 * tracepoint.c: Likewise.
6536
8980bdf6
GB
65372014-08-07 Gary Benson <gbenson@redhat.com>
6538
6539 * server.h: Do not include stdarg.h.
6540 * nto-low.c: Likewise.
6541
d7096f71
GB
65422014-08-07 Gary Benson <gbenson@redhat.com>
6543
6544 * server.h: Do not include stdlib.h.
6545 * inferiors.c: Likewise.
6546 * linux-low.c: Likewise.
6547 * regcache.c: Likewise.
6548 * spu-low.c: Likewise.
6549 * tracepoint.c: Likewise.
6550 * utils.c: Likewise.
6551
d02f550d
GB
65522014-08-07 Gary Benson <gbenson@redhat.com>
6553
6554 * server.h: Do not include stdio.h.
6555 * linux-low.c: Likewise.
6556 * remote-utils.c: Likewise.
6557 * spu-low.c: Likewise.
6558 * utils.c: Likewise.
6559 * wincecompat.c: Likewise.
6560
87f6c4e3
GB
65612014-08-06 Gary Benson <gbenson@redhat.com>
6562
6563 * regcache.c (init_register_cache): Move conditionals inside if.
6564
7089dca4
GB
65652014-08-06 Gary Benson <gbenson@redhat.com>
6566
6567 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6568
462f517e
GB
65692014-07-31 Gary Benson <gbenson@redhat.com>
6570
6571 * ax.h: Do not include server.h.
6572 * gdbthread.h: Likewise.
6573 * lynx-low.h: Likewise.
6574 * notif.h: Likewise.
6575
976411d6
GB
65762014-07-30 Gary Benson <gbenson@redhat.com>
6577
6578 * server.h: Include common-defs.h.
6579 Do not include config.h or build-gnulib-gdbserver/config.h.
6580
d41f6d8e
GB
65812014-07-30 Gary Benson <gbenson@redhat.com>
6582
6583 * hostio-errno.c: Move server.h to top of includes list.
6584 * inferiors.c: Likewise.
6585 * linux-x86-low.c: Likewise.
6586 * notif.c: Include server.h.
6587
314c6a35
TT
65882014-07-24 Tom Tromey <tromey@redhat.com>
6589 Gary Benson <gbenson@redhat.com>
6590
6591 * server.h (CORE_ADDR): Now unsigned.
6592
69ff6be5
PA
65932014-07-16 Pedro Alves <palves@redhat.com>
6594
6595 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6596
ce9e3fe7
PA
65972014-07-15 Pedro Alves <palves@redhat.com>
6598
6599 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6600 copy.
6601
e76126e8
PA
66022014-07-11 Pedro Alves <palves@redhat.com>
6603
6604 * linux-low.c (kill_wait_lwp): New function, based on
6605 kill_one_lwp_callback, but use my_waitpid directly.
6606 (kill_one_lwp_callback, linux_kill): Use it.
6607
8e9db26e
PA
66082014-06-23 Pedro Alves <palves@redhat.com>
6609
6610 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6611 before setting DR0..DR3.
6612
698b3e08
GB
66132014-06-20 Gary Benson <gbenson@redhat.com>
6614
6615 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6616 * configure: Regenerated.
6617 * config.in: Likewise.
6618
125f8a3d
GB
66192014-06-20 Gary Benson <gbenson@redhat.com>
6620
6621 * Makefile.in (SFILES): Update locations for files moved
6622 from common to nat.
6623 (object file files): Reordered.
6624
42995dbd
GB
66252014-06-20 Gary Benson <gbenson@redhat.com>
6626
6627 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6628 (i386_dr_low_set_addr): Likewise.
6629 (i386_dr_low_get_addr): Likewise.
6630 (i386_dr_low_can_set_control): Likewise.
6631 (i386_dr_low_set_control): Likewise.
6632 (i386_dr_low_get_control): Likewise.
6633 (i386_dr_low_get_status): Likewise.
6634 (i386_get_debug_register_length): Likewise.
6635 * linux-x86-low.c (i386_dr_low_set_addr):
6636 Changed signature. Made static.
6637 (i386_dr_low_get_addr): Likewise.
6638 (i386_dr_low_set_control): Likewise.
6639 (i386_dr_low_get_control): Likewise.
6640 (i386_dr_low_get_status): Likewise.
6641 (i386_dr_low): New global variable.
6642 * win32-i386-low.c (i386_dr_low_set_addr):
6643 Changed signature. Made static.
6644 (i386_dr_low_get_addr): Likewise.
6645 (i386_dr_low_set_control): Likewise.
6646 (i386_dr_low_get_control): Likewise.
6647 (i386_dr_low_get_status): Likewise.
6648 (i386_dr_low): New global variable.
6649
e1d2394b
MS
66502014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6651
6652 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6653 * Makefile.in (AR, AR_FLAGS): Define.
6654 * configure: Regenerate.
6655
3a8ee006
GB
66562014-06-19 Gary Benson <gbenson@redhat.com>
6657
6658 * Makefile.in (i386-dregs.o): New rule.
6659 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6660 * i386-low.c (target.h): Remove include.
6661 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6662 (DR_CONTROL_SHIFT): Likewise.
6663 (DR_CONTROL_SIZE): Likewise.
6664 (DR_RW_EXECUTE): Likewise.
6665 (DR_RW_WRITE): Likewise.
6666 (DR_RW_READ): Likewise.
6667 (DR_RW_IORW): Likewise.
6668 (DR_LEN_1): Likewise.
6669 (DR_LEN_2): Likewise.
6670 (DR_LEN_4): Likewise.
6671 (DR_LEN_8): Likewise.
6672 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6673 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6674 (DR_ENABLE_SIZE): Likewise.
6675 (DR_LOCAL_SLOWDOWN): Likewise.
6676 (DR_GLOBAL_SLOWDOWN): Likewise.
6677 (DR_CONTROL_RESERVED): Likewise.
6678 (I386_DR_CONTROL_MASK): Likewise.
6679 (I386_DR_VACANT): Likewise.
6680 (I386_DR_LOCAL_ENABLE): Likewise.
6681 (I386_DR_GLOBAL_ENABLE): Likewise.
6682 (I386_DR_DISABLE): Likewise.
6683 (I386_DR_SET_RW_LEN): Likewise.
6684 (I386_DR_GET_RW_LEN): Likewise.
6685 (I386_DR_WATCH_HIT): Likewise.
6686 (i386_wp_op_t): Likewise.
6687 (i386_show_dr): Likewise.
6688 (i386_length_and_rw_bits): Likewise.
6689 (i386_insert_aligned_watchpoint): Likewise.
6690 (i386_remove_aligned_watchpoint): Likewise.
6691 (i386_handle_nonaligned_watchpoint): Likewise.
6692 i386_update_inferior_debug_regs(): Likewise.
6693 (i386_dr_insert_watchpoint): Likewise.
6694 (i386_dr_remove_watchpoint): Likewise.
6695 (i386_dr_region_ok_for_watchpoint): Likewise.
6696 (i386_dr_stopped_data_address): Likewise.
6697 (i386_dr_stopped_by_watchpoint): Likewise.
6698
8f26655c
GB
66992014-06-19 Gary Benson <gbenson@redhat.com>
6700
6701 * i386-low.c (i386_dr_show): Renamed to
6702 i386_show_dr and made static. All uses updated.
6703 (i386_dr_length_and_rw_bits): Renamed to
6704 i386_length_and_rw_bits and made static.
6705 All uses updated.
6706 (i386_dr_insert_aligned_watchpoint): Renamed to
6707 i386_insert_aligned_watchpoint and made static.
6708 All uses updated.
6709 (i386_dr_remove_aligned_watchpoint): Renamed to
6710 i386_remove_aligned_watchpoint and made static.
6711 All uses updated.
6712 (i386_dr_update_inferior_debug_regs): Renamed to
6713 i386_update_inferior_debug_regs and made static.
6714 All uses updated.
6715
b9228891
GB
67162014-06-18 Gary Benson <gbenson@redhat.com>
6717
5171def3
GB
6718 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6719 (i386_dr_low_can_set_control): Likewise.
6720 (i386_get_debug_register_length): Likewise.
6721 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6722 (i386_dr_low_can_set_control): Likewise.
6723 (i386_get_debug_register_length): Likewise.
6724
67252014-06-17 Gary Benson <gbenson@redhat.com>
6726
b9228891
GB
6727 * i386-low.h (i386-dregs.h): New include.
6728 (DR_FIRSTADDR): Now in i386-dregs.h.
6729 (DR_LASTADDR): Likewise.
6730 (DR_NADDR): Likewise.
6731 (DR_STATUS): Likewise.
6732 (DR_CONTROL): Likewise.
6733 (i386_debug_reg_state): Likewise.
6734 (i386_dr_insert_watchpoint): Likewise.
6735 (i386_dr_remove_watchpoint): Likewise.
6736 (i386_dr_region_ok_for_watchpoint): Likewise.
6737 (i386_dr_stopped_data_address): Likewise.
6738 (i386_dr_stopped_by_watchpoint): Likewise.
6739 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6740
4be83cc2
GB
67412014-06-18 Gary Benson <gbenson@redhat.com>
6742
6743 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6744 i386_dr_insert_watchpoint.
6745 (i386_low_remove_watchpoint): Renamed to
6746 i386_dr_remove_watchpoint.
6747 (i386_low_region_ok_for_watchpoint): Renamed to
6748 i386_dr_region_ok_for_watchpoint.
6749 (i386_low_stopped_data_address): Renamed to
6750 i386_dr_stopped_data_address.
6751 (i386_low_stopped_by_watchpoint): Renamed to
6752 i386_dr_stopped_by_watchpoint.
6753 * i386-low.c (i386_show_dr): Renamed to
6754 i386_dr_show and made nonstatic. All uses updated.
6755 (i386_length_and_rw_bits): Renamed to
6756 i386_dr_length_and_rw_bits and made nonstatic.
6757 All uses updated.
6758 (i386_insert_aligned_watchpoint): Renamed to
6759 i386_dr_insert_aligned_watchpoint and made nonstatic.
6760 All uses updated.
6761 (i386_remove_aligned_watchpoint): Renamed to
6762 i386_dr_remove_aligned_watchpoint and made nonstatic.
6763 All uses updated.
6764 (i386_update_inferior_debug_regs): Renamed to
6765 i386_dr_update_inferior_debug_regs and made nonstatic.
6766 All uses updated.
6767 (i386_low_insert_watchpoint): Renamed to
6768 i386_dr_insert_watchpoint. All uses updated.
6769 (i386_low_remove_watchpoint): Renamed to
6770 i386_dr_remove_watchpoint. All uses updated.
6771 (i386_low_region_ok_for_watchpoint): Renamed to
6772 i386_dr_region_ok_for_watchpoint. All uses updated.
6773 (i386_low_stopped_data_address): Renamed to
6774 i386_dr_stopped_data_address. All uses updated.
6775 (i386_low_stopped_by_watchpoint): Renamed to
6776 i386_dr_stopped_by_watchpoint. All uses updated.
6777
131aa0d4
GB
67782014-06-18 Gary Benson <gbenson@redhat.com>
6779
6780 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6781 (i386_dr_low_can_set_control): Likewise.
6782 (i386_insert_aligned_watchpoint): New check.
6783
d9305f7f
GB
67842014-06-18 Gary Benson <gbenson@redhat.com>
6785
6786 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6787 Renamed to state.
6788
e927c9fc
GB
67892014-06-18 Gary Benson <gbenson@redhat.com>
6790
6791 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6792 instead of fatal and error.
6793 (i386_handle_nonaligned_watchpoint): Likewise.
6794
1b6d4134
GB
67952014-06-18 Gary Benson <gbenson@redhat.com>
6796
6797 * i386-low.c (i386_get_debug_register_length): New macro.
6798 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6799 (i386_show_dr): Use debug_printf instead of fprintf. Use
6800 phex to format values.
6801
6e62758f
GB
68022014-06-18 Gary Benson <gbenson@redhat.com>
6803
6804 * i386-low.h: Comment changes.
6805 * i386-low.c: Likewise.
6806
fc6e2f03
GB
68072014-06-18 Gary Benson <gbenson@redhat.com>
6808
6809 * i386-low.c: Whitespace changes.
6810
f9d1eeed
TT
68112014-06-12 Tom Tromey <tromey@redhat.com>
6812
6813 * utils.c (freeargv): Remove.
6814
0b04e523
TT
68152014-06-12 Tom Tromey <tromey@redhat.com>
6816
6817 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6818 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6819 (parse_debug_format_options): Likewise.
6820 (gdbserver_usage): Likewise.
6821 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6822 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6823 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6824 against libiberty.
6825 ($(LIBGNU)): Depend on libiberty.
6826 (all-lib): Recurse into all subdirs.
6827 (install-only): Invoke "install" target in subdirs.
6828 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6829 targets.
6830 * configure: Rebuild.
6831 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6832 for vasprintf, vsnprintf, or gettimeofday.
6833 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6834 srv_tgtobj.
6835
270c9937
JB
68362014-06-05 Joel Brobecker <brobecker@adacore.com>
6837
6838 * development.sh: Delete.
6839 * Makefile.in (config.status): Adjust dependency on development.sh.
6840 * configure.ac: Adjust development.sh source call.
6841 * configure: Regenerate.
6842
0a261ed8
PA
68432014-06-02 Pedro Alves <palves@redhat.com>
6844
6845 * ax.c (gdb_free_agent_expr): New function.
6846 * ax.h (gdb_free_agent_expr): New declaration.
6847 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6848 list.
6849 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6850 static.
6851 (clear_breakpoint_conditions_and_commands): New function.
6852 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6853 (clear_breakpoint_conditions_and_commands): New declaration.
6854
e9dae05e
RR
68552014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6856
6857 * linux-aarch64-low.c (asm/ptrace.h): Include.
6858
5876f503
JK
68592014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6860
6861 Fix TLS access for -static -pthread.
6862 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6863 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6864 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6865
802e8e6d
PA
68662014-05-20 Pedro Alves <palves@redhat.com>
6867
6868 * linux-aarch64-low.c (aarch64_insert_point)
6869 (aarch64_remove_point): No longer check whether the type is
6870 supported here. Adjust to new interface.
6871 (the_low_target): Install aarch64_supports_z_point_type as
6872 supports_z_point_type method.
6873 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6874 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6875 instead of a Z packet char. Adjust.
6876 (arm_supports_z_point_type): New function.
6877 (arm_insert_point, arm_remove_point): Adjust to new interface.
6878 (the_low_target): Install arm_supports_z_point_type.
6879 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6880 (cris_insert_point, cris_remove_point): Adjust to new interface.
6881 Don't check whether the type is supported here.
6882 (the_low_target): Install cris_supports_z_point_type.
6883 * linux-low.c (linux_supports_z_point_type): New function.
6884 (linux_insert_point, linux_remove_point): Adjust to new interface.
6885 * linux-low.h (struct linux_target_ops) <insert_point,
6886 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6887 raw_breakpoint pointer parameter.
6888 <supports_z_point_type>: New method.
6889 * linux-mips-low.c (mips_supports_z_point_type): New function.
6890 (mips_insert_point, mips_remove_point): Adjust to new interface.
6891 Use mips_supports_z_point_type.
6892 (the_low_target): Install mips_supports_z_point_type.
6893 * linux-ppc-low.c (the_low_target): Install NULL as
6894 supports_z_point_type method.
6895 * linux-s390-low.c (the_low_target): Install NULL as
6896 supports_z_point_type method.
6897 * linux-sparc-low.c (the_low_target): Install NULL as
6898 supports_z_point_type method.
6899 * linux-x86-low.c (x86_supports_z_point_type): New function.
6900 (x86_insert_point): Adjust to new insert_point interface. Use
6901 insert_memory_breakpoint. Adjust to new
6902 i386_low_insert_watchpoint interface.
6903 (x86_remove_point): Adjust to remove_point interface. Use
6904 remove_memory_breakpoint. Adjust to new
6905 i386_low_remove_watchpoint interface.
6906 (the_low_target): Install x86_supports_z_point_type.
6907 * lynx-low.c (lynx_target_ops): Install NULL as
6908 supports_z_point_type callback.
6909 * nto-low.c (nto_supports_z_point_type): New.
6910 (nto_insert_point, nto_remove_point): Adjust to new interface.
6911 (nto_target_ops): Install nto_supports_z_point_type.
6912 * mem-break.c: Adjust intro comment.
6913 (struct raw_breakpoint) <raw_type, size>: New fields.
6914 <inserted>: Update comment.
6915 <shlib_disabled>: Delete field.
6916 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6917 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6918 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6919 (raw_bkpt_type_to_target_hw_bp_type): New function.
6920 (find_enabled_raw_code_breakpoint_at): New function.
6921 (find_raw_breakpoint_at): New type and size parameters. Use them.
6922 (insert_memory_breakpoint): New function, based off
6923 set_raw_breakpoint_at.
6924 (remove_memory_breakpoint): New function.
6925 (set_raw_breakpoint_at): Reimplement.
6926 (set_breakpoint): New, based on set_breakpoint_at.
6927 (set_breakpoint_at): Reimplement.
6928 (delete_raw_breakpoint): Go through the_target->remove_point
6929 instead of assuming memory breakpoints.
6930 (find_gdb_breakpoint_at): Delete.
6931 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6932 (find_gdb_breakpoint): New function.
6933 (set_gdb_breakpoint_at): Delete.
6934 (z_type_supported): New function.
6935 (set_gdb_breakpoint_1): New function, loosely based off
6936 set_gdb_breakpoint_at.
6937 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6938 (delete_gdb_breakpoint_at): Delete.
6939 (delete_gdb_breakpoint_1): New function, loosely based off
6940 delete_gdb_breakpoint_at.
6941 (delete_gdb_breakpoint): New function.
6942 (clear_gdb_breakpoint_conditions): Rename to ...
6943 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6944 breakpoint.
6945 (add_condition_to_breakpoint): Make static.
6946 (add_breakpoint_condition): Take a struct breakpoint pointer
6947 instead of an address. Adjust.
6948 (gdb_condition_true_at_breakpoint): Rename to ...
6949 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6950 z_type parameter.
6951 (gdb_condition_true_at_breakpoint): Reimplement.
6952 (add_breakpoint_commands): Take a struct breakpoint pointer
6953 instead of an address. Adjust.
6954 (gdb_no_commands_at_breakpoint): Rename to ...
6955 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6956 parameter. Return true if no breakpoint was found. Change debug
6957 output.
6958 (gdb_no_commands_at_breakpoint): Reimplement.
6959 (run_breakpoint_commands): Rename to ...
6960 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6961 and change return type to boolean.
6962 (run_breakpoint_commands): New function.
6963 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6964 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6965 breakpoint. Go through the_target->remove_point instead of
6966 assuming memory breakpoint.
6967 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6968 software and hardware breakpoints.
6969 (reinsert_raw_breakpoint): Go through the_target->insert_point
6970 instead of assuming memory breakpoint.
6971 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6972 software and hardware breakpoints.
6973 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6974 Check both software and hardware breakpoints.
6975 (validate_inserted_breakpoint): Assert the breakpoint is a
6976 software breakpoint. Set the inserted flag to -1 instead of
6977 setting shlib_disabled.
6978 (delete_disabled_breakpoints): Adjust.
6979 (validate_breakpoints): Only validate software breakpoints.
6980 Adjust to inserted flag change.
6981 (check_mem_read, check_mem_write): Skip breakpoint types other
6982 than software breakpoints. Adjust to inserted flag change.
6983 * mem-break.h (enum raw_bkpt_type): New enum.
6984 (raw_breakpoint, struct process_info): Forward declare.
6985 (Z_packet_to_target_hw_bp_type): Delete declaration.
6986 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6987 (set_gdb_breakpoint, delete_gdb_breakpoint)
6988 (clear_breakpoint_conditions): New declarations.
6989 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6990 (breakpoint_inserted_here): Update comment.
6991 (add_breakpoint_condition, add_breakpoint_commands): Replace
6992 address parameter with a breakpoint pointer parameter.
6993 (gdb_breakpoint_here): Update comment.
6994 (delete_gdb_breakpoint_at): Delete.
6995 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6996 * server.c (process_point_options): Take a struct breakpoint
6997 pointer instead of an address. Adjust.
6998 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6999 delete_gdb_breakpoint.
7000 * spu-low.c (spu_target_ops): Install NULL as
7001 supports_z_point_type method.
7002 * target.h: Include mem-break.h.
7003 (struct target_ops) <prepare_to_access_memory>: Update comment.
7004 <supports_z_point_type>: New field.
7005 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7006 instead of a char. Also take a raw breakpoint pointer.
7007 * win32-arm-low.c (the_low_target): Install NULL as
7008 supports_z_point_type.
7009 * win32-i386-low.c (i386_supports_z_point_type): New function.
7010 (i386_insert_point, i386_remove_point): Adjust to new interface.
7011 (the_low_target): Install i386_supports_z_point_type.
7012 * win32-low.c (win32_supports_z_point_type): New function.
7013 (win32_insert_point, win32_remove_point): Adjust to new interface.
7014 (win32_target_ops): Install win32_supports_z_point_type.
7015 * win32-low.h (struct win32_target_ops):
7016 <supports_z_point_type>: New method.
7017 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7018 instead of a char. Also take a raw breakpoint pointer.
7019
932539e3
PA
70202014-05-20 Pedro Alves <palves@redhat.com>
7021
7022 * mem-break.h: Include break-common.h.
7023 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7024 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7025 (Z_packet_to_target_hw_bp_type): New declaration.
7026 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7027 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7028 (Z_PACKET_ACCESS_WP): Delete macros.
7029 (Z_packet_to_hw_type): Delete function.
7030 * i386-low.h: Don't include break-common.h here.
7031 (Z_packet_to_hw_type): Delete declaration.
7032 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7033 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7034 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7035 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7036 * linux-aarch64-low.c: Don't include break-common.h here.
7037 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7038 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7039 (Z_packet_to_target_hw_bp_type): Delete function.
7040 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7041 function.
7042 (mips_insert_point, mips_remove_point): Use
7043 Z_packet_to_target_hw_bp_type.
7044
4ff0d3d8
PA
70452014-05-20 Pedro Alves <palves@redhat.com>
7046
7047 * linux-aarch64-low.c: Include break-common.h.
7048 (enum target_point_type): Delete.
7049 (Z_packet_to_point_type): Rename to ...
7050 (Z_packet_to_target_hw_bp_type): ... this, and return a
7051 target_hw_bp_type instead.
7052 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7053 instead of an enum target_point_type.
7054 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7055 breakpoint type.
7056 (aarch64_dr_state_insert_one_point)
7057 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7058 (aarch64_handle_aligned_watchpoint)
7059 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7060 Take an enum target_hw_bp_type instead of an enum
7061 target_point_type.
7062 (aarch64_supports_z_point_type): New function.
7063 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7064 use Z_packet_to_target_hw_bp_type.
7065
786dc519
JB
70662014-05-20 Joel Brobecker <brobecker@adacore.com>
7067
7068 * configure.ac: Only use -Werror by default when DEVELOPMENT
7069 is true.
7070 * configure: Regenerate.
7071
9e0aa64f
JK
70722014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7073
7074 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7075 * linux-x86-low.c (X86_64_USER_REGS): New.
7076 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7077
2b577b92
YQ
70782014-04-28 Yao Qi <yao@codesourcery.com>
7079
7080 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7081 name.
7082
94611da2
PA
70832014-04-25 Pedro Alves <palves@redhat.com>
7084
7085 PR server/16255
7086 * linux-low.c (linux_attach_fail_reason_string): New function.
7087 (linux_attach_lwp): Delete.
7088 (linux_attach_lwp_1): Rename to ...
7089 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7090 argument. Remove "initial" parameter. Return int instead of
7091 void. Don't error or warn here.
7092 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7093 failure to attach to the tgid. Call warning when failing to
7094 attach to an lwp.
7095 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7096 argument. Remove "initial" parameter. Return int instead of
7097 void. Don't error or warn here.
7098 (linux_attach_fail_reason_string): New declaration.
7099 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7100 interface change. Use linux_attach_fail_reason_string.
7101
01f9f808
MS
71022014-04-24 Michael Sturm <michael.sturm@mintel.com>
7103 Walfred Tedeschi <walfred.tedeschi@intel.com>
7104
7105 * Makefile.in: Added rules to handle new files
7106 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7107 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7108 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7109 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7110 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7111 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7112 x32-avx512-linux.o.
7113 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7114 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7115 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7116 i386/x32-avx512.xml.
7117 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7118 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7119 i386/x32-avx512-linux.xml.
7120 * i387-fp.c (num_avx512_k_registers): New constant for number
7121 of K registers.
7122 (num_avx512_zmmh_low_registers): New constant for number of
7123 lower ZMM registers (0-15).
7124 (num_avx512_zmmh_high_registers): New constant for number of
7125 higher ZMM registers (16-31).
7126 (num_avx512_ymmh_registers): New contant for number of higher
7127 YMM registers (ymm16-31 added by avx521 on x86_64).
7128 (num_avx512_xmm_registers): New constant for number of higher
7129 XMM registers (xmm16-31 added by AVX512 on x86_64).
7130 (struct i387_xsave): Add space for AVX512 registers.
7131 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7132 Add code to handle AVX512 registers.
7133 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7134 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7135 prototypei from generated file.
7136 (tdesc_amd64_avx512_linux): Likewise.
7137 (init_registers_x32_avx512_linux): Likewise.
7138 (tdesc_x32_avx512_linux): Likewise.
7139 (init_registers_i386_avx512_linux): Likewise.
7140 (tdesc_i386_avx512_linux): Likewise.
7141 (x86_64_regmap): Add AVX512 registers.
7142 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7143 mask.
7144 (initialize_low_arch): Add code to initialize AVX512 registers.
7145
51aa91f9
PA
71462014-04-23 Pedro Alves <palves@redhat.com>
7147
7148 * mem-break.c (find_gdb_breakpoint_at): Make static.
7149 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7150
a4165e94
PA
71512014-04-23 Pedro Alves <palves@redhat.com>
7152
7153 * i386-low.c: Don't include break-common.h here.
7154 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7155 prototype to take target_hw_bp_type as argument instead of a Z
7156 packet char.
7157 * i386-low.h: Include break-common.h here.
7158 (Z_packet_to_hw_type): Declare.
7159 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7160 prototypes.
7161 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7162 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7163 (x86_remove_point): Convert the packet number to a
7164 target_hw_bp_type before calling i386_low_remove_watchpoint.
7165 * win32-i386-low.c (i386_insert_point): Convert the packet number
7166 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7167 (i386_remove_point): Convert the packet number to a
7168 target_hw_bp_type before calling i386_low_remove_watchpoint.
7169
b8acf843
PA
71702014-04-23 Pedro Alves <palves@redhat.com>
7171
7172 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7173
d708bcd1
PA
71742014-04-10 Pedro Alves <palves@redhat.com>
7175
7176 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7177 Check if the condition or command is NULL before checking if the
7178 breakpoint is known. On success, return true.
7179 * mem-break.h (add_breakpoint_condition): Document return.
7180 (add_breakpoint_commands): Add describing comment.
7181 * server.c (skip_to_semicolon): New function.
7182 (process_point_options): Use it.
7183
2eec7d5b
PA
71842014-04-09 Pedro Alves <palves@redhat.com>
7185
7186 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7187 to lwpid_of.
7188
fa96cb38
PA
71892014-02-27 Pedro Alves <palves@redhat.com>
7190
7191 PR 12702
7192 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7193 macros.
7194 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7195 output.
7196 (last_thread_of_process_p): Take a PID argument instead of a
7197 thread pointer.
7198 (linux_wait_for_lwp): Delete.
7199 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7200 functions.
7201 (linux_low_filter_event): New function, party factored out from
7202 linux_wait_for_event.
7203 (linux_wait_for_event): Rename to ...
7204 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7205 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7206 sigsuspend. Check for zombie leaders.
7207 (linux_wait_for_event): Reimplement as wrapper around
7208 linux_wait_for_event_filtered.
7209 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7210 a normal or signal exit is seen, it's the whole process exiting.
7211 (wait_for_sigstop): No longer a for_each_inferior callback.
7212 Rewrite on top of linux_wait_for_event_filtered.
7213 (stop_all_lwps): Call wait_for_sigstop directly.
7214 * server.c (resume, handle_target_event): Handle
7215 TARGET_WAITKIND_NO_RESUMED.
7216
d763de10
JB
72172014-02-26 Joel Brobecker <brobecker@adacore.com>
7218
7219 * win32-low.c (psapi_get_dll_name,
7220 * win32_CreateToolhelp32Snapshot): Delete.
7221 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7222 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7223 Delete.
7224 (handle_load_dll): Add function description.
7225 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7226
850a0f76
JB
72272014-02-26 Joel Brobecker <brobecker@adacore.com>
7228
7229 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7230 Add comment.
7231 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7232 base address when calling win32_add_one_solib.
7233 (handle_load_dll): Delete local variable load_addr.
7234 Remove 0x1000 offset applied to DLL base address when calling
7235 win32_add_one_solib.
7236 (handle_unload_dll): Add comment.
7237
f25b3fc3
JB
72382014-02-26 Joel Brobecker <brobecker@adacore.com>
7239
7240 * win32-low.c (win32_add_all_dlls): Renames
7241 win32_ensure_ntdll_loaded. Rewrite function documentation.
7242 Adjust implementation to always load all DLLs.
7243 Add 0x1000 offset to DLL base address when calling
7244 win32_add_one_solib.
7245 (child_initialization_done): New static global.
7246 (do_initial_child_stuff): Set child_initialization_done to
7247 zero during child initialization, and 1 after. Replace call
7248 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7249 Add comment.
7250 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7251 (handle_unload_dll): Add function documentation.
7252 (get_child_debug_event): Ignore load and unload DLL events
7253 during child initialization.
7254
d86d4aaf
DE
72552014-02-20 Doug Evans <dje@google.com>
7256
3bc32da3 7257 Remove global all_lwps.
d86d4aaf
DE
7258 * inferiors.h (ptid_of): Move here from linux-low.h.
7259 (pid_of, lwpid_of): Ditto.
7260 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7261 parameter is a struct thread_info * now.
7262 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7263 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7264 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7265 directly.
7266 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7267 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7268 * linux-arm-low.c (update_registers_callback): Update, "entry"
7269 parameter is a struct thread_info * now.
7270 Fetch lwpid from current_inferior directly.
7271 (arm_insert_point): Pass &all_threads to find_inferior instead of
7272 &all_lwps.
7273 (arm_remove_point): Ditto.
7274 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7275 (arm_prepare_to_resume): Fetch pid from thread.
7276 (arm_read_description): Fetch lwpid from current_inferior directly.
7277 * linux-low.c (all_lwps): Delete.
7278 (delete_lwp): Delete call to remove_inferior.
7279 (handle_extended_wait): Fetch lwpid from thread.
7280 (add_lwp): Don't set lwp->entry.id. Remove call to
7281 add_inferior_to_list.
7282 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7283 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7284 (kill_one_lwp_callback): Ditto.
7285 (linux_kill): Don't dereference NULL pointer.
7286 Fetch ptid,lwpid from thread.
7287 (get_detach_signal): Fetch ptid from thread.
7288 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7289 Simplify call to regcache_invalidate_thread.
7290 (delete_lwp_callback): Update, "entry" parameter is a
7291 struct thread_info * now. Fetch pid from thread.
7292 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7293 (status_pending_p_callback): Update, "entry" parameter is a
7294 struct thread_info * now. Fetch ptid from thread.
7295 (find_lwp_pid): Update, "entry" parameter is a
7296 struct thread_info * now.
7297 (linux_wait_for_lwp): Fetch pid from thread.
7298 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7299 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7300 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7301 (dequeue_one_deferred_signal): Ditto.
7302 (cancel_breakpoint): Fetch ptid from current_inferior.
7303 (linux_wait_for_event): Pass &all_threads to find_inferior,
7304 not &all_lwps. Fetch ptid, lwpid from thread.
7305 (count_events_callback): Update, "entry" parameter is a
7306 struct thread_info * now.
7307 (select_singlestep_lwp_callback): Ditto.
7308 (select_event_lwp_callback): Ditto.
7309 (cancel_breakpoints_callback): Ditto.
7310 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7311 not &all_lwps.
7312 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7313 (unsuspend_one_lwp): Update, "entry" parameter is a
7314 struct thread_info * now.
7315 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7316 not &all_lwps.
7317 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7318 Fetch lwpid from thread, not lwp.
7319 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7320 Pass &all_threads to find_inferior, not &all_lwps.
7321 (send_sigstop): Fetch lwpid from thread, not lwp.
7322 (send_sigstop_callback): Update, "entry" parameter is a
7323 struct thread_info * now.
7324 (suspend_and_send_sigstop_callback): Ditto.
7325 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7326 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7327 struct thread_info * now.
7328 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7329 from thread, lwp.
7330 (lwp_running): Update, "entry" parameter is a
7331 struct thread_info * now.
7332 (stop_all_lwps): Fetch ptid from thread.
7333 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7334 (linux_resume_one_lwp): Fetch lwpid from thread.
7335 (linux_set_resume_request): Update, "entry" parameter is a
7336 struct thread_info * now. Fetch pid, lwpid from thread.
7337 (resume_status_pending_p): Update, "entry" parameter is a
7338 struct thread_info * now.
7339 (need_step_over_p): Ditto. Fetch lwpid from thread.
7340 (start_step_over): Fetch lwpid from thread.
7341 (linux_resume_one_thread): Update, "entry" parameter is a
7342 struct thread_info * now. Fetch lwpid from thread.
7343 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7344 (proceed_one_lwp): Update, "entry" parameter is a
7345 struct thread_info * now. Fetch lwpid from thread.
7346 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7347 struct thread_info * now.
7348 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7349 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7350 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7351 directly.
7352 (regsets_store_inferior_registers): Ditto.
7353 (fetch_register, store_register): Ditto.
7354 (linux_read_memory, linux_write_memory): Ditto.
7355 (linux_request_interrupt): Ditto.
7356 (linux_read_auxv): Ditto.
7357 (linux_xfer_siginfo): Ditto.
7358 (linux_qxfer_spu): Ditto.
7359 (linux_qxfer_libraries_svr4): Ditto.
7360 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7361 moved to inferiors.h.
7362 (get_lwp): Delete.
7363 (get_thread_lwp): Update.
7364 (struct lwp_info): Delete member "entry". Simplify comment for
7365 member "thread".
7366 (all_lwps): Delete.
7367 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7368 current_inferior directly.
7369 (update_watch_registers_callback): Update, "entry" parameter is a
7370 struct thread_info * now. Fetch pid from thread.
7371 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7372 (mips_insert_point): Fetch lwpid from current_inferior.
7373 Pass &all_threads to find_inferior, not &all_lwps.
7374 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7375 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7376 directly.
7377 (mips_stopped_data_address): Ditto.
7378 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7379 directly.
7380 * linux-tile-low.c (tile_arch_setup): Ditto.
7381 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7382 (update_debug_registers_callback): Update, "entry" parameter is a
7383 struct thread_info * now. Fetch pid from thread.
7384 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7385 Pass &all_threads to find_inferior, not &all_lwps.
7386 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7387 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7388 Pass &all_threads to find_inferior, not &all_lwps.
7389 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7390 (i386_dr_low_get_status): Ditto.
7391 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7392 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7393 (x86_linux_read_description): Ditto.
7394 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7395
3b8361aa
DE
73962014-02-20 Doug Evans <dje@google.com>
7397
7398 * inferiors.c (get_first_inferior): Fix buglet.
7399
f7667f0d
DE
74002014-02-19 Doug Evans <dje@google.com>
7401
7402 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7403 * inferiors.c (add_thread): Change result type to struct thread_info *.
7404 All callers updated.
7405 (add_lwp): Call add_thread here instead of in callers.
7406 All callers updated.
7407 * linux-low.h (get_lwp_thread): Rewrite.
7408 (struct lwp_info): New member "thread".
7409
b3312d80
DE
74102014-02-19 Doug Evans <dje@google.com>
7411
7412 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7413 All callers updated.
7414
ecc6f45c
DE
74152014-02-19 Doug Evans <dje@google.com>
7416
7417 * inferiors.c (add_thread): Fix whitespace.
7418
649ebbca
DE
74192014-02-19 Doug Evans <dje@google.com>
7420
7421 * dll.c (clear_dlls): Replace accessing list implemention details
7422 with API function.
7423 * gdbthread.h (get_first_thread): Declare.
7424 * inferiors.c (for_each_inferior_with_data): New function.
7425 (get_first_thread): New function.
7426 (find_thread_ptid): Simplify.
7427 (get_first_inferior): New function.
7428 (clear_list): Delete.
7429 (one_inferior_p): New function.
7430 (clear_inferior_list): New function.
7431 (clear_inferiors): Update.
7432 * inferiors.h (for_each_inferior_with_data): Declare.
7433 (clear_inferior_list): Declare.
7434 (one_inferior_p): Declare.
7435 (get_first_inferior): Declare.
7436 * linux-low.c (linux_wait_for_event): Replace accessing list
7437 implemention details with API function.
7438 * server.c (target_running): Ditto.
7439 (accumulate_file_name_length): New function.
7440 (emit_dll_description): New function.
7441 (handle_qxfer_libraries): Replace accessing list implemention
7442 details with API function.
7443 (handle_qxfer_threads_worker): New function.
7444 (handle_qxfer_threads_proper): Replace accessing list implemention
7445 details with API function.
7446 (handle_query): Ditto.
7447 (visit_actioned_threads_callback_ftype): New typedef.
7448 (visit_actioned_threads_data): New struct.
7449 (visit_actioned_threads): Rewrite to be find_inferior callback.
7450 (resume): Call find_inferior.
7451 (handle_status): Replace accessing list implemention
7452 details with API function.
7453 (process_serial_event): Replace accessing list implemention details
7454 with API function.
7455 * target.c (set_desired_inferior): Replace accessing list implemention
7456 details with API function.
7457 * tracepoint.c (same_process_p): New function.
7458 (gdb_agent_about_to_close): Replace accessing list implemention
7459 details with API function.
7460 * win32-low.c (child_delete_thread): Replace accessing list
7461 implemention details with API function.
7462 (match_dll_by_basename): New function.
7463 (dll_is_loaded_by_basename): New function.
7464 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7465 details call to dll_is_loaded_by_basename.
7466
80894984
DE
74672014-02-19 Doug Evans <dje@google.com>
7468
7469 * dll.h (struct dll_info): Add comment.
7470 * gdbthread.h (struct thread_info): Add comment.
7471 (current_ptid): Simplify.
7472 * inferiors.c (add_process): Update.
7473 (remove_process): Update.
7474 * inferiors.h (struct process_info): Rename member "head" to "entry".
7475 * linux-low.c (delete_lwp): Update.
7476 (add_lwp): Update.
7477 (last_thread_of_process_p): Update.
7478 (kill_one_lwp_callback, linux_kill): Update.
7479 (status_pending_p_callback): Update.
7480 (wait_for_sigstop): Update. Simplify read of ptid.
7481 (start_step_over): Update.
7482 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7483 (get_lwp_thread): Update.
7484 (struct lwp_info): Rename member "head" to "entry".
7485 * regcache.h (inferior_list_entry): Delete.
7486 * server.c (kill_inferior_callback): Update.
7487 (detach_or_kill_inferior_callback): Update.
7488 (print_started_pid): Update.
7489 (print_attached_pid): Update.
7490 (process_serial_event): Simplify read of ptid.
7491 * thread-db.c (thread_db_create_event): Update.
7492 (thread_db_get_tls_address): Update.
7493 * win32-low.c (current_inferior_ptid): Simplify.
7494
46917d26
TT
74952014-02-19 Tom Tromey <tromey@redhat.com>
7496
7497 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7498 argument.
7499 (target_supports_btrace): Update.
7500
0759a81e
YQ
75012014-02-14 Yao Qi <yao@codesourcery.com>
7502
7503 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7504 (rsp-low-ipa.o): New target.
7505
a7191e8b
TT
75062014-02-12 Tom Tromey <tromey@redhat.com>
7507
7508 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7509 convert_ascii_to_int.
7510 * regcache.c (registers_to_string): Likewise.
7511 * remote-utils.c (decode_M_packet): Likewise.
7512 * server.c (process_serial_event): Likewise.
7513
ff0e980e
TT
75142014-02-12 Tom Tromey <tromey@redhat.com>
7515
7516 * server.c (handle_query, handle_v_run): Use hex2bin, not
7517 unhexify.
7518 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7519
e9371aff
TT
75202014-02-12 Tom Tromey <tromey@redhat.com>
7521
7522 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7523 convert_int_to_ascii.
7524 * regcache.c (registers_to_string, collect_register_as_string):
7525 Likewise.
7526 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7527 Likewise.
7528 * server.c (process_serial_event): Likewise.
7529 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7530 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7531
971dc0b8
TT
75322014-02-12 Tom Tromey <tromey@redhat.com>
7533
7534 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7535 bin2hex, not hexify.
7536 * tracepoint.c (cmd_qtstatus): Likewise.
7537
0a822afb
TT
75382014-02-12 Tom Tromey <tromey@redhat.com>
7539
7540 * remote-utils.c (monitor_output): Pass explicit length to
7541 hexify.
7542
9c3d6531
TT
75432014-02-12 Tom Tromey <tromey@redhat.com>
7544
7545 * tracepoint.c: Include rsp-low.h.
7546 * server.c: Include rsp-low.h.
7547 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7548 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7549 declare.
7550 * remote-utils.c: Include rsp-low.h.
7551 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7552 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7553 (convert_int_to_ascii, convert_ascii_to_int): Move to
7554 common/rsp-low.c.
7555 * regcache.c: Include rsp-low.h.
7556 * ax.c: Include rsp-low.h.
7557 * Makefile.in (SFILES): Add common/rsp-low.c.
7558 (OBS): Add rsp-low.o.
7559 (rsp-low.o): New target.
7560
01fd3ea5
TT
75612014-02-12 Tom Tromey <tromey@redhat.com>
7562
7563 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7564 Include print-utils.h.
7565 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7566 (plongest, thirty_two, phex_nz): Remove.
7567 * Makefile.in (SFILES): Add common/print-utils.c.
7568 (OBS): Add print-utils.o.
7569 (print-utils-ipa.o): New target.
7570 (print-utils.o): New target.
7571 (IPA_OBJS): Add print-utils-ipa.o.
7572
e99dc820
TT
75732014-02-06 Tom Tromey <tromey@redhat.com>
7574
7575 * Makefile.in (SFILES): Fix indentation.
7576
ee1e2d4f
DE
75772014-02-05 Doug Evans <dje@google.com>
7578
7579 * linux-low.c (linux_wait_for_event): Improve comment.
7580 (linux_wait_1): Keep current_inferior in sync with event_child.
7581
f5a02773
DE
75822014-01-22 Doug Evans <dje@google.com>
7583
7584 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7585
87ce2a04
DE
75862014-01-22 Doug Evans <dje@google.com>
7587
7588 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7589 * configure: Regenerate.
7590 * config.in: Regenerate.
7591 * Makefile.in (SFILES): Add debug.c.
7592 (OBS): Add debug.o.
7593 * debug.c: New file.
7594 * debug.h: New file.
7595 * linux-aarch64-low.c (*): Update all debugging printfs to use
7596 debug_printf instead of fprintf.
7597 * linux-arm-low.c (*): Ditto.
7598 * linux-cris-low.c (*): Ditto.
7599 * linux-crisv32-low.c (*): Ditto.
7600 * linux-m32r-low.c (*): Ditto.
7601 * linux-sparc-low.c (*): Ditto.
7602 * linux-x86.c (*): Ditto.
7603 * linux-low.c (*): Ditto.
7604 (linux_wait_1): Add calls to debug_enter, debug_exit.
7605 (linux_wait): Remove redundant debugging printf.
7606 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7607 (linux_resume, unstop_all_lwps): Ditto.
7608 * mem-break.c (*): Update all debugging printfs to use
7609 debug_printf instead of fprintf.
7610 * remote-utils.c (*): Ditto.
7611 * thread-db.c (*): Ditto.
7612 * server.c #include <ctype.h>, "gdb_vecs.h".
7613 (debug_threads): Moved to debug.c.
7614 (*): Update all debugging printfs to use debug_printf instead of
7615 fprintf.
7616 (start_inferior): Replace call to fflush with call to debug_flush.
7617 (monitor_show_help): Mention set debug-format.
7618 (parse_debug_format_options): New function.
7619 (handle_monitor_command): Handle "monitor set debug-format".
7620 (gdbserver_usage): Mention --debug-format.
7621 (main): Parse --debug-format.
7622 * server.h (debug_threads): Declaration moved to debug.h.
7623 #include "debug.h".
7624 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7625 trace_debug_1 that uses debug_printf.
7626 (tracepoint_look_up_symbols): Update all debugging printfs to use
7627 debug_printf instead of fprintf.
7628
e671835b
BS
76292014-01-20 Baruch Siach <baruch@tkos.co.il>
7630
7631 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7632 sys/ptrace.h.
7633
b5737fa9
PA
76342014-01-17 Pedro Alves <palves@redhat.com>
7635
ea38d2a9 7636 PR build/16445
c7faa97a
PA
7637 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7638 defined after including gdb_proc_service.h.
b5737fa9 7639
40ed484e
DE
76402014-01-16 Doug Evans <dje@google.com>
7641
7642 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7643 (match_dll): Use it.
7644
969c39fb
MM
76452014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7646
7647 * target.h (target_ops) <read_btrace>: Change parameters and
7648 return type to allow error reporting.
7649 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7650 trace reading errors on.
7651 * linux-low.c (linux_low_read_btrace): Pass trace reading
7652 errors on.
7653 (linux_low_disable_btrace): New.
7654
ab7f45ba
DE
76552014-01-15 Doug Evans <dje@google.com>
7656
7657 * inferiors.c (thread_id_to_gdb_id): Delete.
7658 * inferiors.h (thread_id_to_gdb_id): Delete.
7659
66af0f44
EZ
76602014-01-13 Eli Zaretskii <eliz@gnu.org>
7661
7662 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7663 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7664 versions.
7665
9939e131
PA
76662014-01-08 Pedro Alves <palves@redhat.com>
7667
7668 * server.c (handle_status): Don't discard previous queued stop
7669 replies or thread's pending status here.
7670 (main) <disconnection>: Do it here instead.
7671
b7ea362b
PA
76722014-01-08 Pedro Alves <palves@redhat.com>
7673
7674 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7675 * server.c (visit_actioned_threads, handle_pending_status): New
7676 function.
7677 (handle_v_cont): Factor out parts to ...
7678 (resume): ... this new function. If in all-stop, and a thread
7679 being resumed has a pending status, report it without actually
7680 resuming.
7681 (myresume): Adjust to use the new 'resume' function.
7682 (clear_pending_status_callback, set_pending_status_callback)
7683 (find_status_pending_thread_callback): New functions.
7684 (handle_status): Handle the case of multiple threads having
7685 interesting statuses to report. Report threads' real last signal
7686 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7687 with an interesting thread to report the status for, instead of
7688 always reporting the status of the first thread.
7689
28498c42
JB
76902014-01-01 Joel Brobecker <brobecker@adacore.com>
7691
7692 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7693 * gdbreplay.c (gdbreplay_version): Likewise.
7694
f45c82da
YZ
76952013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7696
7697 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7698 iov.iov_len with the real length in use.
7699
379a5e2d
JB
77002013-12-13 Joel Brobecker <brobecker@adacore.com>
7701
7702 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7703 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7704 for all targets that use win32-low.c.
7705 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7706 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7707
4210d83e
PA
77082013-12-13 Pedro Alves <palves@redhat.com>
7709
7710 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7711 if equal to TARGET_WAITKIND_LOADED.
7712 * win32-low.c (cached_status): New static global.
7713 (win32_wait): Add declaration.
7714 (do_initial_child_stuff): Flush all initial pending debug events
7715 up to the initial breakpoint.
7716 (win32_wait): If CACHED_STATUS was set, return that instead
7717 of doing a real wait. Remove the code resuming the execution
7718 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7719 during the initial phase. Also remove the code changing
7720 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7721 TARGET_WAITKIND_STOPPED.
7722
e7f0d979
YQ
77232013-12-11 Yao Qi <yao@codesourcery.com>
7724
7725 * notif.c (handle_notif_ack): Return 0 if no notification
7726 matches.
7727
ebcf782c
DE
77282013-11-20 Doug Evans <dje@google.com>
7729
7730 * linux-low.c (linux_set_resume_request): Fix comment.
7731
20ad9378
DE
77322013-11-20 Doug Evans <dje@google.com>
7733
7734 * linux-low.c (resume_status_pending_p): Tweak comment.
7735
a196ebeb
WT
77362013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7737
7738 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7739 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7740 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7741 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7742 (srv_amd64_regobj): Add amd64-mpx.o.
7743 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7744 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7745 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7746 * i387-fp.c (num_pl_bnd_register) Added constant.
7747 (num_pl_bnd_cfg_registers) Added constant.
7748 (struct i387_xsave) Added reserved area and MPX fields.
7749 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7750 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7751 function.
7752 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7753 (init_registers_amd64_mpx_linux): Declare new function.
7754 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7755 (x86_64_regmap): Add MPX registers.
7756 (x86_linux_read_description): Add MPX case.
7757 (initialize_low_arch): Initialize MPX targets.
7758
0080a2f6
TT
77592013-11-18 Tom Tromey <tromey@redhat.com>
7760
7761 * configure: Rebuild.
7762 * configure.ac: Don't check for stdlib.h.
7763 * gdbreplay.c: Unconditionally include stdlib.h.
7764
2978b111
TT
77652013-11-18 Tom Tromey <tromey@redhat.com>
7766
7767 * config.in: Rebuild.
7768 * configure: Rebuild.
7769 * configure.ac: Don't use AC_HEADER_DIRENT.
7770
a3d08894
TT
77712013-11-18 Tom Tromey <tromey@redhat.com>
7772
7773 * server.h: Don't check HAVE_STRING_H.
7774 * gdbreplay.c: Don't check HAVE_STRING_H.
7775 * configure: Rebuild.
7776
0a5dd17d
TT
77772013-11-18 Tom Tromey <tromey@redhat.com>
7778
7779 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7780 LIBGNU.
7781
1bd2f0ba
TT
77822013-11-08 Tom Tromey <tromey@redhat.com>
7783
7784 * configure, config.in: Rebuild.
7785 * configure.ac: Remove unused configury.
7786
3266f10b
TT
77872013-11-08 Tom Tromey <tromey@redhat.com>
7788
7789 * acinclude.m4: Include common.m4, codeset.m4.
7790 * configure, config.in: Rebuild.
7791 * configure.ac: Use GDB_AC_COMMON.
7792
6682d959
AA
77932013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7794
7795 * linux-s390-low.c (HWCAP_S390_TE): New define.
7796 (s390_arch_setup): Consider the TE field in the HWCAP for
7797 determining 'have_regset_tdb'.
7798
fd0a4d76
SDJ
77992013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7800
7801 PR gdb/16014
7802 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7803 call to sizeof.
7804
1a3d890b
PA
78052013-10-02 Pedro Alves <palves@redhat.com>
7806
7807 * server.c (process_serial_event): Don't output "GDBserver
7808 exiting" if GDB is connected through stdio.
7809 * target.c (mywait): Likewise, be silent if GDB is connected
7810 through stdio.
7811
97ad4581
JB
78122013-10-01 Joel Brobecker <brobecker@adacore.com>
7813
7814 * lynx-low.c (lynx_add_threads_after_attach): New function.
7815 (lynx_attach): Remove call to add_thread. Add call to
7816 lynx_add_threads_after_attach instead.
7817
5b4e221c
MF
78182013-09-28 Mike Frysinger <vapier@gentoo.org>
7819
7820 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7821 * config.in, configure: Regenerated.
7822
ee47b2f8
YQ
78232013-09-18 Yao Qi <yao@codesourcery.com>
7824
7825 PR server/15959
7826 * server.c (start_inferior): Clear 'resume_info'.
7827
d6707650 78282013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7829
d6707650
JW
7830 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7831 for each register.
7832
9243dd0e 78332013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7834
9243dd0e
JW
7835 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7836 linux-tile-low.o to srv_tgtobj.
7837
c623a6ef
WN
78382013-09-16 Will Newton <will.newton@linaro.org>
7839
7840 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7841 out regs.
7842
fb71d39e
PA
78432013-09-06 Pedro Alves <palves@redhat.com>
7844
7845 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7846 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7847 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7848 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7849 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7850 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7851
8e7e9910
PA
78522013-09-06 Pedro Alves <palves@redhat.com>
7853
7854 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7855 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7856
7c3a12ca
PA
78572013-09-06 Pedro Alves <palves@redhat.com>
7858
7859 * linux-amd64-ipa.c: Include tracepoint.h.
7860 * linux-i386-ipa.c: Include tracepoint.h.
7861
8eb3d7b6
RW
78622013-09-06 Ricard Wanderlof <ricardw@axis.com>
7863
7864 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7865 (ps_get_thread_area): New function.
7866
eddddb9d
RW
78672013-09-06 Ricard Wanderlof <ricardw@axis.com>
7868
7869 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7870 (initialize_low_arch): Call init_registers_crisv32 rather than
7871 init_register_crisv32.
7872
533b0600
PA
78732013-09-05 Pedro Alves <palves@redhat.com>
7874
7875 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7876 to ...
7877 * hostio.h: ... this new file.
7878 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7879 win32-low.c: Include hostio.h.
7880
0ce3d3b5
PA
78812013-09-05 Pedro Alves <palves@redhat.com>
7882
7883 * server.h (gdb_client_data, handler_func, callback_handler_func)
7884 (delete_file_handler, add_file_handler, append_callback_event)
7885 (delete_callback_event, start_event_loop, initialize_event_loop):
7886 Move to event-loop.h and include it.
7887 * event-loop.h: New file.
7888
799cdc37
PA
78892013-09-05 Pedro Alves <palves@redhat.com>
7890
7891 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7892 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7893 (loaded_dll, unloaded_dll): Move to ...
7894 * dll.h: ... this new file.
7895 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7896
6a6bbd9d
PA
78972013-09-05 Pedro Alves <palves@redhat.com>
7898
7899 * server.h (current_process, get_thread_process, all_processes)
7900 (add_inferior_to_list, for_each_inferior, current_inferior)
7901 (remove_inferior, add_process, remove_process, find_process_pid)
7902 (have_started_inferiors_p, have_attached_inferiors_p)
7903 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7904 (clear_inferiors, find_inferior, find_inferior_id)
7905 (inferior_target_data, set_inferior_target_data)
7906 (inferior_regcache_data, set_inferior_regcache_data): Move to
7907 inferiors.h, and include it.
7908 * inferiors.h: New file.
7909
f699aaba
PA
79102013-09-05 Pedro Alves <palves@redhat.com>
7911
7912 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7913 Move ...
72f4393d 7914 * ax.h: ... here.
f699aaba 7915
c144c7a0
PA
79162013-09-05 Pedro Alves <palves@redhat.com>
7917
7918 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7919 tracepoint.h.
7920 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7921 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7922 (handle_tracepoint_general_set, handle_tracepoint_query)
7923 (tracepoint_finished_step, tracepoint_was_hit)
7924 (release_while_stepping_state_list, current_traceframe)
7925 (in_readonly_region, traceframe_read_mem)
7926 (fetch_traceframe_registers, traceframe_read_sdata)
7927 (traceframe_read_info, struct fast_tpoint_collect_status)
7928 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7929 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7930 (supply_fast_tracepoint_registers)
7931 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7932 (ipa_tdesc, claim_trampoline_space)
7933 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7934 (agent_mem_read, agent_get_trace_state_variable_value)
7935 (agent_set_trace_state_variable_value, agent_tsv_read)
7936 (agent_mem_read_string, get_raw_reg_func_addr)
7937 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7938 * tracepoint.h: ... this new file.
7939
ff42e6ab
PA
79402013-09-05 Pedro Alves <palves@redhat.com>
7941
7942 * server.h (perror_with_name, error, fatal, warning, paddress)
7943 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7944 include it.
7945 * utils.h: New file.
7946
541af0f4
PA
79472013-09-05 Pedro Alves <palves@redhat.com>
7948
7949 * server.h (remote_debug, noack_mode, transport_is_reliable)
7950 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7951 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7952 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7953 (write_enn, initialize_async_io, enable_async_io)
7954 (disable_async_io, check_remote_input_interrupt_request)
7955 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7956 (dead_thread_notify, prepare_resume_reply)
7957 (decode_address_to_semicolon, decode_address, decode_m_packet)
7958 (decode_M_packet, decode_X_packet, decode_xfer_write)
7959 (decode_search_memory_packet, unhexify, hexify)
7960 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7961 (look_up_one_symbol, relocate_instruction)
7962 (monitor_output): Move to remote-utils.h, and include it.
7963 * remote-utils.h: New file.
7964
eebdf26b
PA
79652013-09-05 Pedro Alves <palves@redhat.com>
7966
7967 * server.h (_): Delete.
7968
3aafd2ff
PA
79692013-09-02 Pedro Alves <palves@redhat.com>
7970
7971 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7972 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7973 allocated.
7974 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7975
cee83bcb
PM
79762013-09-02 Pierre Muller <muller@sourceware.org>
7977
7978 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7979 or WriteProcessMemory complete successfully and handle
7980 ERROR_PARTIAL_COPY error.
7981
9a13b2fa
PA
79822013-09-02 Pedro Alves <palves@redhat.com>
7983
7984 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7985 error instead of EIO.
7986
602e3198
JK
79872013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7988
7989 PR server/15604
7990 * linux-low.c: Include filestuff.h.
7991 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7992 * lynx-low.c: Include filestuff.h.
7993 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7994 * server.c: Include filestuff.h.
7995 (main): Call notice_open_fds.
7996 * spu-low.c: Include filestuff.h.
7997 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7998
96d7229d
LM
79992013-08-22 Luis Machado <lgustavo@codesourcery.com>
8000
8001 * Makefile.in: Explain why ../target and ../nat are not
8002 listed as include file search paths.
8003 (linux-waitpid.o): New object file rule.
8004 * configure.srv (srv_native_linux_obj): New variable.
8005 Replace all occurrences of linux native object files with
8006 $srv_native_linux_obj.
8007 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8008 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8009 (linux_enable_event_reporting): Remove declaration.
8010 (my_waitpid): Moved to common/linux-waitpid.c.
8011 (linux_wait_for_event): Pass ptid when calling
8012 linux_enable_event_reporting.
8013 (linux_supports_tracefork_flag): Remove.
8014 (linux_enable_event_reporting): Likewise.
8015 (linux_tracefork_grandchild): Remove.
8016 (STACK_SIZE): Moved to common/linux-ptrace.c.
8017 (linux_tracefork_child): Remove.
8018 (linux_test_for_tracefork): Remove.
8019 (linux_look_up_symbols): Call linux_supports_traceclone.
8020 (initialize_low): Remove call to linux_test_for_tracefork.
8021 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8022 common/linux-ptrace.h.
8023 (PTRACE_TYPE_ARG4): Likewise.
8024 Include linux-ptrace.h.
8025
32940073
PA
80262013-08-21 Pedro Alves <palves@redhat.com>
8027
8028 * config.in: Renegerate.
8029
33b60d58 80302013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8031
33b60d58
LM
8032 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8033 (SFILES): Remove $(srcdir)/common/target-common.c and
8034 add $(srcdir)/target/waitstatus.c.
8035 (OBS): Remove target-common.o and add waitstatus.o.
8036 (server_h): Remove $(srcdir)/../common/target-common.h and
8037 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8038 and $(srcdir)/../target/waitstatus.h.
8039 (target-common.o): Remove.
8040 (waitstatus.o): New target object file.
8041 * target.h: Do not include target-common.h and
8042 include target/resume.h, target/wait.h and
8043 target/waitstatus.h.
8044
b8e1b30e
LM
80452013-08-13 Luis Machado <lgustavo@codesourcery.com>
8046
8047 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8048 to PTRACE_TYPE_ARG3.
8049 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8050 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8051 PTRACE_TYPE_ARG4.
8052 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8053 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8054
7a60ad40
YQ
80552013-07-27 Jie Zhang <jie@codesourcery.com>
8056 Daniel Jacobowitz <dan@codesourcery.com>
8057 Yao Qi <yao@codesourcery.com>
8058
8059 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8060 (mips-linux-watch.o): New rule.
8061 (mips_linux_watch_h): New variable.
8062 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8063 srv_tgtobj.
8064 * linux-mips-low.c: Include mips-linux-watch.h.
8065 (struct arch_process_info, struct arch_lwp_info): New.
8066 (update_watch_registers_callback): New function.
8067 (mips_linux_new_process, mips_linux_new_thread) New functions.
8068 (mips_linux_prepare_to_resume, mips_insert_point): New
8069 functions.
8070 (mips_remove_point, mips_stopped_by_watchpoint): New
8071 functions.
8072 (rsp_bp_type_to_target_hw_bp_type): New function.
8073 (mips_stopped_data_address): New function.
8074 (the_low_target): Add watchpoint support functions.
8075
de6f69ad
YQ
80762013-07-27 Yao Qi <yao@codesourcery.com>
8077
8078 * i386-low.c: Include break-common.h.
8079 (enum target_hw_bp_type): Remove.
8080
3360c0bf
LM
80812013-07-24 Luis Machado <lgustavo@codesourcery.com>
8082
8083 * Makefile.in (SFILES): /common/target-common.c.
8084 (OBS): Add target-common.o.
8085 (server_h): Add $(srcdir)/../common/target-common.h.
8086 (target-common.o): New target.
8087 * server.c (queue_stop_reply_callback): Free
8088 status string after use.
8089 * target.c (target_waitstatus_to_string): Remove.
8090 * target.h: Include target-common.h.
8091 (resume_kind): Likewise.
8092 (target_waitkind): Likewise.
8093 (target_waitstatus): Likewise.
8094 (TARGET_WNOHANG): Likewise.
8095
bd885420
YQ
80962013-07-04 Yao Qi <yao@codesourcery.com>
8097
8098 * Makefile.in (host_alias): Use @host_noncanonical@.
8099 (target_alias): Use @target_noncanonical@.
8100 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8101 ACX_NONCANONICAL_HOST.
8102 * configure: Regenerated.
8103
8104 Revert:
8105 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8106
8107 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8108 * configure: Rebuild.
8109 * Makefile.in (version_host, version_target): Get from configure.
8110 (version.c): Use $(version_host) and $(version_target).
8111
17ef446e
PA
81122013-07-03 Pedro Alves <palves@redhat.com>
8113
8114 * Makefile.in (config.status): Depend on development.sh.
8115 * acinclude.m4: Include libmcheck.m4.
8116 * configure: Regenerate.
8117
7a9a7487
MG
81182013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8119
8120 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8121 attribute inside the parentheses.
8122 (winapi_DebugSetProcessKillOnExit): Ditto.
8123 (winapi_DebugBreakProcess): Ditto.
8124 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8125
49b64de6
MG
81262013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8127
8128 * notif.h (notif_event): Add a dummy member to avoid compiler
8129 errors.
8130
d5749ee7
PA
81312013-07-01 Pedro Alves <palves@redhat.com>
8132
8133 * hostio.c (HOSTIO_PATH_MAX): Define.
8134 (require_filename, handle_open, handle_unlink, handle_readlink):
8135 Use it.
8136
d8d2a3ee
PA
81372013-07-01 Pedro Alves <palves@redhat.com>
8138
8139 * server.h: Include "pathmax.h".
8140 * linux-low.c: Don't include sys/param.h.
8141 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8142 MAXPATHLEN.
8143 * win32-low.c: Don't include sys/param.h.
8144 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8145
bc7dea8d
PA
81462013-07-01 Pedro Alves <palves@redhat.com>
8147
8148 * event-loop.c: Don't check HAVE_UNISTD_H before including
8149 <unistd.h>.
8150 * gdbreplay.c: Likewise.
8151 * remote-utils.c: Likewise.
8152 * server.c: Likewise.
8153 * configure.ac: Don't check for unistd.h.
8154 * configure: Regenerate.
8155
d6c2da54
TT
81562013-06-28 Tom Tromey <tromey@redhat.com>
8157
8158 * Makefile.in (version.c): Use version.in, not
8159 common/version.in.
8160
257b6bec
MG
81612013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8162
8163 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8164 * configure: Rebuild.
8165 * Makefile.in (version_host, version_target): Get from configure.
8166 (version.c): Use $(version_host) and $(version_target).
8167
86ebe149
DK
81682013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8169
8170 Fix trace-status to output user name without trailing colon.
8171 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8172
f30aa5af
DK
81732013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8174
8175 Fix trace-status to output proper start-time and stop-time.
8176 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8177 output start time and stop time in hex as gdb expects.
8178
28a93511
YQ
81792013-06-26 Pedro Alves <pedro@codesourcery.com>
8180
8181 * tracepoint.c (build_traceframe_info_xml): Output trace state
8182 variables present in the trace buffer.
8183
01208463
TT
81842013-06-24 Tom Tromey <tromey@redhat.com>
8185
8186 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8187 create-version.sh.
8188 (version.o): Remove.
8189 * gdbreplay.c: Include version.h.
8190 (version, host_name): Don't declare.
8191 * server.h: Include version.h.
8192 (version, host_name): Don't declare.
8193
760256f9
PA
81942013-06-12 Pedro Alves <palves@redhat.com>
8195
8196 * linux-x86-low.c (linux_is_elf64): Delete global.
8197 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8198 with local linux_pid_exe_is_elf_64_file use.
8199
030031ee
PA
82002013-06-11 Pedro Alves <palves@redhat.com>
8201
8202 * linux-low.c (regset_disabled, disable_regset): New functions.
8203 (regsets_fetch_inferior_registers)
8204 (regsets_store_inferior_registers): Use them.
8205 (initialize_regsets_info); Don't allocate the disabled_regsets
8206 array here.
8207 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8208 comment.
8209
5da6eb0a
PA
82102013-06-11 Pedro Alves <palves@redhat.com>
8211
8212 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8213 xmalloc.
8214
7e5aaa09
PA
82152013-06-11 Pedro Alves <palves@redhat.com>
8216
8217 * linux-x86-low.c (initialize_low_arch): Call
8218 init_registers_x32_avx_linux.
8219
d878444c
JK
82202013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8221
8222 Fix compatibility with Android Bionic.
8223 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8224 it is not empty.
8225
3aee8918
PA
82262013-06-07 Pedro Alves <palves@redhat.com>
8227
5f2b57b5 8228 PR server/14823
3aee8918
PA
8229 * Makefile.in (OBS): Add tdesc.o.
8230 (IPA_OBJS): Add tdesc-ipa.o.
8231 (tdesc-ipa.o): New rule.
8232 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8233 interface.
8234 * linux-low.c (new_inferior): Delete.
8235 (disabled_regsets, num_regsets): Delete.
8236 (linux_add_process): Adjust to set the new per-process
8237 new_inferior flag.
8238 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8239 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8240 was a stop. When calling arch_setup, switch the current inferior
8241 to the thread that got an event.
8242 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8243 (regsets_fetch_inferior_registers)
8244 (regsets_store_inferior_registers): New regsets_info parameter.
8245 Adjust to use it.
8246 (linux_register_in_regsets): New regs_info parameter. Adjust to
8247 use it.
8248 (register_addr, fetch_register, store_register): New usrregs_info
8249 parameter. Adjust to use it.
8250 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8251 parameter regs_info. Adjust to use it.
8252 (linux_fetch_registers): Get the current inferior's regs_info, and
8253 adjust to use it.
8254 (linux_store_registers): Ditto.
8255 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8256 (initialize_low): Don't initialize the target_regsets here. Call
8257 initialize_low_arch.
8258 * linux-low.h (target_regsets): Delete declaration.
8259 (struct regsets_info): New.
8260 (struct usrregs_info): New.
8261 (struct regs_info): New.
8262 (struct process_info_private) <new_inferior>: New field.
8263 (struct linux_target_ops): Delete the num_regs, regmap, and
8264 regset_bitmap fields. New field regs_info.
8265 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8266 * i387-fp.c (num_xmm_registers): Delete.
8267 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8268 calls to new interface.
8269 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8270 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8271 Infer the number of xmm registers from the regcache's target
8272 description.
8273 * i387-fp.h (num_xmm_registers): Delete.
8274 * inferiors.c (add_thread): Don't install the thread's regcache
8275 here.
8276 * proc-service.c (gregset_info): Fetch the current inferior's
8277 regs_info. Adjust to use it.
8278 * regcache.c: Include tdesc.h.
8279 (register_bytes, reg_defs, num_registers)
8280 (gdbserver_expedite_regs): Delete.
8281 (get_thread_regcache): If the thread doesn't have a regcache yet,
8282 create one, instead of aborting gdbserver.
8283 (regcache_invalidate_one): Rename to ...
8284 (regcache_invalidate_thread): ... this.
8285 (regcache_invalidate_one): New.
8286 (regcache_invalidate): Only invalidate registers of the current
8287 process.
8288 (init_register_cache): Add target_desc parameter, and use it.
8289 (new_register_cache): Ditto. Assert the target description has a
8290 non zero registers_size.
8291 (regcache_cpy): Add assertions. Adjust.
8292 (realloc_register_cache, set_register_cache): Delete.
8293 (registers_to_string, registers_from_string): Adjust.
8294 (find_register_by_name, find_regno, find_register_by_number)
8295 (register_cache_size): Add target_desc parameter, and use it.
8296 (free_register_cache_thread, free_register_cache_thread_one)
8297 (regcache_release, register_cache_size): New.
8298 (register_size): Add target_desc parameter, and use it.
8299 (register_data, supply_register, supply_register_zeroed)
8300 (supply_regblock, supply_register_by_name, collect_register)
8301 (collect_register_as_string, collect_register_by_name): Adjust.
8302 * regcache.h (struct target_desc): Forward declare.
8303 (struct regcache) <tdesc>: New field.
8304 (init_register_cache, new_register_cache): Add target_desc
8305 parameter.
8306 (regcache_invalidate_thread): Declare.
8307 (regcache_invalidate_one): Delete declaration.
8308 (regcache_release): Declare.
8309 (find_register_by_number, register_cache_size, register_size)
8310 (find_regno): Add target_desc parameter.
8311 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8312 declarations.
8313 * remote-utils.c: Include tdesc.h.
8314 (outreg, prepare_resume_reply): Adjust.
8315 * server.c: Include tdesc.h.
8316 (gdbserver_xmltarget): Delete declaration.
8317 (get_features_xml, process_serial_event): Adjust.
8318 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8319 declare.
8320 (struct process_info) <tdesc>: New field.
8321 (ipa_tdesc): Declare.
8322 * tdesc.c: New file.
8323 * tdesc.h: New file.
8324 * tracepoint.c: Include tdesc.h.
8325 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8326 (get_context_regcache): Adjust to pass ipa_tdesc down.
8327 (do_action_at_tracepoint): Adjust to get the register cache size
8328 from the context regcache's description.
8329 (traceframe_walk_blocks): Adjust to get the register cache size
8330 from the current trace frame's description.
8331 (traceframe_get_pc): Adjust to get current trace frame's
8332 description and pass it down.
8333 (gdb_collect): Adjust to get the register cache size from the
8334 IPA's description.
8335 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8336 (gdbserver_xmltarget): Delete.
8337 (initialize_low_tracepoint): Set the ipa's target description.
8338 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8339 (initialize_low_tracepoint): Set the ipa's target description.
8340 * linux-x86-low.c: Include tdesc.h.
8341 [__x86_64__] (is_64bit_tdesc): New.
8342 (ps_get_thread_area, x86_get_thread_area): Use it.
8343 (i386_cannot_store_register): Rename to ...
8344 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8345 (i386_cannot_fetch_register): Rename to ...
8346 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8347 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8348 to new interface.
8349 (target_regsets): Rename to ...
8350 (x86_regsets): ... this.
8351 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8352 interface.
8353 (x86_siginfo_fixup): Use is_64bit_tdesc.
8354 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8355 (tdesc_x32_avx_linux, tdesc_x32_linux)
8356 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8357 Declare.
8358 (x86_linux_update_xmltarget): Delete.
8359 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8360 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8361 (AMD64_LINUX_USER64_CS): New.
8362 (x86_linux_read_description): New, based on
8363 x86_linux_update_xmltarget.
8364 (same_process_callback): New.
8365 (x86_arch_setup_process_callback): New.
8366 (x86_linux_update_xmltarget): New.
8367 (x86_regsets_info): New.
8368 (amd64_linux_regs_info): New.
8369 (i386_linux_usrregs_info): New.
8370 (i386_linux_regs_info): New.
8371 (x86_linux_regs_info): New.
8372 (x86_arch_setup): Reimplement.
8373 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8374 (x86_emit_ops): Ditto.
8375 (the_low_target): Adjust. Install x86_linux_regs_info,
8376 x86_cannot_fetch_register, and x86_cannot_store_register.
8377 (initialize_low_arch): New.
8378 * linux-ia64-low.c (tdesc_ia64): Declare.
8379 (ia64_fetch_register): Adjust.
8380 (ia64_usrregs_info, regs_info): New globals.
8381 (ia64_regs_info): New function.
8382 (the_low_target): Adjust.
8383 (initialize_low_arch): New function.
8384 * linux-sparc-low.c (tdesc_sparc64): Declare.
8385 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8386 Adjust.
8387 (sparc_arch_setup): New function.
8388 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8389 (the_low_target): Adjust.
8390 (initialize_low_arch): New function.
8391 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8392 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8393 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8394 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8395 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8396 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8397 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8398 (tdesc_powerpc_isa205_vsx64l): Declare.
8399 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8400 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8401 (ppc_set_pc, ppc_get_hwcap): Adjust.
8402 (ppc_usrregs_info): Forward declare.
8403 (!__powerpc64__) ppc_regmap_adjusted: New global.
8404 (ppc_arch_setup): Adjust to the current process'es target
8405 description.
8406 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8407 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8408 (ppc_store_evrregset): Adjust.
8409 (target_regsets): Rename to ...
8410 (ppc_regsets): ... this, and make static.
8411 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8412 (ppc_regs_info): New function.
8413 (the_low_target): Adjust.
8414 (initialize_low_arch): New function.
8415 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8416 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8417 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8418 (tdesc_s390x_linux64v2): Declare.
8419 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8420 (s390_fill_gregset, s390_store_last_break): Adjust.
8421 (target_regsets): Rename to ...
8422 (s390_regsets): ... this, and make static.
8423 (s390_get_pc, s390_set_pc): Adjust.
8424 (s390_get_hwcap): New target_desc parameter, and use it.
8425 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8426 (s390_arch_setup): Adjust to set the current process'es target
8427 description. Don't adjust the regmap.
8428 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8429 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8430 (regs_info_3264): New globals.
8431 (s390_regs_info): New function.
8432 (the_low_target): Adjust.
8433 (initialize_low_arch): New function.
8434 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8435 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8436 [__mips64] (init_registers_mips_linux)
8437 (init_registers_mips_dsp_linux): Delete defines.
8438 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8439 (have_dsp): New global.
8440 (mips_read_description): New, based on mips_arch_setup.
8441 (mips_arch_setup): Reimplement.
8442 (get_usrregs_info): New function.
8443 (mips_cannot_fetch_register, mips_cannot_store_register)
8444 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8445 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8446 (target_regsets): Rename to ...
8447 (mips_regsets): ... this, and make static.
8448 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8449 (dsp_regs_info, regs_info): New globals.
8450 (mips_regs_info): New function.
8451 (the_low_target): Adjust.
8452 (initialize_low_arch): New function.
8453 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8454 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8455 Declare.
8456 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8457 (arm_read_description): New, with bits factored from
8458 arm_arch_setup.
8459 (arm_arch_setup): Reimplement.
8460 (target_regsets): Rename to ...
8461 (arm_regsets): ... this, and make static.
8462 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8463 (arm_regs_info): New function.
8464 (the_low_target): Adjust.
8465 (initialize_low_arch): New function.
8466 * linux-m68k-low.c (tdesc_m68k): Declare.
8467 (target_regsets): Rename to ...
8468 (m68k_regsets): ... this, and make static.
8469 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8470 (m68k_regs_info): New function.
8471 (m68k_arch_setup): New function.
8472 (the_low_target): Adjust.
8473 (initialize_low_arch): New function.
8474 * linux-sh-low.c (tdesc_sharch): Declare.
8475 (target_regsets): Rename to ...
8476 (sh_regsets): ... this, and make static.
8477 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8478 (sh_regs_info, sh_arch_setup): New functions.
8479 (the_low_target): Adjust.
8480 (initialize_low_arch): New function.
8481 * linux-bfin-low.c (tdesc_bfin): Declare.
8482 (bfin_arch_setup): New function.
8483 (bfin_usrregs_info, regs_info): New globals.
8484 (bfin_regs_info): New function.
8485 (the_low_target): Adjust.
8486 (initialize_low_arch): New function.
8487 * linux-cris-low.c (tdesc_cris): Declare.
8488 (cris_arch_setup): New function.
8489 (cris_usrregs_info, regs_info): New globals.
8490 (cris_regs_info): New function.
8491 (the_low_target): Adjust.
8492 (initialize_low_arch): New function.
8493 * linux-cris-low.c (tdesc_crisv32): Declare.
8494 (cris_arch_setup): New function.
8495 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8496 (cris_regs_info): New function.
8497 (the_low_target): Adjust.
8498 (initialize_low_arch): New function.
8499 * linux-m32r-low.c (tdesc_m32r): Declare.
8500 (m32r_arch_setup): New function.
8501 (m32r_usrregs_info, regs_info): New globals.
8502 (m32r_regs_info): Adjust.
8503 (initialize_low_arch): New function.
8504 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8505 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8506 (tic6x_usrregs_info): Forward declare.
8507 (tic6x_read_description): New function, based on ...
8508 (tic6x_arch_setup): ... this. Reimplement.
8509 (target_regsets): Rename to ...
8510 (tic6x_regsets): ... this, and make static.
8511 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8512 (tic6x_regs_info): New function.
8513 (the_low_target): Adjust.
8514 (initialize_low_arch): New function.
8515 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8516 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8517 (target_regsets): Rename to ...
8518 (xtensa_regsets): ... this, and make static.
8519 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8520 globals.
8521 (xtensa_arch_setup, xtensa_regs_info): New functions.
8522 (the_low_target): Adjust.
8523 (initialize_low_arch): New function.
8524 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8525 (nios2_arch_setup): Set the current process'es tdesc.
8526 (target_regsets): Rename to ...
8527 (nios2_regsets): ... this.
8528 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8529 (nios2_regs_info): New function.
8530 (the_low_target): Adjust.
8531 (initialize_low_arch): New function.
a261b8f5
PA
8532 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8533 (aarch64_arch_setup): Set the current process'es tdesc.
8534 (target_regsets): Rename to ...
8535 (aarch64_regsets): ... this.
8536 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8537 (aarch64_regs_info): New function.
8538 (the_low_target): Adjust.
8539 (initialize_low_arch): New function.
3aee8918
PA
8540 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8541 globals.
8542 (target_regsets): Rename to ...
8543 (tile_regsets): ... this.
8544 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8545 (tile_regs_info): New function.
8546 (tile_arch_setup): Set the current process'es tdesc.
8547 (the_low_target): Adjust.
8548 (initialize_low_arch): New function.
8549 * spu-low.c (tdesc_spu): Declare.
8550 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8551 * win32-arm-low.c (tdesc_arm): Declare.
8552 (arm_arch_setup): New function.
8553 (the_low_target): Install arm_arch_setup instead of
8554 init_registers_arm.
8555 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8556 (init_windows_x86): Rename to ...
8557 (i386_arch_setup): ... this. Set `win32_tdesc'.
8558 (the_low_target): Adjust.
8559 * win32-low.c (win32_tdesc): New global.
8560 (child_add_thread): Don't create the thread cache here.
8561 (do_initial_child_stuff): Set the new process'es tdesc.
8562 * win32-low.h (struct target_desc): Forward declare.
8563 (win32_tdesc): Declare.
8564 * lynx-i386-low.c (tdesc_i386): Declare global.
8565 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8566 * lynx-low.c (lynx_tdesc): New global.
8567 (lynx_add_process): Set the new process'es tdesc.
8568 * lynx-low.h (struct target_desc): Forward declare.
8569 (lynx_tdesc): Declare global.
8570 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8571 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8572 * nto-low.c (nto_tdesc): New global.
8573 (do_attach): Set the new process'es tdesc.
8574 * nto-low.h (struct target_desc): Forward declare.
8575 (nto_tdesc): Declare.
8576 * nto-x86-low.c (tdesc_i386): Declare.
8577 (nto_x86_arch_setup): Set `nto_tdesc'.
8578
b1fbec62
GB
85792013-06-04 Gary Benson <gbenson@redhat.com>
8580
8581 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8582 to qSupported response when appropriate.
8583 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8584 with nonzero-length annex.
8585 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8586 arguments supplied in annex.
8587
d1ec4ce7
DE
85882013-05-31 Doug Evans <dje@google.com>
8589
ac44adcb 8590 PR server/15594
d1ec4ce7
DE
8591 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8592 64 bits in 64-cross-32 environment.
8593
9b25f2d3
PA
85942013-05-28 Pedro Alves <palves@redhat.com>
8595
8596 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8597 (aarch64-without-fpu.c): Delete rule.
8598 * configure.srv (aarch64*-*-linux*): Remove references to
8599 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8600 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8601 declaration.
8602
6740dc9c
PA
86032013-05-24 Pedro Alves <palves@redhat.com>
8604
8605 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8606 instead of strchr/decode_address. Error if the range isn't split
8607 with a ','. Don't assume there's be a ':' in the action.
8608
c2d6af84
PA
86092013-05-23 Yao Qi <yao@codesourcery.com>
8610 Pedro Alves <palves@redhat.com>
8611
8612 * linux-low.c (lwp_in_step_range): New function.
8613 (linux_wait_1): If the thread was range stepping and stopped
8614 outside the stepping range, report the stop to GDB. Otherwise,
8615 continue stepping. Add range stepping debug output.
8616 (linux_set_resume_request): Copy the step range from the resume
8617 request to the lwp.
8618 (linux_supports_range_stepping): New.
8619 (linux_target_ops) <supports_range_stepping>: Set to
8620 linux_supports_range_stepping.
8621 * linux-low.h (struct linux_target_ops)
8622 <supports_range_stepping>: New field.
8623 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8624 * linux-x86-low.c (x86_supports_range_stepping): New.
8625 (the_low_target) <supports_range_stepping>: Set to
8626 x86_supports_range_stepping.
8627 * server.c (handle_v_cont): Handle 'r' action.
8628 (handle_v_requests): Append ";r" if the target supports range
8629 stepping.
8630 * target.h (struct thread_resume) <step_range_start,
8631 step_range_end>: New fields.
8632 (struct target_ops) <supports_range_stepping>:
8633 New field.
8634 (target_supports_range_stepping): New macro.
8635
58794e1a
JB
86362013-05-17 Joel Brobecker <brobecker@adacore.com>
8637
8638 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8639 confusion in comment.
8640
d631c5a7
JB
86412013-05-17 Joel Brobecker <brobecker@adacore.com>
8642
8643 * lynx-low.c (struct process_info_private): New type.
8644 (lynx_add_process): New function.
8645 (lynx_create_inferior, lynx_attach): Replace calls to
8646 add_process by calls to lynx_add_process.
8647 (lynx_resume): If PTID is null, then try using
8648 current_process()->private->last_wait_event_ptid.
8649 Add comments.
8650 (lynx_clear_inferiors): Delete. The contents of that function
8651 has been inlined in lynx_mourn;
8652 (lynx_wait_1): Save the ptid in the process's private data.
8653 (lynx_mourn): Free the process' private data. Replace call
8654 to lynx_clear_inferiors by call to clear_inferiors.
8655
96f7a20f
YQ
86562013-05-17 Yao Qi <yao@codesourcery.com>
8657
8658 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8659 the right place.
8660
db0dfaa0
LM
86612013-05-16 Luis Machado <lgustavo@codesourcery.com>
8662
8663 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8664 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8665 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8666 PT_TEXT_END_ADDR guards. Update comments.
8667 (linux_target_op) <read_offsets>: Conditionally define to
8668 linux_read_offsets if the target is UCLIBC and if it defines
8669 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8670
68f5f838
SL
86712013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8672 Andrew Jenner <andrew@codesourcery.com>
8673
8674 * Makefile.in (SFILES): Add linux-nios2-low.c.
8675 (clean): Add action to delete nios2-linux.c.
8676 (nios2-linux.c): New rule.
8677 * configure.srv: Add nios2*-*-linux*.
8678 * linux-nios2-low.c: New.
8679
1ebff1fd
HAQ
86802013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8681
8682 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8683
f6150862
HZ
86842013-04-25 Hui Zhu <hui@codesourcery.com>
8685
8686 PR gdb/15186
f6150862
HZ
8687 * ax.c (ax_printf): Add fflush.
8688
614c279d
TT
86892013-04-22 Tom Tromey <tromey@redhat.com>
8690
8691 * Makefile.in (SFILES): Add filestuff.c.
8692 (OBS): Add filestuff.o.
8693 (filestuff.o): New target.
8694 * config.in, configure: Rebuild.
8695 * configure.ac: Check for fdwalk, pipe2.
8696
7d4e5717
PA
86972013-04-17 Pedro Alves <palves@redhat.com>
8698
8699 * configure.ac (USE_THREAD_DB): Delete variable.
8700 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8701 Don't AC_SUBST USE_THREAD_DB.
8702 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8703 * config.in, configure: Regenerate.
8704
d5c93e41
PA
87052013-04-16 Pedro Alves <palves@redhat.com>
8706
8707 * linux-low.h (struct lwp_info) <thread_known>: Move under
8708 the USE_THREAD_DB #ifdef.
8709
04f5fe89
PA
87102013-04-16 Pedro Alves <palves@redhat.com>
8711
8712 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8713 (linux-low.o): Delete rule.
8714 * linux-low.h: Always include "gdb_thread_db.h" instead of
8715 conditionally including thread_db.h.
8716 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8717 HAVE_THREAD_DB_H.
8718
480b27bf
JK
87192013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8720
8721 * Makefile.in (install-only): Fix make install regression.
8722
43662968
JK
87232013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8724
8725 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8726 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8727 installation.
8728 * gdbserver.1: Remove.
8729
3e74e146
PA
87302013-03-22 Pedro Alves <palves@redhat.com>
8731
8732 * linux-low.c (handle_extended_wait): Don't call
8733 linux_enable_event_reporting.
8734
a8347a2a
TT
87352013-03-15 Tony Theodore <tonyt@logyst.com>
8736
8737 PR build/9098:
8738 * Makefile.in (SHELL): Use @SHELL@.
8739
eeb56fa7
SDJ
87402013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8741
8742 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8743 compiler warning.
8744
4fa7e2ff
JB
87452013-03-13 Joel Brobecker <brobecker@adacore.com>
8746
8747 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8748 Remove extraneous NULL element.
8749
8ddb1965
YQ
87502013-03-13 Yao Qi <yao@codesourcery.com>
8751
8752 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8753 'V' block in trace frame.
8754
9accd112
MM
87552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8756
8757 * target.h (struct target_ops): Add btrace ops.
8758 (target_supports_btrace): New macro.
8759 (target_enable_btrace): New macro.
8760 (target_disable_btrace): New macro.
8761 (target_read_btrace): New macro.
8762 * gdbthread.h (struct thread_info): Add btrace field.
8763 * server.c: Include btrace-common.h.
8764 (handle_btrace_general_set): New function.
8765 (handle_btrace_enable): New function.
8766 (handle_btrace_disable): New function.
8767 (handle_general_set): Call handle_btrace_general_set.
8768 (handle_qxfer_btrace): New function.
8769 (struct qxfer qxfer_packets[]): Add btrace entry.
8770 * inferiors.c (remove_thread): Disable btrace.
8771 * linux-low: Include linux-btrace.h.
8772 (linux_low_enable_btrace): New function.
8773 (linux_low_read_btrace): New function.
8774 (linux_target_ops): Add btrace ops.
8775 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8776 Add srv_linux_btrace=yes.
8777 (x86_64-*-linux*): Add linux-btrace.o.
8778 Add srv_linux_btrace=yes.
8779 * configure.ac: Define HAVE_LINUX_BTRACE.
8780 * config.in: Regenerated.
8781 * configure: Regenerated.
8782
5cc22e4c
MM
87832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8784
8785 * server.c (handle_qxfer): Preserve error message if -3 is
8786 returned.
8787 (qxfer): Document the -3 return value.
8788
7c97f91e
MM
87892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8790
8791 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8792 (linux_btrace_h): New variable.
8793 (linux-btrace.o): New rule.
8794
be9a119c 87952013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8796 Hafiz Abid Qadeer <abidh@codesourcery.com>
8797
8798 * tracepoint.c (trace_buffer_size): New global.
8799 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8800 (init_trace_buffer): Change to one-argument function. Allocate
8801 trace buffer memory.
8802 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8803 handle QTBuffer:size packet.
8804 (cmd_bigqtbuffer_size): New function.
8805 (initialize_tracepoint): Call init_trace_buffer with
8806 DEFAULT_TRACE_BUFFER_SIZE.
8807 * server.c (handle_query): Add QTBuffer:size in the
8808 supported packets.
8809
e64f7499
YQ
88102013-03-07 Yao Qi <yao@codesourcery.com>
8811
8812 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8813 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8814 of -1.
8815 (cmd_qtsp): Adjust condition. Do post increment.
8816 Set cur_action and cur_step_action back to 0.
8817
f0ae6fc3
PA
88182013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8819
8820 PR server/15236
8821 * linux-low.c (linux_write_memory): Return early success if LEN is
8822 zero.
8823
b5b0b0af
CV
88242013-03-05 Corinna Vinschen <vinschen@redhat.de>
8825
334ad4a8 8826 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8827
589bc927
TT
88282013-02-28 Tom Tromey <tromey@redhat.com>
8829
8830 * configure.ac: Invoke AC_SYS_LARGEFILE.
8831 * configure, config.in: Rebuild.
8832
dfe07582
CV
88332013-02-28 Corinna Vinschen <vinschen@redhat.com>
8834
8835 * win32-low.c: Throughout, fix format strings and casts of
8836 printf-like functions to avoid type related warnings on all
8837 platforms.
8838 (get_child_debug_event): Print dwDebugEventCode as hex since
8839 that's how it's usually documented.
8840
736cd585
YQ
88412013-02-28 Yao Qi <yao@codesourcery.com>
8842
8843 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8844 pulongest.
8845
e1f58301
JW
88462013-02-27 Jiong Wang <jiwang@tilera.com>
8847
8848 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8849 (reg-tilegx32.c): New rule.
8850 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8851 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8852 different register info initializer according to elf class.
8853 (init_registers_tilgx32): New function. The tilegx32 register info
8854 initializer.
8855 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8856 (tile_store_gregset): Likewise.
8857
d171ca78
YQ
88582013-02-27 Yao Qi <yao@codesourcery.com>
8859
8860 * server.c (process_point_options): Print debug message when
8861 debug_threads is true.
8862
282bbdf3
YQ
88632013-02-26 Yao Qi <yao@codesourcery.com>
8864
8865 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8866
aca22551
PA
88672013-02-19 Pedro Alves <palves@redhat.com>
8868 Kai Tietz <ktietz@redhat.com>
8869
8870 PR gdb/15161
8871
8872 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8873 instead of strtoul to extract address from packet.
8874 (process_serial_event) <'z'>: Likewise.
8875
4f3cee1c
YQ
88762013-02-18 Yao Qi <yao@codesourcery.com>
8877
8878 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8879
8e1d55a3
PA
88802013-02-14 Pedro Alves <palves@redhat.com>
8881
8882 Plug memory leak.
8883
8884 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8885 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8886
458820da
PA
88872013-02-14 Pedro Alves <palves@redhat.com>
8888
8889 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8890
baea0dae
PA
88912013-02-14 Pedro Alves <palves@redhat.com>
8892
8893 * tracepoint.c (save_string): Delete.
8894 (add_tracepoint_action): Use savestring instead of save_string.
8895
0b1afbb3
PA
88962013-02-12 Pedro Alves <palves@redhat.com>
8897
8898 * linux-xtensa-low.c: Ditto.
8899 * xtensa-xtregs.c: Ditto.
8900
8a4ac37e
PA
89012013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8902
8903 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8904 thread_db.
8905
148de6bb
MS
89062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8907
8908 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8909 aarch64_num_wp_regs and aarch64_num_bp_regs to
8910 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8911
55fac6e0
MS
89122013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8913
8914 * linux-aarch64-low.c (ps_get_thread_area): Replace
8915 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8916
176eb98c
MS
89172013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8918 Marcus Shawcroft <marcus.shawcroft@arm.com>
8919 Nigel Stephens <nigel.stephens@arm.com>
8920 Yufeng Zhang <yufeng.zhang@arm.com>
8921
8922 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8923 (aarch64.c, aarch64-without-fpu.c): New targets.
8924 * configure.srv (aarch64*-*-linux*): New.
8925 * linux-aarch64-low.c: New file.
8926
56f7af9c
MS
89272013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8928
43aaf8b6 8929 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8930 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8931 (dequeue_one_deferred_signal, linux_resume_one_thread)
8932 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8933 (linux_tracefork_grandchild, linux_test_for_tracefork)
8934 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8935 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8936 where the argument is 0.
8937
60f662b0
YQ
89382013-01-25 Yao Qi <yao@codesourcery.com>
8939
8940 * event-loop.c: Include "queue.h".
8941 (gdb_event_p): New typedef.
8942 (struct gdb_event) <next_event>: Remove.
8943 (event_queue): Change to QUEUE(gdb_event_p).
8944 (async_queue_event): Remove.
8945 (gdb_event_xfree): New.
8946 (initialize_event_loop): New.
8947 (process_event): Use API from QUEUE.
8948 (wait_for_event): Likewise.
8949 * server.c (main): Call initialize_event_loop.
8950 * server.h (initialize_event_loop): Declare.
8951
5ae4861a
YQ
89522013-01-18 Yao Qi <yao@codesourcery.com>
8953
8954 * ax.h (struct eval_agent_expr_context): New.
8955 (gdb_eval_agent_expr): Update declaration.
8956 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8957 TFRAME. Add new argument CTX.
8958 * server.h (struct eval_agent_expr_context): Declare.
8959 (agent_mem_read, agent_tsv_read): Update declaration.
8960 (agent_mem_read_string): Likewise.
8961 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8962 (add_traceframe_block): Add new argument TPOINT.
8963 Increase TPOINT->traceframe_usage.
8964 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8965 eval_tracepoint_agent_expr.
8966 (condition_true_at_tracepoint): Likewise.
8967 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8968 (agent_mem_read_string, agent_tsv_read): Likewise.
8969
85e00e85
YQ
89702013-01-16 Yao Qi <yao@codesourcery.com>
8971
8972 * linux-low.c (linux_resume_one_lwp): Don't check
8973 'lwp->bp_reinsert != 0'.
8974
4039cf45
JB
89752013-01-07 Joel Brobecker <brobecker@adacore.com>
8976 Pedro Alves <palves@redhat.com>
8977
8978 * lynx-low.c (ptrace_request_to_str): Define a temporary
8979 macro and use it to simplify this function's implementation.
8980
9044dee2
JB
89812013-01-07 Joel Brobecker <brobecker@adacore.com>
8982
8983 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8984 sets errno.
8985
e6352c8f
JB
89862013-01-07 Joel Brobecker <brobecker@adacore.com>
8987
8988 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8989
50681a27
JB
89902013-01-07 Joel Brobecker <brobecker@adacore.com>
8991
8992 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8993
3f6e77ef
JB
89942013-01-07 Joel Brobecker <brobecker@adacore.com>
8995
8996 * lynx-low.c (lynx_resume): Use the resume_info parameter
8997 to determine the ptid for the lynx_ptrace call, unless
8998 it is equal to minus_one_ptid, in which case we use the
8999 ptid of the current_inferior.
9000 (lynx_wait_1): After having received a thread create/exit
9001 event, resume the inferior's execution using the signaling
9002 thread's ptid, rather than the old ptid.
9003
7fda33ae
JB
90042013-01-07 Joel Brobecker <brobecker@adacore.com>
9005
9006 * lynx-low.c (lynx_resume): Delete variable ret.
9007
b9786c74
JB
90082013-01-01 Joel Brobecker <brobecker@adacore.com>
9009
9010 * gdbreplay.c (gdbreplay_version): Update copyright year.
9011 * server.c (gdbserver_version): Likewise.
9012
8b93d60f
JB
90132012-12-17 Joel Brobecker <brobecker@adacore.com>
9014
9015 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9016 new thread.
9017
037335a7
JB
90182012-12-17 Joel Brobecker <brobecker@adacore.com>
9019
9020 * lynx-low.c (ptrace_request_to_str): Add handling for
9021 PTRACE_GETTRACESIG.
9022
52d4cbd8
JB
90232012-12-17 Joel Brobecker <brobecker@adacore.com>
9024
9025 * lynx-low.c (lynx_attach): Delete variable new_process.
9026
ab8f6ca9
JB
90272012-12-17 Joel Brobecker <brobecker@adacore.com>
9028
9029 * lynx-low.c (lynx_create_inferior): Delete variable
9030 new_process.
9031
78cbc024
JB
90322012-12-17 Joel Brobecker <brobecker@adacore.com>
9033
9034 * lynx-low.c (ptrace_request_to_str): Do not handle
9035 PTRACE_GETTHREADLIST if this macro does not exist.
9036
14a00470
YQ
90372012-12-15 Yao Qi <yao@codesourcery.com>
9038
9039 * Makefile.in (OBS): Add notif.o.
9040 * notif.c, notif.h: New.
9041 * server.c: Include "notif.h".
9042 (struct vstop_notif) <next>: Remove.
9043 <base>: New field.
9044 (queue_stop_reply): Update.
9045 (push_event, send_next_stop_reply): Remove.
9046 (discard_queued_stop_replies): Update.
9047 (notif_stop): New variable.
9048 (handle_v_stopped): Remove.
9049 (handle_v_requests): Don't call handle_v_stopped. Call
9050 handle_ack_notif instead.
9051 (queue_stop_reply_callback): Call notif_event_enque instead
9052 of queue_stop_reply.
9053 (handle_status): Don't call send_next_stop_reply, call
9054 notif_write_event instead.
9055 (kill_inferior_callback): Likewise.
9056 (detach_or_kill_inferior_callback): Likewise.
9057 (main): Call initialize_notif.
9058 (process_serial_event): Call QUEUE_is_empty.
9059 (handle_target_event): Call notif_push instead of push event.
9060 * server.h (push_event): Remove declaration.
9061
61c125b9
TT
90622012-12-10 Tom Tromey <tromey@redhat.com>
9063
9064 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9065 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9066 macros.
9067 (.c.o): Rewrite.
9068 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9069 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9070 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9071 (amd64-linux-ipa.o, ax.o): Rewrite.
9072 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9073 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9074 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9075 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9076 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9077 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9078 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9079 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9080 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9081 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9082 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9083 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9084 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9085 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9086 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9087 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9088 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9089 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9090 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9091 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9092 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9093 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9094 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9095 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9096 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9097 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9098 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9099 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9100 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9101 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9102 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9103 (reg-tilegx.o): Remove.
9104 (all_object_files): New macro.
9105 Include .deps files.
9106 * aclocal.m4, configure: Rebuild.
9107 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9108 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9109 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9110
e90e9ad9
TT
91112012-12-05 Tom Tromey <tromey@redhat.com>
9112
9113 PR gdb/14917:
9114 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9115
02d403bf 91162012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9117
9118 * configure.ac: Check for linux/perf_event.h.
9119 * config.in: Regenerated.
9120 * configure: Regenerated.
9121
0270a750
PA
91222012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9123
9124 * hostio.c (handle_readlink): Decrease buffer size
9125 parameter passed to readlink by one byte.
9126
8c29b58e
YQ
91272012-11-26 Yao Qi <yao@codesourcery.com>
9128
9129 * configure.ac (build_warnings): Append '-Wempty-body'.
9130 * configure: Regenerated.
9131 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9132 body.
9133
8bdce1ff
PM
91342012-11-15 Pierre Muller <muller@sourceware.org>
9135
9136 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9137 * config.in: Regenerate.
9138 * configure: Regenerate.
9139 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9140 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9141 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9142 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9143 header.
9144 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9145 instead of <sys/wait.h> header.
9146 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9147
02d403bf 91482012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9149
9150 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9151 (various make rules): Remove -DGDBSERVER
9152
fbd5db48
YQ
91532012-11-09 Yao Qi <yao@codesourcery.com>
9154
9155 * spu-low.c (current_ptid): Move it to ..
9156 * gdbthread.h: ... here. New.
9157 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9158 * server.c (myresume, process_serial_event): Likewise.
9159 * thread-db.c (thread_db_find_new_threads): Likewise.
9160 * tracepoint.c (run_inferior_command): Likewise.
9161
b3dc46ff
AB
91622012-10-01 Andrew Burgess <aburgess@broadcom.com>
9163
9164 * server.c (handle_search_memory_1): Include access length in
9165 warning message.
9166
07c04788
HPN
91672012-09-05 Michael Brandt <michael.brandt@axis.com>
9168
9169 * linux-crisv32-low.c: Fix compile errors.
9170
918d227b
YQ
91712012-09-04 Yao Qi <yao@codesourcery.com>
9172
9173 * tracepoint.c (cmd_qtsv): Adjust debug message.
9174 Don't check CUR_TPOINT.
9175
18c1b81a
YQ
91762012-08-28 Yao Qi <yao@codesourcery.com>
9177
9178 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9179 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9180 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9181 Remove declarations of xmalloc, xreallloc, xstrdup and
9182 freeargv.
9183 * Makefile.in (libiberty_h): New.
9184 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9185 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9186
dc82f37b
YQ
91872012-08-23 Yao Qi <yao@codesourcery.com>
9188
9189 * server.h: Remove declaration of 'xsnprintf'.
9190
406b1477
KS
91912012-08-22 Keith Seitz <keiths@redhat.com>
9192
9193 * server.h: Include build-gnulib-gbserver/config.h.
9194 * gdbreplay.c: Likewise.
9195
e6712ff1
DE
91962012-08-08 Doug Evans <dje@google.com>
9197
9198 * Makefile.in (SFILES): Add gdb_vecs.c.
9199 (OBS): Add gdb_vecs.o.
9200 (gdb_vecs_h, host_defs_h): New variables.
9201 (thread-db.o): Add $(gdb_vecs_h) dependency.
9202 (gdb_vecs.o): New rule.
9203 * thread-db.c: #include "gdb_vecs.h".
9204 (thread_db_load_search): Use a vector to iterate over path elements.
9205 Handle text appearing after "$pdir".
9206
9207 * configure.ac: Add check for strstr.
9208 * config.in: Regenerate.
9209 * configure: Regenerate.
9210
7c3270ae
UW
92112012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9212
9213 * hostio.c (handle_pread): If pread fails, fall back to attempting
9214 lseek/read.
9215 (handle_pwrite): Likewise for pwrite.
9216
b62e2b27
UW
92172012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9218
9219 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9220 between unsupported TYPE and unimplementable ADDR/LEN combination.
9221 (arm_insert_point): Act on new return value.
9222
78a99e91
PA
92232012-07-31 Pedro Alves <palves@redhat.com>
9224
9225 * server.c (process_point_options): Only skip tokens if we find
9226 one that is unrecognized. Don't treat 'X' specially while
9227 skipping unrecognized tokens.
9228
fcf303ab
UW
92292012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9230
9231 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9232 to 4-byte-align HW breakpoint addresses for Thumb.
9233
7255706c
YQ
92342012-07-27 Yao Qi <yao@codesourcery.com>
9235
9236 PR remote/14161.
9237
9238 * server.h: Declare gdb_agent_about_to_close.
9239 * target.c (kill_inferior): Include "agent.h".
9240 New. Send command 'kill'.
9241 * target.h (kill_inferior): Removed macro.
9242 * tracepoint.c (gdb_agent_about_to_close): New.
9243 (gdb_agent_helper_thread): Handle command 'close'.
9244 Wait endlessly until the inferior stops.
9245 Install gdb_agent_remove_socket to atexit hook.
9246 (agent_socket_name): New static variable.
9247 (gdb_agent_socket_init): Replace local variable 'name' with
9248 'agent_socket_name'.
9249 (gdb_agent_remove_socket): New.
9250
5a3f286f
YQ
92512012-07-27 Yao Qi <yao@codesourcery.com>
9252
9253 * server.c (process_point_options): Stop at 'X' when parsing.
9254
961bd387
ME
92552012-07-19 Michael Eager <eager@eagercon.com>
9256
a261b8f5 9257 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9258 to hw_execute.
9259 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9260 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9261 hardware breakpoint.
9262
aa7c7447
JK
92632012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9264
9265 * gdbserver/linux-low.c (initialize_low): Call
9266 linux_ptrace_init_warnings.
9267
7f216e7c
DE
92682012-07-02 Doug Evans <dje@google.com>
9269
9270 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9271 pointer to int.
9272
d3ce09f5
SS
92732012-07-02 Stan Shebs <stan@codesourcery.com>
9274
9275 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9276 (ax.o): Add it to build rule.
9277 (ax-ipa.o): Ditto.
9278 (OBS): Add format.o.
9279 (IPA_OBS): Add format.o.
9280 * server.c (handle_query): Claim support for breakpoint commands.
9281 (process_point_options): Add command case.
9282 (process_serial_event): Leave running if there are printfs in
9283 effect.
9284 * mem-break.h (any_persistent_commands): Declare.
9285 (add_breakpoint_commands): Declare.
9286 (gdb_no_commands_at_breakpoint): Declare.
9287 (run_breakpoint_commands): Declare.
9288 * mem-break.c (struct point_command_list): New struct.
9289 (struct breakpoint): New field command_list.
9290 (any_persistent_commands): New function.
9291 (add_commands_to_breakpoint): New function.
9292 (add_breakpoint_commands): New function.
9293 (gdb_no_commands_at_breakpoint): New function.
9294 (run_breakpoint_commands): New function.
9295 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9296 locally.
9297 * ax.c: Include format.h.
9298 (ax_printf): New function.
9299 (gdb_eval_agent_expr): Add printf opcode.
9300
2f8f6aed
YQ
93012012-06-13 Yao Qi <yao@codesourcery.com>
9302
9303 * server.c (start_inferior): Remove duplicated writes to fields
9304 'last_resume_kind' and 'last_status' of 'current_inferior'.
9305
0c9070b3
YQ
93062012-06-12 Yao Qi <yao@codesourcery.com>
9307 Pedro Alves <palves@redhat.com>
9308
9309 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9310 comment.
9311 * server.c (handle_v_cont): Extend comment.
9312
c52daf70
YQ
93132012-06-11 Yao Qi <yao@codesourcery.com>
9314
9315 * linux-low.c (linux_attach): Add 'static'.
9316
d38bbb0a
YQ
93172012-06-06 Yao Qi <yao@codesourcery.com>
9318
9319 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9320
89dc0afd
JK
93212012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9322
9323 Fix gcc -flto compilation warning.
9324 * server.c (main): Make variable multi_mode and attach volatile.
9325
75f62ce7
TJB
93262012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9327
9328 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9329 if the platform doesn't know about it.
9330
65f479b6
PA
93312012-05-30 Jeff Kenton <jkenton@tilera.com>
9332
9333 * Makefile.in (SFILES): Add linux-tile-low.c.
9334 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9335 * configure.srv: Handle tilegx-*-linux*.
9336 * linux-tile-low.c: New file.
9337
0c5bf5a9
JK
93382012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9339
9340 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9341
a493e3e2
PA
93422012-05-24 Pedro Alves <palves@redhat.com>
9343
9344 PR gdb/7205
9345
43aaf8b6 9346 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9347
2ea28649
PA
93482012-05-24 Pedro Alves <palves@redhat.com>
9349
9350 PR gdb/7205
9351
9352 Replace target_signal with gdb_signal throughout.
9353
8d409d16
MR
93542012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9355
9356 * linux-low.c (linux_store_registers): Avoid the copying sequence
9357 when no data has been retrieved by ptrace.
9358
23512c01
MGD
93592012-05-22 Will Deacon <will.deacon@arm.com>
9360
9361 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9362 Include asm/ptrace.h.
9363 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9364 already defined.
9365
4934b29e
MR
93662012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9367
9368 * linux-low.c (linux_store_registers): Don't re-retrieve data
9369 with ptrace that has already been obtained from /proc. Always
9370 copy any data retrieved with ptrace to the buffer supplied.
9371
bde24c0a
PA
93722012-05-11 Yao Qi <yao@codesourcery.com>
9373 Pedro Alves <palves@redhat.com>
9374
9375 * linux-low.c (enum stopping_threads_kind): New.
9376 (stopping_threads): Change type to `enum stopping_threads_kind'.
9377 (handle_extended_wait): If stopping and suspending threads, leave
9378 the new_lwp suspended too.
9379 (linux_wait_for_event): Adjust.
9380 (stop_all_lwps): Set `stopping_threads' to
9381 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9382 whether we're suspending threads or just stopping them. Assert no
9383 recursion happens.
9384
623b6bdf
YQ
93852012-04-29 Yao Qi <yao@codesourcery.com>
9386
9387 * server.h: Move some code to ...
9388 * gdbthread.h: ... here. New.
9389 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9390 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9391 (nto-low.o, win32-low.o): Likewise.
9392 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9393 * regcache.c, remote-utils.c, server.c: Likewise.
9394 * target.c, tracepoint.c, win32-low.c: Likewise.
9395
f15f9948
TJB
93962012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9397
9398 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9399 (PTRACE_ARG4_TYPE): Likewise.
9400 (PTRACE_XFER_TYPE): Likewise.
9401 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9402 ptrace to PTRACE_ARG3_TYPE.
9403 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9404 (PTRACE_ARG4_TYPE): Likewise.
9405 (PTRACE_XFER_TYPE): Likewise.
9406 (linux_detach_one_lwp): Cast fourth argument of
9407 ptrace to long then PTRACE_ARG4_TYPE.
9408 (regsets_fetch_inferior_registers): Cast third argument of
9409 ptrace to long then PTRACE_ARG3_TYPE.
9410 (regsets_store_inferior_registers): Likewise.
9411
38ea300a
PA
94122012-04-20 Pedro Alves <palves@redhat.com>
9413
9414 * configure: Regenerate.
9415
c971b7fa
PA
94162012-04-19 Pedro Alves <palves@redhat.com>
9417
43aaf8b6 9418 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9419 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9420 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9421 (all, install-only, uninstall, clean-info, all-lib, clean): No
9422 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9423 (maintainer-clean realclean distclean): Use subdir_do.
9424 (subdir_do): New.
9425 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9426 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9427 * acinclude.m4: Include acx_configure_dir.m4.
9428 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9429 calls. Call AC_PROG_RANLIB. Configure gnulib using
9430 ACX_CONFIGURE_DIR.
9431 (GNULIB): New.
9432 (GNULIB_STDINT_H): Adjust.
9433 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9434 * gdbreplay.c: Include build-gnulib/config.h.
9435 * server.h: Likewise.
9436 * aclocal.m4: Regenerate.
9437 * config.in: Regenerate.
9438 * configure: Regenerate.
c971b7fa 9439
809277f8
PA
94402012-04-19 Pedro Alves <palves@redhat.com>
9441
9442 * Makefile.in (LIBGNU, INCGNU): Adjust.
9443 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9444 (all, install-only, uninstall, clean-info, all-lib, clean)
9445 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9446 * configure.ac: Adjust AC_OUTPUT output.
9447 * aclocal.m4: Regenerate.
9448 * configure: Regenerate.
9449
fd9bb8b8
PA
94502012-04-19 Pedro Alves <palves@redhat.com>
9451
9452 * Makefile.in (generated_files): New.
9453 (server_h): Remove the explicit dependency on config.h, and depend
9454 on $generated_files.
9455
1c298c66
PA
94562012-04-19 Pedro Alves <palves@redhat.com>
9457
9458 * Makefile.in (INCGNU): Add -Ignulib.
9459
57c4b50b
PA
94602012-04-19 Pedro Alves <palves@redhat.com>
9461
9462 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9463 (INCGNU): ... this, and spell out -I here.
9464 (GNULIB_LIB): Rename to ...
9465 (LIBGNU): ... this.
9466 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9467
1030e047
PA
94682012-04-19 Pedro Alves <palves@redhat.com>
9469
9470 * config.in: Regenerate.
9471
447d4319
PA
94722012-04-19 Pedro Alves <palves@redhat.com>
9473
9474 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9475 * server.h (memmem): Remove declaration.
9476 * config.in: Regenerate.
9477 * configure: Regenerate.
9478
aad9eab9
YQ
94792012-04-19 Yao Qi <yao@codesourcery.com>
9480
9481 * Makefile.in (SFILES): Add common/vec.c.
9482 (OBS): Add vec.o.
9483 (vec.o): New rule.
9484
3e10640f
YQ
94852012-04-19 Yao Qi <yao@codesourcery.com>
9486
9487 * remote-utils.c (prepare_resume_reply): Replace with macro
9488 target_core_of_thread.
9489 * server.c (handle_qxfer_threads_proper): Likewise.
9490 * target.h (traget_core_of_thread): New macro.
9491
71622373
PA
94922012-04-18 Pedro Alves <palves@redhat.com>
9493
9494 * aclocal.m4: Regenerate.
9495 * configure: Regenerate.
9496
80d26939
YQ
94972012-04-16 Yao Qi <yao@codesourcery.com>
9498
9499 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9500 duplicated on address.
9501
42476b70
YQ
95022012-04-16 Yao Qi <yao@codesourcery.com>
9503
9504 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9505 (struct tracepoint_action_ops) <send>: New field.
9506 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9507 (agent_expr_send, x_tracepoint_action_send): New.
9508 (l_tracepoint_action_send): New.
9509 (cmd_qtdp): Download and install tracepoint
9510 according to `use_agent'.
9511 (run_inferior_command): Add one more parameter `len'.
9512 Update callers.
9513 (tracepoint_send_agent): New.
9514 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9515
7bc83639
YQ
95162012-04-16 Yao Qi <yao@codesourcery.com>
9517
9518 * tracepoint.c (download_tracepoints): Moved to ...
9519 (cmd_qtstart): ... here.
9520
5f18041e
YQ
95212012-04-14 Yao Qi <yao@codesourcery.com>
9522
9523 * tracepoint.c: Include inttypes.h.
9524 (struct collect_memory_action): Use sized types.
9525 (struct tracepoint): Likewise.
9526 (cmd_qtdp, stop_tracing): Update print specifiers.
9527 (cmd_qtp, response_tracepoint): Likewise.
9528 (collect_data_at_tracepoint): Likewise.
9529 (collect_data_at_step): Likewise.
9530
55a8c076
YQ
95312012-04-14 Yao Qi <yao@codesourcery.com>
9532
9533 Import gnulib module inttypes.
9534 * aclocal.m4, config.in, configure: Regenerated.
9535
dc750257
YQ
95362012-04-14 Yao Qi <yao@codesourcery.com>
9537
9538 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9539 Makefile and config.status at last.
9540
0ab5faf9
YQ
95412012-04-13 Yao Qi <yao@codesourcery.com>
9542
9543 * tracepoint.c: Include stdint.h unconditionally.
9544
18f5fd81
TJB
95452012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9546
9547 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9548 on BFD_HAVE_SYS_PROCFS_TYPE.
9549 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9550 * configure: Regenerate.
9551 * config.in: Likewise.
9552
4d47af5c
L
95532012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9554
9555 * Makefile.in (clean): Also remove x32.c x32-linux.c
9556 x32-avx.c x32-avx-linux.c.
9557 (x32.o): New target.
9558 (x32.c): Likewise.
9559 (x32-linux.o): Likewise.
9560 (x32-linux.c): Likewise.
9561 (x32-avx.o): Likewise.
9562 (x32-avx.c): Likewise.
9563 (x32-avx-linux.o): Likewise.
9564 (x32-avx-linux.c): Likewise.
9565
9566 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9567 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9568 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9569 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9570 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9571 i386/x32-avx-linux.xml.
9572
9573 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9574 (init_registers_x32_avx_linux): Likwise.
9575 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9576 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9577
ecedbe58
PA
95782012-04-13 Pedro Alves <palves@redhat.com>
9579
9580 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9581 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9582 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9583 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9584 the sub-make.
9585
c92b5177
L
95862012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9587
9588 * linux-x86-low.c (compat_x32_clock_t): New.
9589 (compat_x32_siginfo_t): Likewise.
9590 (compat_x32_siginfo_from_siginfo): Likewise.
9591 (siginfo_from_compat_x32_siginfo): Likewise.
9592 (linux_is_elf64): Likewise.
9593 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9594 and siginfo_from_compat_x32_siginfo for x32.
9595 (x86_arch_setup): Set linux_is_elf64.
9596
214d508e
L
95972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9598
9599 PR gdb/13969
9600 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9601 e_machine field.
9602 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9603 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9604 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9605 compatible with process.
9606
c9a1864a
YQ
96072012-04-12 Yao Qi <yao@codesourcery.com>
9608
9609 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9610 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9611 (install-only, install-info, clean): Handle sub dir gnulib.
9612 (all-lib, am--refresh): New targets.
9613 (memmem.o): Remove target.
9614 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9615 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9616 (AC_REPLACE_FUNCS): Remove memmem.
9617 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9618 (AC_OUTPUT): Generate Makefile in gnulib/.
9619 * aclocal.m4, config.in, configure: Regenerated.
9620
367ba2c2
MR
96212012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9622
9623 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9624
9d236627
PA
96252012-04-05 Pedro Alves <palves@redhat.com>
9626
9627 -Werror=strict-aliasing
9628
9629 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9630 pointer.
9631
111217b3
PA
96322012-04-04 Pedro Alves <palves@redhat.com>
9633
9634 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9635 (sparc_store_gregset_from_stack, sparc_store_gregset)
9636 (sparc_breakpoint_at): Fix formatting.
9637
8365dcf5
TJB
96382012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9639
9640 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9641 are available.
9642 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9643 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9644 * config.in: Regenerate.
9645 * configure: Likewise.
9646
689cc2ae
PA
96472012-03-29 Pedro Alves <palves@redhat.com>
9648
9649 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9650 Correct ptrace arguments.
9651
c14dfd32
PA
96522012-03-28 Pedro Alves <palves@redhat.com>
9653
9654 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9655 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9656 (IA64_FR1_REGNUM): New defines.
9657 (ia64_fetch_register): New.
9658 (the_low_target): Install it.
9659 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9660 field.
9661 * linux-low.c (linux_fetch_registers): Try the
9662 the_low_target.fetch_register hook first.
9663
9664 * linux-arm-low.c (the_low_target): Adjust.
9665 * linux-bfin-low.c (the_low_target): Adjust.
9666 * linux-cris-low.c (the_low_target): Adjust.
9667 * linux-crisv32-low.c (the_low_target): Adjust.
9668 * linux-m32r-low.c (the_low_target): Adjust.
9669 * linux-m68k-low.c (the_low_target): Adjust.
9670 * linux-mips-low.c (the_low_target): Adjust.
9671 * linux-ppc-low.c (the_low_target): Adjust.
9672 * linux-s390-low.c (the_low_target): Adjust.
9673 * linux-sh-low.c (the_low_target): Adjust.
9674 * linux-sparc-low.c (the_low_target): Adjust.
9675 * linux-tic6x-low.c (the_low_target): Adjust.
9676 * linux-x86-low.c (the_low_target): Adjust.
9677 * linux-xtensa-low.c (the_low_target): Adjust.
9678
63c88e13
PA
96792012-03-26 Pedro Alves <palves@redhat.com>
9680
9681 * server.c (handle_qxfer_libraries): Don't bail early if
9682 the_target->qxfer_libraries_svr4 is not NULL.
9683
fb723180
PA
96842012-03-26 Pedro Alves <palves@redhat.com>
9685
9686 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9687
0afae3cf
PA
96882012-03-23 Pedro Alves <palves@redhat.com>
9689
9690 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9691 "library-list-svr4" element's start tag when the the DSO list is
9692 empty.
9693
485f1ee4
PA
96942012-03-23 Pedro Alves <palves@redhat.com>
9695
9696 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9697 a variable whose type size is the same as the inferior's pointer
9698 size.
9699
a5362b9a
TS
97002012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9701
9702 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9703 struct siginfo.
9704 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9705 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9706 * linux-low.h: Include <signal.h>.
9707 (struct siginfo): Remove forward declaration.
9708 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9709 struct siginfo.
9710
d226c142
MF
97112012-03-21 Mike Frysinger <vapier@gentoo.org>
9712
9713 * .gitignore: Ignore more files.
9714
122f36ef
PA
97152012-03-19 Pedro Alves <palves@redhat.com>
9716 Jan Kratochvil <jan.kratochvil@redhat.com>
9717
9718 * server.c (cont_thread, general_thread): Add describing comments.
9719 (start_inferior): Clear `cont_thread'.
9720 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9721 of a process.
9722
fc3e5175
YQ
97232012-03-15 Yao Qi <yao@codesourcery.com>
9724
9725 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9726 handling to ...
9727 (cmd_qtdp): ... here.
9728
8d0d92cd
YQ
97292012-03-15 Yao Qi <yao@codesourcery.com>
9730
9731 * tracepoint.c (struct tracepoint_action_ops): New.
9732 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9733 (m_tracepoint_action_download): New.
9734 (r_tracepoint_action_download): New.
9735 (x_tracepoint_action_download): New.
9736 (l_tracepoint_action_download): New.
9737 (add_tracepoint_action): Install `action->ops' according type.
9738 (download_tracepoint_1): Move code `download' function pointer
9739 of various tracepoint_action_ops.
9740
87b0bb13
JK
97412012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9742
9743 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9744 linux_ptrace_attach_warnings.
9745
5f572dec
JK
97462012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9747
9748 * Makefile.in (linux-ptrace.o): New.
9749 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9750 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9751 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9752 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9753 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9754 of these targets.
9755 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9756
f4647387
YQ
97572012-03-08 Yao Qi <yao@codesourcery.com>
9758 Pedro Alves <palves@redhat.com>
9759
9760 Fix PR server/13392.
9761 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9762 offset of JMP insn.
9763 * tracepoint.c (remove_tracepoint): New.
9764 (cmd_qtdp): Call remove_tracepoint when failed to install.
9765
9b224c5e
PA
97662012-03-07 Pedro Alves <palves@redhat.com>
9767
9768 * linux-low.c (get_detach_signal): New.
9769 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9770 Pass on pending signals to PTRACE_DETACH. Check the result of the
9771 ptrace call.
9772 * server.c (program_signals, program_signals_p): New.
9773 (handle_general_set): Handle QProgramSignals.
9774 * server.h (program_signals, program_signals_p): Declare.
9775
e237a7e2
JK
97762012-03-05 Pedro Alves <palves@redhat.com>
9777 Jan Kratochvil <jan.kratochvil@redhat.com>
9778
9779 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9780 New comment why.
9781
5808517f
YQ
97822012-03-03 Yao Qi <yao@codesourcery.com>
9783
9784 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9785 agent_look_up_symbols.
9786
58b4daa5
YQ
97872012-03-03 Yao Qi <yao@codesourcery.com>
9788
9789 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9790 (linux-x86-low.o): Likewise.
9791 * server.h: Remove in_process_agent_loaded.
9792 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9793 common/agent.c.
9794 Update callers.
9795
8ffcbaaf
YQ
97962012-03-03 Yao Qi <yao@codesourcery.com>
9797
9798 * tracepoint.c (gdb_agent_capability): New global.
9799 (in_process_agent_loaded_ust): Renamed to
9800 `in_process_agent_supports_ust'.
9801 Update callers.
9802 (in_process_agent_supports_ust): Call agent_capability_check.
9803 (clear_installed_tracepoints): Assert that agent supports
9804 agent.
9805
d1feda86
YQ
98062012-03-03 Yao Qi <yao@codesourcery.com>
9807
9808 * linux-low.c (linux_supports_agent): New.
9809 (linux_target_ops): Initialize field `supports_agent' with
9810 linux_supports_agent.
9811 * target.h (struct target_ops) <supports_agent>: New.
9812 (target_supports_agent): New macro.
9813 * server.c (handle_general_set): Handle packet 'QAgent'.
9814 (handle_query): Send `QAgent+'.
9815 * Makefile.in (server.o): Depends on agent.h.
9816
2fa291ac
YQ
98172012-03-03 Yao Qi <yao@codesourcery.com>
9818
9819 * Makefile.in (OBS): Add agent.o.
9820 Add new rule for agent.o.
9821 Track dependence of tracepoint.c on agent.h.
9822 * tracepoint.c (run_inferior_command_1):
9823 (run_inferior_command): Call agent_run_command.
9824 (gdb_ust_connect_sync_socket): Deleted. Move it to
9825 common/agent.c.
9826 (resume_thread, stop_thread): Likewise.
9827 (gdb_ust_socket_init): Renamed to ...
9828 (gdb_agent_socket_init): ... New.
9829 (gdb_ust_thread): Renamed to ...
9830 (gdb_agent_helper_thread): ... New.
9831 (gdb_ust_init): Move some code to ...
9832 (gdb_agent_init): ... here. New.
9833 [HAVE_UST]: Call gdb_ust_init.
9834 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9835 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9836 * config.in, configure: Regenerated.
9837
05044653
PA
98382012-03-02 Pedro Alves <palves@redhat.com>
9839
9840 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9841 * linux-low.c (struct simple_pid_list): New.
9842 (stopped_pids): New a struct simple_pid_list pointer.
9843 (add_to_pid_list, pull_pid_from_list): New.
9844 (handle_extended_wait): Don't assume the first signal new children
9845 report is SIGSTOP. Adjust call to pull_pid_from_list.
9846 (linux_wait_for_lwp): Adjust.
9847
8d00225b
YQ
98482012-03-02 Yao Qi <yao@codesourcery.com>
9849
9850 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9851 debug log.
9852
19560ba5
YQ
98532012-03-02 Yao Qi <yao@codesourcery.com>
9854
9855 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9856 `stop_pc' and `tpoint'. Update caller.
9857
1faeff08
MR
98582012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9859
9860 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9861 * linux-low.c (use_linux_regsets): New macro.
9862 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9863 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9864 (linux_register_in_regsets): New function.
9865 (usr_fetch_inferior_registers): Skip registers covered by
9866 regsets.
9867 (usr_store_inferior_registers): Likewise.
9868 (usr_fetch_inferior_registers): New macro.
9869 (usr_store_inferior_registers): Likewise.
9870 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9871 (linux_store_registers): Likewise.
9872 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9873 prototype.
9874 (init_registers_mips64_dsp_linux): Likewise.
9875 (init_registers_mips_linux): New macro.
9876 (init_registers_mips_dsp_linux): Likewise.
9877 (mips_dsp_num_regs): Likewise.
9878 (DSP_BASE, DSP_CONTROL): New fallback macros.
9879 (mips_base_regs): New macro.
9880 (mips_regmap): Use it. Fix the size.
9881 (mips_dsp_regmap): New variable.
9882 (mips_dsp_regset_bitmap): Likewise.
9883 (mips_arch_setup): New function.
9884 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9885 than mips_regmap.
9886 (mips_cannot_store_register): Likewise.
9887 (the_low_target): Update .arch_setup, .num_regs and .regmap
9888 initializers. Add .regset_bitmap initializer.
9889 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9890 initializer.
9891 * linux-bfin-low.c (the_low_target): Likewise.
9892 * linux-cris-low.c (the_low_target): Likewise.
9893 * linux-crisv32-low.c (the_low_target): Likewise.
9894 * linux-ia64-low.c (the_low_target): Likewise.
9895 * linux-m32r-low.c (the_low_target): Likewise.
9896 * linux-m68k-low.c (the_low_target): Likewise.
9897 * linux-ppc-low.c (the_low_target): Likewise.
9898 * linux-s390-low.c (the_low_target): Likewise.
9899 * linux-sh-low.c (the_low_target): Likewise.
9900 * linux-sparc-low.c (the_low_target): Likewise.
9901 * linux-tic6x-low.c (the_low_target): Likewise.
9902 * linux-x86-low.c (the_low_target): Likewise.
9903 * linux-xtensa-low.c (the_low_target): Likewise.
9904 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9905 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9906 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9907 srv_xmlfiles.
9908 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9909 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9910
c03e6ccc
YQ
99112012-02-29 Yao Qi <yao@codesourcery.com>
9912 Pedro Alves <palves@redhat.com>
9913
9914 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9915 `step_over_finished' is true.
9916
644cebc9
PA
99172012-02-27 Pedro Alves <palves@redhat.com>
9918
9919 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9920 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9921
c14d7ab2
PA
99222012-02-27 Pedro Alves <palves@redhat.com>
9923
9924 PR server/9684
9925 * linux-low.c (pid_is_stopped): New.
9926 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9927
412c89dd
LM
99282012-02-25 Luis Machado <lgustavo@codesourcery.com>
9929
9930 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9931 of conditions.
9932
b745defe
MR
99332012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9934
9935 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9936
9f3a5c85
LM
99372012-02-24 Luis Machado <lgustavo@codesourcery>
9938
9939 * server.c (handle_query): Advertise support for target-side
9940 breakpoint condition evaluation.
9941 (process_point_options): New function.
9942 (process_serial_event): When inserting a breakpoint, check for
9943 a target-side condition that should be evaluated.
9944
9945 * mem-break.c: Include regcache.h and ax.h.
9946 (point_cond_list_t): New data structure.
9947 (breakpoint) <cond_list>: New field.
9948 (find_gdb_breakpoint_at): Make non-static.
9949 (delete_gdb_breakpoint_at): Clear any target-side
9950 conditions.
9951 (clear_gdb_breakpoint_conditions): New function.
9952 (add_condition_to_breakpoint): Likewise.
9953 (add_breakpoint_condition): Likewise.
9954 (gdb_condition_true_at_breakpoint): Likewise.
9955 (gdb_breakpoint_here): Return result directly instead
9956 of going through a local variable.
9957
9958 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9959 (clear_gdb_breakpoint_conditions): Likewise.
9960 (add_breakpoint_condition): Likewise.
9961 (gdb_condition_true_at_breakpoint): Likewise.
9962
9963 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9964 (need_step_over_p): Take target-side breakpoint condition into
9965 consideration.
9966
5e1dc496
LM
99672012-02-24 Luis Machado <lgustavo@codesourcery>
9968
9969 * server.h: Include tracepoint.h.
9970 (agent_mem_read, agent_get_trace_state_variable_value,
9971 agent_set_trace_state_variable_value,
9972 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9973 get_set_tsv_func_addr): New prototypes.
9974
9975 * ax.h: New include file.
9976 * ax.c: New source file.
9977
9978 * tracepoint.c: Include ax.h.
9979 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9980 agent_expr, eval_result_type): Move to ax.h.
9981 (parse_agent_expr): Rename to ...
9982 (gdb_parse_agent_expr): ... this, make it non-static and move
9983 to ax.h.
9984 (unparse_agent_expr) Rename to ...
9985 (gdb_unparse_agent_expr): ... this, make it non-static and move
9986 to ax.h.
9987 (eval_agent_expr): Rename to ...
9988 (eval_tracepoint_agent_expr): ... this.
9989 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9990 forward declarations.
9991 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9992 (agent_get_trace_state_variable_value): New function.
9993 (agent_set_trace_state_variable_value): New function.
9994 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9995 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9996 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9997 (condition_true_at_tracepoint): Likewise.
9998 (parse_agent_expr): Rename to ...
9999 (gdb_parse_agent_expr): ... this and move to ax.c.
10000 (unparse_agent_expr): Rename to ...
10001 (gdb_unparse_agent_expr): ... this and move to ax.c.
10002 (gdb_agent_op_name): Move to ax.c.
10003 (eval_agent_expr): Rename to ...
10004 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10005 and move to ax.c.
10006 (eval_tracepoint_agent_expr): New function.
10007 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10008 non-static.
5e1dc496
LM
10009 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10010 ax.c.
10011 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10012 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10013 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10014 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10015 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10016 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10017 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10018 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10019 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10020 (compile_bytecodes): Remove forward declaration.
10021 (is_goto_target): Move to ax.c.
10022 (compile_bytecodes): Move to ax.c and call
10023 agent_get_trace_state_variable_value (...) and
10024 agent_set_trace_state_variable_value (...).
10025
10026 * Makefile.in: Update ax.c and IPA dependencies.
10027
277e4e52
PA
100282012-02-24 Pedro Alves <palves@redhat.com>
10029
10030 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10031 (cmd_bigqtbuffer_circular): ... this. Only handle
10032 'QTBuffer:circular:'.
10033 (handle_tracepoint_general_set): Adjust.
10034
bf4c19f7
YQ
100352012-02-16 Yao Qi <yao@codesourcery.com>
10036
10037 * inferiors.c: Move code to ...
10038 * dll.c: .... here. New.
10039 * server.h: Declare clear_dlls.
10040 * Makefile.in (SFILES): Add dll.c.
10041 (OBS): Add dll.o
10042 (dll.o): New rule.
10043
d73f2619
YQ
100442012-02-11 Yao Qi <yao@codesourcery.com>
10045
10046 * server.c: (handle_monitor_command): Add a new parameter
10047 `own_buf'.
10048 (handle_query): Update caller.
10049
f8255c2a
JB
100502012-02-09 Joel Brobecker <brobecker@adacore.com>
10051
10052 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10053 * configure, config.in: Regenerate.
10054 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10055 is not defined.
10056
da84f473
PA
100572012-02-02 Pedro Alves <palves@redhat.com>
10058
10059 Try SIGKILL first, then PTRACE_KILL.
10060 * linux-low.c (linux_kill_one_lwp): New.
10061 (linux_kill_one_lwp): Rename to ...
10062 (kill_one_lwp_callback): ... this. Use the new
10063 linux_kill_one_lwp.
10064
e886a173
PA
100652012-02-02 Pedro Alves <palves@redhat.com>
10066
10067 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10068 inferior.
10069
be07f1a2
PA
100702012-01-27 Pedro Alves <palves@redhat.com>
10071
10072 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10073 (elf_64_file_p): Make static.
10074 (linux_pid_exe_is_elf_64_file): New.
10075 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10076 Delete declarations.
10077 (linux_pid_exe_is_elf_64_file): Declare.
10078 * linux-x86-low.c (x86_arch_setup): Use
10079 linux_pid_exe_is_elf_64_file.
10080
d8301ad1
JK
100812012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10082
10083 * linux-low.c (linux_wait_for_event_1): Rename to ...
10084 (linux_wait_for_event): ... here and merge it with former
10085 linux_wait_for_event - new variable wait_ptid, use it.
10086 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10087
01b17894
PA
100882012-01-23 Pedro Alves <palves@redhat.com>
10089
10090 * server.c (main): Avoid yet another case of infinite loop while
10091 detaching/killing after a longjmp.
10092
e825046f
JK
100932012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10094
10095 Code cleanup.
10096 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10097
b9e7b9c3
UW
100982012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10099
10100 * hostio.c (handle_readlink): New function.
10101 (handle_vFile): Call it to handle "vFile:readlink" packets.
10102
901f9912
UW
101032012-01-20 Pedro Alves <palves@redhat.com>
10104 Ulrich Weigand <ulrich.weigand@linaro.org>
10105
10106 * server.c (handle_v_requests): Only support vAttach and vRun to
10107 start multiple processes when in extended protocol mode.
10108
fc1ab1a0
PA
101092012-01-17 Pedro Alves <palves@redhat.com>
10110
10111 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10112 memalign plus mprotect to allocate the scratch buffer.
10113
7d5d4e98
PA
101142012-01-13 Pedro Alves <palves@redhat.com>
10115
10116 * server.c (attach_inferior): Clear `cont_thread'.
10117
f128d5e9
PA
101182012-01-13 Pedro Alves <palves@redhat.com>
10119
10120 * server.c (main): Avoid infinite loop while detaching/killing
10121 after a longjmp.
10122
06db92f0
DE
101232012-01-09 Doug Evans <dje@google.com>
10124
10125 * server.c (start_inferior): Set last_ptid in --wrapper case.
10126
32d92999
YQ
101272012-01-06 Yao Qi <yao@codesourcery.com>
10128
10129 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10130 defined.
10131 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10132
5e0a92a9
YQ
101332012-01-04 Yao Qi <yao@codesourcery.com>
10134
10135 * tracepoint.c (cmd_qtdp): Print debug message
10136 for static tracepoint.
10137
ae639e8c
YQ
101382012-01-04 Yao Qi <yao@codesourcery.com>
10139
10140 * tracepoint.c (trace_vdebug): Differentiate debug message
10141 between gdbserver and IPA.
10142
f72429c5
YQ
101432012-01-03 Yao Qi <yao@codesourcery.com>
10144
10145 * tracepoint.c (tracepoint_was_hit): Don't collect for
10146 static tracepoint.
10147
12c3e59c
JB
101482012-01-02 Joel Brobecker <brobecker@adacore.com>
10149
10150 * terminal.h: Reformat copyright header.
10151
67827812
JB
101522012-01-02 Joel Brobecker <brobecker@adacore.com>
10153
10154 * server.c (gdbserver_version): Update copyright year.
10155 * gdbreplay.c (gdbreplay_version): Likewise.
10156
3e52c33d
JK
101572011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10158
10159 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10160
10161 Revert:
10162 2011-12-18 Hui Zhu <teawater@gmail.com>
10163 * linux-low.c (linux_create_inferior): Save return value to ret.
10164
66f1260e
HZ
101652011-12-18 Hui Zhu <teawater@gmail.com>
10166
10167 * linux-low.c (linux_create_inferior): Save return value to ret.
10168
e77616d7
DE
101692011-12-16 Doug Evans <dje@google.com>
10170
e7b06c57
DE
10171 * linux-low.c (linux_create_inferior): If stdio connection,
10172 redirect stdin from /dev/null, stdout to stderr.
10173 * remote-utils.c (remote_is_stdio): New static global.
10174 (remote_connection_is_stdio): New function.
10175 (remote_prepare): Handle stdio connection.
10176 (remote_open): Ditto.
10177 (remote_close): Don't close stdin for stdio connections.
10178 (read_prim,write_prim): New functions. Replace all calls to
10179 read/write to these.
10180 * server.c (main): Watch for "-" argument. Move call to
10181 remote_prepare before start_inferior.
10182 * server.h (STDIO_CONNECTION_NAME): New macro.
10183 (remote_connection_is_stdio): Declare.
10184
e77616d7
DE
10185 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10186 in debugging output.
10187
82067193
YQ
101882011-12-15 Yao Qi <yao@codesourcery.com>
10189
10190 * tracepoint.c: Include sys/syscall.h.
10191 (gdb_ust_thread): Remove preprocessor conditional.
10192
82bfbe7e
PA
101932011-12-14 Pedro Alves <pedro@codesourcery.com>
10194
10195 * linux-low.c (linux_detach_one_lwp): Call
10196 the_low_target.prepare_to_resume before detaching.
10197
712c6575
YQ
101982011-12-14 Yao Qi <yao@codesourcery.com>
10199
10200 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10201 of write.
10202
d54d1edf
YQ
102032011-12-14 Yao Qi <yao@codesourcery.com>
10204
10205 * i386-low.c (i386_low_stopped_data_address): Initialize local
10206 variable `control'.
10207
6210a125
PA
102082011-12-13 Pedro Alves <pedro@codesourcery.com>
10209
10210 PR remote/13492
10211
10212 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10213 DR_CONTROL unless necessary. Extend comments.
10214 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10215 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10216
2ece8244
YQ
102172011-12-13 Yao Qi <yao@codesourcery.com>
10218
10219 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10220 macros.
10221 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10222
784867a5
JK
102232011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10224
10225 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10226 Print new debug message for such case.
10227
6bf36717
JK
102282011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10229
10230 Fix overlapping memcpy.
10231 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10232 the read_inferior_memory transfer.
10233 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10234 write_inferior_memory transfer.
10235 (set_fast_tracepoint_jump): New variable buf. Use it for the
10236 read_inferior_memory and write_inferior_memory transfers.
10237 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10238 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10239 Use it for the write_inferior_memory transfer.
10240 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10241 buffers.
10242
50275556
MR
102432011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10244
10245 * linux-low.c (fetch_register, store_register): Make code
10246 consistent, fix formatting.
10247
7325beb4
MR
102482011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10249
10250 * linux-low.c (usr_store_inferior_registers): Factor out code
10251 to handle individual registers into...
10252 (store_register): ... this new function.
10253
c642a434
UW
102542011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10255
10256 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10257 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10258 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10259 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10260 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10261 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10262 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10263 (srv_xmlfiles): Add new XML files.
10264
10265 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10266 and <sys/uio.h>.
10267 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10268 (init_registers_s390_linux32v1): Add prototype.
10269 (init_registers_s390_linux32v2): Likewise.
10270 (init_registers_s390_linux64v1): Likewise.
10271 (init_registers_s390_linux64v2): Likewise.
10272 (init_registers_s390x_linux64v1): Likewise.
10273 (init_registers_s390x_linux64v2): Likewise.
10274 (s390_num_regs): Increment to 52.
10275 (s390_regmap): Add orig_r2 register.
10276 (s390_num_regs_3264): Increment to 68.
10277 (s390_regmap_3264): Add orig_r2 register.
10278 (s390_collect_ptrace_register): Handle orig_r2 register.
10279 (s390_supply_ptrace_register): Likewise.
10280 (s390_fill_last_break): New function.
10281 (s390_store_last_break): Likewise.
10282 (s390_fill_system_call): New function.
10283 (s390_store_system_call): Likewise.
10284 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10285 register sets.
10286 (s390_check_regset): New function.
10287 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10288 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10289 Update target_regsets for available register sets.
10290
2268b414
JK
102912011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10292 Jan Kratochvil <jan.kratochvil@redhat.com>
10293
10294 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10295 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10296 New.
10297 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10298 * linux-low.h (struct process_info_private): New member r_debug.
10299 * server.c (handle_qxfer_libraries): Call
10300 the_target->qxfer_libraries_svr4.
10301 (handle_qxfer_libraries_svr4): New function.
10302 (qxfer_packets): New entry "libraries-svr4".
10303 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10304 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10305 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10306 PACKET_qXfer_libraries_svr4.
10307
d6db1fab
UW
103082011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10309
10310 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10311 PSW address/mask between 8-byte and 16-byte formats.
10312 (s390_supply_ptrace_register): Likewise.
10313 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10314 basic addressing mode bit.
10315
242f5f1c
SS
103162011-11-24 Stan Shebs <stan@codesourcery.com>
10317
10318 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10319
f196051f
SS
103202011-11-17 Stan Shebs <stan@codesourcery.com>
10321
10322 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10323 (tracing_start_time): New global.
10324 (tracing_stop_time): New global.
10325 (tracing_user_name): New global.
10326 (tracing_notes): New global.
10327 (tracing_stop_note): New global.
10328 (cmd_qtstart): Set traceframe_usage, start_time.
10329 (stop_tracing): Set stop_time.
10330 (cmd_qtstatus): Report additional status.
10331 (cmd_qtp): New function.
10332 (handle_tracepoint_query): Call it.
10333 (cmd_qtnotes): New function.
10334 (handle_tracepoint_general_set): Call it.
10335 (get_timestamp): Rename from tsv_get_timestamp.
10336
405f8e94
SS
103372011-11-14 Stan Shebs <stan@codesourcery.com>
10338 Kwok Cheung Yeung <kcy@codesourcery.com>
10339
10340 * linux-x86-low.c (small_jump_insn): New.
10341 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10342 trampoline and error message, build a trampoline and issue a small
10343 jump instruction to it.
10344 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10345 trampoline and error message.
10346 (x86_get_min_fast_tracepoint_insn_len): New.
10347 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10348 * linux-low.h (struct linux_target_ops): Add arguments to
10349 install_fast_tracepoint_jump_pad operation, add new operation.
10350 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10351 arguments.
10352 (linux_get_min_fast_tracepoint_insn_len): New function.
10353 (linux_target_op): Add new operation.
10354 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10355 (gdb_trampoline_buffer_end): Ditto.
10356 (gdb_trampoline_buffer_error): Ditto.
10357 (struct ipa_sym_addresses): Add fields for new IPA variables.
10358 (symbol_list): Add entries for new IPA variables.
10359 (struct tracepoint): Add fields to hold the address range of the
10360 trampoline used by the tracepoint.
10361 (trampoline_buffer_head): New static variable.
10362 (trampoline_buffer_tail): Ditto.
10363 (claim_trampoline_space): New function.
10364 (have_fast_tracepoint_trampoline_buffer): New function.
10365 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10366 structure.
10367 (install_fast_tracepoint): Ditto, also add error buffer argument.
10368 (cmd_qtminftpilen): New function.
10369 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10370 (fast_tracepoint_from_trampoline_address): New function.
10371 (fast_tracepoint_collecting): Handle trampoline as part of jump
10372 pad space.
10373 (set_trampoline_buffer_space): New function.
10374 (initialize_tracepoint): Initialize new IPA variables.
10375 * target.h (struct target_ops): Add arguments to
10376 install_fast_tracepoint_jump_pad operation, add new
10377 get_min_fast_tracepoint_insn_len operation.
10378 (target_get_min_fast_tracepoint_insn_len): New.
10379 (install_fast_tracepoint_jump_pad): Add arguments.
10380 * server.h (IPA_BUFSIZ): Define.
10381 * linux-i386-ipa.c: Include extra header files.
10382 (initialize_fast_tracepoint_trampoline_buffer): New function.
10383 (initialize_low_tracepoint): Call it.
10384 * server.h (set_trampoline_buffer_space): Declare.
10385 (claim_trampoline_space): Ditto.
10386 (have_fast_tracepoint_trampoline_buffer): Ditto.
10387
1e4d1764
YQ
103882011-11-14 Yao Qi <yao@codesourcery.com>
10389
10390 * server.c (handle_query): Handle InstallInTrace for qSupported.
10391 * tracepoint.c (add_tracepoint): Sort list.
10392 (install_tracepoint, download_tracepoint): New.
10393 (cmd_qtdp): Call them to install and download tracepoints.
10394 (sort_tracepoints): Removed.
10395 (cmd_qtstart): Update.
10396
5c73ff4e
YQ
103972011-11-14 Yao Qi <yao@codesourcery.com>
10398
10399 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10400 * mem-break.h: Declare.
10401 * tracepoint.c (cmd_qtstart): Move some code to ...
10402 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10403 New.
10404 (download_tracepoints): Move some code to ...
10405 (download_tracepoint_1): ... here. New.
10406
86a30030
YQ
104072011-11-08 Yao Qi <yao@codesourcery.com>
10408
10409 * remote-utils.c (relocate_instruction): A comment fix.
10410
8d26e50c
JB
104112011-11-07 Joel Brobecker <brobecker@adacore.com>
10412
10413 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10414 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10415 dr_status_mirror and dr_control_mirror from debug_reg_state.
10416 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10417 (i386_initial_stuff): Remove use of deleted globals.
10418 (i386_get_thread_context, i386_set_thread_context,
10419 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10420 from debug_reg_state.
10421
a59306a3
YQ
104222011-11-05 Yao Qi <yao@codesourcery.com>
10423
10424 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10425 address as TPOINT's.
10426
3065dfb6
SS
104272011-11-02 Stan Shebs <stan@codesourcery.com>
10428
10429 * tracepoint.c (agent_mem_read_string): New function.
10430 (eval_agent_expr): Call it for tracenz.
10431 * server.c (handle_query): Report support for tracenz.
10432
fd0d8c7c
YQ
104332011-11-02 Yao Qi <yao@codesourcery.com>
10434
10435 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10436
609086b1
YQ
104372011-11-02 Yao Qi <yao@codesourcery.com>
10438
10439 * target.h: Fix a typo in comment.
10440
b9fd1791
PA
104412011-10-31 Pedro Alves <pedro@codesourcery.com>
10442
10443 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10444 clobber the breakpoints' shadows with fast tracepoint jumps.
10445 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10446 * target.c (write_inferior_memory): Also pass MYADDR down to
10447 check_mem_write.
10448
03583c20
UW
104492011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10450
10451 * configure.ac: Check support for personality routine.
10452 * configure: Regenerate.
10453 * config.in: Likewise.
10454 * linux-low.c: Include <sys/personality.h>.
10455 Define ADDR_NO_RANDOMIZE if necessary.
10456 (linux_create_inferior): Disable address space randomization when
10457 forking inferior, if requested.
10458 (linux_supports_disable_randomization): New function.
10459 (linux_target_ops): Install it.
10460 * server.h (disable_randomization): Declare.
10461 * server.c (disable_randomization): New global variable.
10462 (handle_general_set): Handle QDisableRandomization.
10463 (handle_query): Likewise for qSupported.
10464 (main): Support --disable-randomization and --no-disable-randomization
10465 command line arguments.
10466 * target.h (struct target_ops): Add supports_disable_randomization.
10467 (target_supports_disable_randomization): New macro.
10468
723b724b
MF
104692011-09-29 Mike Frysinger <vapier@gentoo.org>
10470
10471 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10472 ifdef check.
10473 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10474 [!PT_GETDSBT] (target_loadmap): New definition.
10475 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10476 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10477 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10478 and PT_GETDSBT to LINUX_LOADMAP.
10479 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10480 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10481
55329a5c 104822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10483
10484 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10485 (arm_linux_hwbp_cap): New static variable.
10486 (arm_linux_get_hwbp_cap): Replace by ...
10487 (arm_linux_init_hwbp_cap): ... this new function.
10488 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10489 (arm_linux_get_hw_watchpoint_count): Likewise.
10490 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10491 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10492 (arm_prepare_to_resume): Use perror_with_name instead of error.
10493
55329a5c 104942011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10495
10496 * linux-arm-low.c: Include <signal.h>.
10497 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10498 (struct arm_linux_hwbp_cap): New data type.
10499 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10500 (struct arm_linux_hw_breakpoint): New data type.
10501 (MAX_BPTS, MAX_WPTS): Define.
10502 (struct arch_process_info, struct arch_lwp_info): New data types.
10503 (arm_linux_get_hwbp_cap): New function.
10504 (arm_linux_get_hw_breakpoint_count): Likewise.
10505 (arm_linux_get_hw_watchpoint_count): Likewise.
10506 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10507 (arm_hwbp_control_initialize): Likewise.
10508 (arm_hwbp_control_is_enabled): Likewise.
10509 (arm_hwbp_control_is_initialized): Likewise.
10510 (arm_hwbp_control_disable): Likewise.
10511 (arm_linux_hw_breakpoint_equal): Likewise.
10512 (arm_linux_hw_point_initialize): Likewise.
10513 (struct update_registers_data): New data structure.
10514 (update_registers_callback: New function.
10515 (arm_insert_point): Likewise.
10516 (arm_remove_point): Likewise.
10517 (arm_stopped_by_watchpoint): Likewise.
10518 (arm_stopped_data_address): Likewise.
10519 (arm_new_process): Likewise.
10520 (arm_new_thread): Likewise.
10521 (arm_prepare_to_resume): Likewise.
10522 (the_low_target): Register arm_insert_point, arm_remove_point,
10523 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10524 arm_new_thread, and arm_prepare_to_resume.
10525
6b9801d4
SS
105262011-09-15 Stan Shebs <stan@codesourcery.com>
10527
10528 * server.h (struct emit_ops): Add compare-goto fields.
10529 * tracepoint.c (gdb_agent_op_sizes): New table.
10530 (emit_eq_goto): New function.
10531 (emit_ne_goto): New function.
10532 (emit_lt_goto): New function.
10533 (emit_le_goto): New function.
10534 (emit_gt_goto): New function.
10535 (emit_ge_goto): New function.
10536 (is_goto_target): New function.
10537 (compile_bytecodes): Recognize special cases of compare-goto
10538 combinations and call specialized emitters for them.
10539 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10540 (amd64_emit_ne_goto): New function.
10541 (amd64_emit_lt_goto): New function.
10542 (amd64_emit_le_goto): New function.
10543 (amd64_emit_gt_goto): New function.
10544 (amd64_emit_ge_goto): New function.
10545 (amd64_emit_ops): Add the new functions.
10546 (i386_emit_eq_goto): New function.
10547 (i386_emit_ne_goto): New function.
10548 (i386_emit_lt_goto): New function.
10549 (i386_emit_le_goto): New function.
10550 (i386_emit_gt_goto): New function.
10551 (i386_emit_ge_goto): New function.
10552 (i386_emit_ops): Add the new functions.
10553
bf15cbda
SS
105542011-09-08 Stan Shebs <stan@codesourcery.com>
10555
10556 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10557 (i386_emit_epilogue): Restore %ebx.
10558
943ca1dd
JZ
105592011-08-31 Jie Zhang <jzhang918@gmail.com>
10560
10561 * server.c (step_thread): Remove definition.
10562 (process_serial_event): Don't handle Hs.
10563 * server.h (step_thread): Remove declaration.
10564 * target.c (set_desired_inferior): Remove use of step_thread.
10565
e3deef73
LM
105662011-08-24 Luis Machado <lgustavo@codesourcery.com>
10567
10568 * linux-low.c: Include linux-procfs.h.
10569 (linux_attach_lwp_1): Update comments.
10570 (linux_attach): Scan for existing threads when attaching to a
10571 process that is the tgid.
10572 * Makefile.in: Update dependencies.
10573
13da1c97
LM
105742011-08-24 Luis Machado <lgustavo@codesourcery.com>
10575
10576 * configure.srv: Add linux-procfs.o dependencies.
10577
881127c9
YQ
105782011-08-14 Yao Qi <yao@codesourcery.com>
10579
10580 * target.h (struct target_ops): Fix indent.
10581 * win32-low.c (win32_target_ops): Fix comment.
10582
58dbd541
YQ
105832011-08-14 Andrew Jenner <andrew@codesourcery.com>
10584 Yao Qi <yao@codesourcery.com>
10585
10586 * Makefile.in (clean): Remove tic6x-*.c files.
10587 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10588 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10589 (tic6x-c64xp-linux.c): Likewise.
10590 * configure.srv: Add support for tic6x-*-uclinux.
10591 * linux-tic6x-low.c: New.
10592 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10593
78d85199
YQ
105942011-08-14 Andrew Stubbs <ams@codesourcery.com>
10595 Yao Qi <yao@codesourcery.com>
10596
10597 * target.h (struct target_ops): Add read_loadmap.
10598 * linux-low.c (struct target_loadseg): New type.
10599 (struct target_loadmap): New type.
10600 (linux_read_loadmap): New function.
10601 (linux_target_ops): Add linux_read_loadmap.
10602 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10603 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10604 to NULL.
78d85199 10605
a959a88d
EZ
106062011-08-05 Eli Zaretskii <eliz@gnu.org>
10607
10608 * win32-low.c: Include <stdint.h>.
10609
1ced966e
PA
106102011-07-22 Pedro Alves <pedro@codesourcery.com>
10611
10612 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10613 to the inferior here.
10614 (i386_remove_aligned_watchpoint): Ditto.
10615 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10616 fit part of the watchpoint in the debug registers.
10617 (i386_update_inferior_debug_regs): New.
10618 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10619 registers, and only update the inferior on success.
10620 (i386_low_remove_watchpoint): Ditto.
10621
d26e3629
KY
106222011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10623
10624 * linux-low.c (compare_ints, unique, list_threads, show_process,
10625 linux_core_of_thread): Delete.
10626 (linux_target_ops): Change linux_core_of_thread to
10627 linux_common_core_of_thread.
10628 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10629 * utils.c (malloc_failure): Change type of argument.
10630 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10631 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10632 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10633 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10634 (IPA_OBJS): Add common-utils-ipa.o.
10635 (ptid_h, linux_osdata_h): New macros.
10636 (server_h): Add common/common-utils.h, common/xml-utils.h,
10637 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10638 common/ptid.h.
10639 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10640 ptid.o, buffer.o): New rules.
10641 (linux-low.o): Add common/linux-osdata.h as a dependency.
10642 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10643 * configure.ac: Add AC_HEADER_DIRENT check.
10644 * config.in: Regenerate.
10645 * configure: Regenerate.
10646 * remote-utils.c (xml_escape_text): Delete.
10647 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10648 buffer_xml_printf): Move to common/buffer.c.
10649 * server.c (main): Remove call to initialize_inferiors.
10650 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10651 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10652 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10653 internal_error, gdb_assert, gdb_assert_fail): Delete.
10654 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10655 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10656 common/buffer.h.
10657 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10658 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10659 initialize_inferiors): Delete.
10660
2275a1a7
PA
106612011-07-20 Pedro Alves <pedro@codesourcery.com>
10662
10663 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10664 symbol error.
10665
0a5b1e09
PA
106662011-05-31 Pedro Alves <pedro@codesourcery.com>
10667
10668 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10669 assertion.
10670 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10671
6938fd34
YQ
106722011-05-26 Yao Qi <yao@codesourcery.com>
10673
10674 * Makefile.in (thread-db.o): Track dependence to
10675 common/gdb_thread_db.h.
10676 * thread-db.c: include gdb_thread_db.h from right place.
10677
b481f9e0
TT
106782011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10679
10680 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10681 __FILE__ and __LINE__ to internal_error.
10682
98a5dd13
DE
106832011-05-13 Doug Evans <dje@google.com>
10684
10685 * thread-db.c (try_thread_db_load_from_sdir): New function.
10686 (try_thread_db_load_from_dir): New function.
10687 (thread_db_load_search): Handle $sdir, ignore $pdir.
10688 Remove trying of system directories if search of
10689 libthread-db-search-path fails, that is now done via $sdir.
10690
d248b706
KY
106912011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10692
10693 * server.c (handle_query): Add EnableDisableTracepoints to the list
10694 of supported features.
43aaf8b6 10695 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10696 tracepoints.
43aaf8b6
PA
10697 (cmd_qtenable_disable): New.
10698 (cmd_qtstart): Install tracepoints even if disabled.
10699 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10700 receiving a QTEnable or QTDisable packet.
10701 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10702 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10703 tracepoints.
10704 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10705
84e578fb
DE
107062011-05-10 Doug Evans <dje@google.com>
10707
10708 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10709
71f55dd8
DE
107102011-05-04 Doug Evans <dje@google.com>
10711
10712 * linux-low.c (linux_join): Skip process lookup.
10713 * spu-low.c (spu_join): Ditto.
10714 * server.c (join_inferiors_callback): Delete.
10715 (process_serial_event): For 'D' packet (detach) call join_inferior
10716 directly.
10717
4d393d60
JM
107182011-05-04 Joseph Myers <joseph@codesourcery.com>
10719
10720 * README: Don't mention xscale*-*-linux*.
10721 * configure.srv (xscale*-*-linux*): Don't handle target.
10722
b00ad6ff
NF
107232011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10724
10725 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10726 casting pointers.
10727 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10728 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10729 (i386_emit_void_call_2): Likewise.
10730
af96c192
YQ
107312011-04-26 Yao Qi <yao@codesourcery.com>
10732
43aaf8b6
PA
10733 * linux-low.c: Move common macros to linux-ptrace.h.
10734 Include linux-ptrace.h.
af96c192
YQ
10735 * Makefile.in (linux_ptrace_h): New.
10736 (linux-low.o): Depends on linux-ptrace.h.
10737
03f2bd59
JK
107382011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10739
10740 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10741 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10742 (remote_prepare): New function with most of the TCP code from ...
10743 (remote_open): ... here. Detect PORT here unconditionally. Move also
10744 setting transport_is_reliable.
10745 * server.c (run_once): New variable.
10746 (gdbserver_usage): Document it.
10747 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10748 the first run if RUN_ONCE.
10749 * server.h (run_once, remote_prepare): New declarations.
10750
7a9dd1b2
TT
107512011-04-19 Tom Tromey <tromey@redhat.com>
10752
10753 * win32-low.c (handle_load_dll): Remove duplicate "the".
10754
81239425
PM
107552011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10756
10757 Remove support for old Cygwin 1.5 versions.
10758 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10759 function to avoid warning.
10760 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10761 warning.
10762
9e0627f1
PM
107632011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10764
10765 * gdbserver/server.h (Macro _): Define it if not available.
10766
588eebee
MS
107672011-03-14 Michael Snyder <msnyder@vmware.com>
10768
348af9f7 10769 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10770
43f70d4c
JB
107712011-03-10 Joel Brobecker <brobecker@adacore.com>
10772
10773 * Makefile.in (maintainer-clean realclean distclean): Remove
10774 "make ... subdir_do" command.
10775
348af9f7
MS
107762011-03-10 Michael Snyder <msnyder@vmware.com>
10777
10778 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10779
10780 * server.c (handle_v_run): Free alloced buffer on early return.
10781
e637a4f5
YQ
107822011-03-09 Yao Qi <yao@codesourcery.com>
10783
10784 Revert:
10785 2011-03-04 Yao Qi <yao@codesourcery.com>
10786
10787 * Makefile.in: Remove GNU make feature --directory.
10788
10789 2011-03-05 Yao Qi <yao@codesourcery.com>
10790
10791 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10792 (subdir_do): New make target. Copied from gdb/Makefile.
10793 (maintainer-clean, realclean, distclean, clean): Call corresponding
10794 make targets in common/Makefile.
10795
10796 2011-02-11 Yao Qi <yao@codesourcery.com>
10797
10798 * configure.ac: Call AC_PROG_RANLIB.
10799 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10800 * configure: Regenerate.
10801
e6edda56
JK
108022011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10803
10804 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10805
e5141119
JB
108062011-03-06 Yao Qi <yao@codesourcery.com>
10807
10808 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10809
64794aa4
JB
108102011-03-05 Yao Qi <yao@codesourcery.com>
10811
10812 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10813 (subdir_do): New make target. Copied from gdb/Makefile.
10814 (maintainer-clean, realclean, distclean, clean): Call corresponding
10815 make targets in common/Makefile.
10816
7a762829
YQ
108172011-03-04 Yao Qi <yao@codesourcery.com>
10818
10819 * Makefile.in: Remove GNU make feature --directory.
10820
348af9f7
MS
108212011-03-04 Michael Snyder <msnyder@vmware.com>
10822
10823 * server.c (queue_stop_reply): Call xmalloc not malloc.
10824
108252011-03-02 Michael Snyder <msnyder@vmware.com>
10826
10827 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10828
9f72fee2
MS
108292011-02-28 Michael Snyder <msnyder@vmware.com>
10830
588eebee
MS
10831 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10832 (cmd_qtframe): Ditto.
10833 (cmd_qtbuffer): Ditto.
10834 (cmd_bigqtbuffer): Ditto.
10835
9f72fee2
MS
10836 * utils.c (decimal2str): Initialize 'width' to nine, then
10837 don't mess with it.
10838
8040bd49
UW
108392011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10840
10841 * hostio.c (require_data): Free *data, not data.
10842
7e52cbd0
JK
108432011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10844
10845 * hostio.c (require_data): Use free, not xfree.
10846
9130f83e
MS
108472011-02-27 Michael Snyder <msnyder@vmware.com>
10848
4b812f4e
MS
10849 * server.c (handle_query): Discard unused value.
10850
9130f83e
MS
10851 * hostio.c (require_data): Free malloc memory before returning
10852 error.
10853
69d37113
MS
108542011-02-26 Michael Snyder <msnyder@vmware.com>
10855
10856 * linux-low.c (list_threads): Call closedir for dirent.
10857
35f5825a
MS
108582011-02-27 Michael Snyder <msnyder@vmware.com>
10859
2a589cef
MS
10860 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10861 a case statement falls through.
10862
0adea5f7
MS
10863 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10864
35f5825a
MS
10865 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10866 in comparison.
10867
238f1c74
MS
108682011-02-26 Michael Snyder <msnyder@vmware.com>
10869
10870 * utils.c (decimal2str): Eliminate dead code and dead param.
10871 (pulongest): Drop dead param from call to decimal2str.
10872 (plongest): Ditto.
10873
633ff500
JB
108742011-02-24 Joel Brobecker <brobecker@adacore.com>
10875
10876 Revert the following patch (not approved yet):
10877 2011-02-21 Hui Zhu <teawater@gmail.com>
10878 * tracepoint.c (tp_printf): New function.
10879 (eval_agent_expr): Handle gdb_agent_op_printf.
10880
f9c6ff72
HZ
108812011-02-21 Hui Zhu <teawater@gmail.com>
10882
10883 * tracepoint.c (tp_printf): New function.
10884 (eval_agent_expr): Handle gdb_agent_op_printf.
10885
94d5e490
TT
108862011-02-18 Tom Tromey <tromey@redhat.com>
10887
10888 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10889 (tracepoint.o): Likewise.
10890 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10891 (gdb_agent_op_names): Likewise.
10892
c7f96d2b
TT
108932011-02-18 Tom Tromey <tromey@redhat.com>
10894
10895 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10896 gdb_agent_op_rot>: New constants.
10897 (gdb_agent_op_names): Add pick and roll.
10898 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10899 cases.
10900
0feedb2c
JK
109012011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10902
10903 * aclocal.m4: Regenerated with aclocal-1.11.1.
10904
b3b9301e
PA
109052011-02-14 Pedro Alves <pedro@codesourcery.com>
10906
10907 * server.c (handle_qxfer_traceframe_info): New.
10908 (qxfer_packets): Register "traceframe-info".
10909 (handle_query): Report support for qXfer:traceframe-info:read+.
10910 * tracepoint.c (match_blocktype): New.
10911 (traceframe_find_block_type): Rename to ...
10912 (traceframe_walk_blocks): ... this. Add callback filter argument,
10913 and use it.
10914 (traceframe_find_block_type): New, reimplemented on top of
10915 traceframe_walk_blocks.
10916 (build_traceframe_info_xml): New.
10917 (traceframe_read_info): New.
10918 * server.h (traceframe_read_info): Declare.
10919
4f3e6fb7
YQ
109202011-02-11 Yao Qi <yao@codesourcery.com>
10921
10922 * configure.ac: Call AC_PROG_RANLIB.
10923 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10924 * configure: Regenerate.
10925
764880b7
PA
109262011-02-07 Pedro Alves <pedro@codesourcery.com>
10927
10928 * server.c (gdb_read_memory): Change return semantics to allow
10929 partial transfers.
10930 (handle_search_memory_1): Adjust.
10931 (process_serial_event) <'m' packet>: Handle partial transfers.
10932 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10933
1c79eb8a
PA
109342011-01-28 Pedro Alves <pedro@codesourcery.com>
10935
10936 * regcache.c (init_register_cache): Initialize
10937 regcache->register_status.
10938 (free_register_cache): Release regcache->register_status.
10939 (regcache_cpy): Copy register_status.
10940 (registers_to_string): Print 'x's for unavailable registers.
10941 (supply_register): Mark the register's status valid or
10942 unavailable, depending on whether a buffer was passed in or not.
10943 (supply_register_zeroed): New.
10944 (supply_regblock): Mark the registers' status valid or
10945 unavailable, depending on whether a buffer was passed in or not.
10946 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10947 (struct regcache): New `register_status' field.
10948 (supply_register_zeroed): Declare.
10949 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10950 supply_register_zeroed, rather than passing a NULL buffer to
10951 supply_register.
10952 * tracepoint.c (fetch_traceframe_registers): Update comment.
10953
85724a0e
PA
109542011-01-28 Pedro Alves <pedro@codesourcery.com>
10955
10956 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10957 buffer explicit.
10958
d08aafef
PA
109592011-01-25 Pedro Alves <pedro@codesourcery.com>
10960
10961 * server.h (decode_xfer_write): Change prototype.
10962 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10963 and don't extract the annex here.
10964 * server.c (decode_xfer_read): Remove `annex' parameter,
10965 and don't extract the annex here.
10966 (decode_xfer): New.
10967 (struct qxfer): New.
10968 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10969 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10970 (handle_qxfer_statictrace): New functions, abstracted out from
10971 handle_query, and made to use the struct qxfer interface.
10972 (handle_threads_qxfer_proper): Rename to ...
10973 (handle_qxfer_threads_proper): ... this.
10974 (handle_threads_qxfer): Rename to ...
10975 (handle_qxfer_threads): ... this. Adjust.
10976 (qxfer_packets): New array.
10977 (handle_qxfer): New function.
10978 (handle_query): Use handle_qxfer.
10979
493e2a69
MS
109802011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10981
10982 * gdbreplay.c: Shorten lines of >= 80 columns.
10983 * linux-low.c: Ditto.
10984 * linux-ppc-low.c: Ditto.
10985 * linux-s390-low.c: Ditto.
10986 * linux-sparc-low.c: Ditto.
10987 * linux-x86-low.c: Ditto.
10988 * linux-xtensa-low.c: Ditto.
10989 * mem-break.c: Ditto.
10990 * nto-low.c: Ditto.
10991 * regcache.h: Ditto.
10992 * remote-utils.c: Ditto.
10993 * server.c: Ditto.
10994 * server.h: Ditto.
10995 * thread-db.c: Ditto.
10996 * tracepoint.c: Ditto.
10997 * utils.c: Ditto.
10998 * win32-low.h: Ditto.
10999
44944448
JB
110002011-01-05 Joel Brobecker <brobecker@adacore.com>
11001
11002 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11003 update.
11004
71ce852c
JB
110052011-01-01 Joel Brobecker <brobecker@adacore.com>
11006
11007 * server.c (gdbserver_version): Update copyright year in version
11008 output.
11009 * gdbreplay.c (gdbreplay_version): Ditto.
11010
eb826dc6
MF
110112010-12-29 Jie Zhang <jie.zhang@analog.com>
11012
11013 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11014 * linux-bfin-low.c: New file.
11015 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11016 PT_DATA_ADDR for BFIN targets.
11017 * Makefile.in (SFILES): Add linux-bfin-low.c.
11018 (clean): Remove reg-bfin.c.
11019 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11020 * README: Mention supported Blackfin targets.
11021
39ab222a
MF
110222010-12-23 Mike Frysinger <vapier@gentoo.org>
11023
11024 * .gitignore: New file.
11025
a1f2ce7d
MF
110262010-11-16 Mike Frysinger <vapier@gentoo.org>
11027
11028 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11029
f474844c
JZ
110302010-10-22 Jie Zhang <jie@codesourcery.com>
11031
11032 * Makefile.in: Add FLAGS_TO_PASS variable.
11033 (install): Remove dependency of install-only and recursively
11034 invoke make for install-only.
11035
f1048712
DE
110362010-10-04 Doug Evans <dje@google.com>
11037
11038 * Makefile.in (uninstall): Use $(DESTDIR).
11039
b53a1623
PA
110402010-09-24 Pedro Alves <pedro@codesourcery.com>
11041
e6ee044d
PA
11042 PR gdb/11842
11043
b53a1623
PA
11044 * linux-x86-low.c (compat_siginfo_from_siginfo)
11045 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11046 si_code is < 0. Check for si_code == SI_TIMER before checking for
11047 si_code < 0.
11048
fa1bd1e4
JB
110492010-09-13 Joel Brobecker <brobecker@adacore.com>
11050
11051 * lynx-i386-low.c: New file.
11052 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11053
47fac8f8
JB
110542010-09-13 Joel Brobecker <brobecker@adacore.com>
11055
11056 * lynx-low.c (ptrace_request_to_str): Remove handling for
11057 request values that have been removed in LynxOS 5.x.
11058
1adfc54d
JB
110592010-09-13 Joel Brobecker <brobecker@adacore.com>
11060
11061 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11062 <ptrace.h>
11063
c2a66c29
NS
110642010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11065
11066 * configure.ac: Add --enable-inprocess-agent option.
11067 * configure: Rebuilt.
11068
32fcada3
YQ
110692010-09-06 Yao Qi <yao@codesourcery.com>
11070
11071 * linux-low.c (linux_kill): Remove unused variable.
11072 (linux_stabilize_threads): Likewise.
11073 * server.c (start_inferior): Likewise.
11074 (queue_stop_reply_callback): Likewise.
11075 * tracepoint.c (do_action_at_tracepoint): Likewise.
11076
0cccb683
YQ
110772010-09-06 Yao Qi <yao@codesourcery.com>
11078
11079 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11080 on return.
11081
423ec54c
JK
110822010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11083
11084 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11085
12ac6819
PA
110862010-09-06 Pedro Alves <pedro@codesourcery.com>
11087
11088 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11089 "$(IPA_DEPFILES)".
11090
8ed54b31
JB
110912010-09-01 Joel Brobecker <brobecker@adacore.com>
11092
11093 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11094 gdbserver/lynx-ppc-low.c: New files.
11095 * Makefile.in (lynx_low_h): New variable.
11096 (lynx-low.o, lynx-ppc-low.o): New rules.
11097 * configure.ac: On LynxOS, link with -lnetinet.
11098 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11099 * configure: regenerate.
11100
bb0116a4
JB
111012010-09-01 Joel Brobecker <brobecker@adacore.com>
11102
11103 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11104 * configure.ac: Add check for vasprintf and vsnprintf.
11105 * configure, config.in: Regenerate.
11106 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11107
a778ab81 111082010-09-01 Joel Brobecker <brobecker@adacore.com>
11109
11110 * gdbreplay.c: Move include of alloca.h up, next to include of
11111 malloc.h.
11112 * server.h: Add include of malloc.h.
11113 * mem-break.c: Remove include of malloc.h.
11114 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11115
8b034a19 111162010-09-01 Joel Brobecker <brobecker@adacore.com>
11117
11118 * Makefile.in (memmem.o): Build with -Wno-error.
11119
111202010-09-01 Joel Brobecker <brobecker@adacore.com>
11121
11122 * utils.c (xsnprintf): Make non-static.
11123 * server.h: Add xsnprintf declaration.
11124 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11125 replace calls to snprintf by calls to xsnprintf throughout.
11126
111272010-09-01 Joel Brobecker <brobecker@adacore.com>
11128
11129 * configure.ac: Add configure check for alloca.
11130 * configure, config.in: Regenerate.
11131 * server.h: Include alloca.h if it exists.
11132 * gdbreplay.c: Include alloca.h if it exists.
11133
1a981360
PA
111342010-08-28 Pedro Alves <pedro@codesourcery.com>
11135
11136 * linux-low.c (__SIGRTMIN): Define if not already defined.
11137 (linux_create_inferior): Check for __ANDROID__ rather than
11138 __SIGRTMIN.
11139 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11140 are already deferred.
11141 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11142 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11143 stopped and already has a pending signal to report.
11144 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11145 a pending signal to report or is moving out of a jump pad.
11146 (linux_init_signals): Check for __ANDROID__ rather than
11147 __SIGRTMIN.
11148
b4d51a55
PA
111492010-08-28 Pedro Alves <pedro@codesourcery.com>
11150
11151 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11152 debug_threads check. Avoid a linear search when not doing debug
11153 output.
11154
ec48365d
PA
111552010-08-27 Pedro Alves <pedro@codesourcery.com>
11156
11157 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11158 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11159 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11160 (process_event): Change local fd's type to gdb_fildes_t.
11161 (create_file_handler): Adjust prototype.
11162 (delete_file_handler): Adjust prototype.
11163 (handle_file_event): Adjust prototype. Use pfildes.
11164 (create_file_event): Adjsut prototype.
11165 * remote-utils.c (remote_desc, listen_desc): Change type to
11166 gdb_fildes_t.
11167 * server.h: New gdb_fildes_t typedef.
11168 [USE_WIN32API]: Include winsock2.h.
11169 (delete_file_handler, add_file_handler): Adjust prototypes.
11170 (pfildes): Declare.
11171 * utils.c (pfildes): New.
11172
854d88f0
PA
111732010-08-27 Pedro Alves <pedro@codesourcery.com>
11174
11175 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11176 * configure: Regenerate.
11177
0146f85b
PA
111782010-08-27 Pedro Alves <pedro@codesourcery.com>
11179
11180 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11181 (linux_done_accessing_memory): ... this.
11182 (linux_target_ops): Adjust.
11183 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11184 * nto-low.c (nto_target_ops): Adjust comment.
11185 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11186 * spu-low.c (spu_target_ops): Adjust comment.
11187 * target.h (target_ops): Rename unprepare_to_access_memory field
11188 to done_accessing_memory.
11189 (unprepare_to_access_memory): Rename to ...
11190 (done_accessing_memory): ... this.
11191
90d74c30
PA
111922010-08-26 Pedro Alves <pedro@codesourcery.com>
11193
11194 * linux-low.c (linux_prepare_to_access_memory): New.
11195 (linux_unprepare_to_access_memory): New.
11196 (linux_target_ops): Install them.
11197 * server.c (read_memory): Rename to ...
11198 (gdb_read_memory): ... this. Use
11199 prepare_to_access_memory/prepare_to_access_memory.
11200 (write_memory): Rename to ...
11201 (gdb_write_memory): ... this. Use
11202 prepare_to_access_memory/prepare_to_access_memory.
11203 (handle_search_memory_1): Adjust.
11204 (process_serial_event): Adjust.
11205 * target.h (struct target_ops): New fields
11206 prepare_to_access_memory and unprepare_to_access_memory.
11207 (prepare_to_access_memory, unprepare_to_access_memory): New.
11208 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11209 prepare_to_access_memory/prepare_to_access_memory.
11210 * nto-low.c (nto_target_ops): Adjust.
11211 * spu-low.c (spu_target_ops): Adjust.
11212 * win32-low.c (win32_target_ops): Adjust.
11213
fd467969
PA
112142010-08-26 Pedro Alves <pedro@codesourcery.com>
11215
11216 * Makefile.in (WARN_CFLAGS): Get it from configure.
11217 (WERROR_CFLAGS): New.
11218 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11219 * configure.ac: Introduce --enable-werror, which adds -Werror to
11220 the compiler command line. Enabled by default. Disable with
11221 --disable-werror. Add -Wdeclaration-after-statement
11222 Wpointer-arith and -Wformat-nonliteral to warning flags.
11223 * configure: Regenerate.
11224
331e2f5f
PA
112252010-08-26 Pedro Alves <pedro@codesourcery.com>
11226
11227 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11228
e581f2b4
PA
112292010-08-26 Pedro Alves <pedro@codesourcery.com>
11230
11231 * gdbreplay.c (remote_error): New.
11232 (gdbchar): New.
11233 (expect): Use gdbchar. Check for error reading from GDB.
11234 Clarify sync error output.
11235 (play): Check for errors writing to GDB.
11236 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11237 * remote-utils.c (getpkt): Check for errors writing to the remote
11238 descriptor.
11239
3c11dd79
PA
112402010-08-25 Pedro Alves <pedro@codesourcery.com>
11241
11242 * linux-low.c (linux_wait_1): Move non-debugging code out of
11243 `debug_threads' control.
11244
d20a8ad9
PA
112452010-08-25 Pedro Alves <pedro@codesourcery.com>
11246
11247 * linux-low.c (linux_wait_1): Don't set last_status here.
11248 * server.c (push_event, queue_stop_reply_callback): Assert we're
11249 not pushing a TARGET_WAITKIND_IGNORE event.
11250 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11251 (myresume, handle_target_event): Set the thread's last_resume_kind
11252 and last_status from the target returned status.
11253
964e4306
PA
112542010-08-25 Pedro Alves <pedro@codesourcery.com>
11255
11256 PR threads/10729
11257
11258 * linux-x86-low.c (update_debug_registers_callback): New.
11259 (i386_dr_low_set_addr): Use it.
11260 (i386_dr_low_get_addr): New.
11261 (i386_dr_low_set_control): Use update_debug_registers_callback.
11262 (i386_dr_low_get_control): New.
11263 (i386_dr_low_get_status): Adjust.
11264 * linux-low.c (linux_stop_lwp): New.
11265 * linux-low.h (linux_stop_lwp): Declare.
11266
11267 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11268 argument instead of a i386_debug_reg_state.
11269 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11270 a i386_debug_reg_state.
11271 (i386_insert_aligned_watchpoint): Adjust.
11272 (i386_remove_aligned_watchpoint): Adjust.
11273 (i386_low_stopped_data_address): Read the debug registers from the
11274 inferior instead of from the mirrors.
11275 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11276 (i386_dr_low_get_addr): Declare.
11277 (i386_dr_low_get_control): Declare.
11278 (i386_dr_low_get_status): Change prototype.
11279
11280 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11281 (i386_dr_low_get_addr): New.
11282 (i386_dr_low_get_control): New.
11283 (i386_dr_low_get_status): Adjust prototype. Return
11284 dr_status_mirror.
11285 (i386_initial_stuff): Clear dr_status_mirror and
11286 dr_control_mirror.
11287 (i386_get_thread_context): Adjust.
11288 (i386_set_thread_context): Adjust.
11289 (i386_thread_added): Adjust.
11290
5f21a75b
PA
112912010-08-24 Pedro Alves <pedro@codesourcery.com>
11292
11293 * linux-low.h (linux_thread_area): Delete declaration.
11294
3e4c1235
TS
112952010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11296
11297 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11298 after its termination.
11299
1971b033
PA
113002010-08-09 Pedro Alves <pedro@codesourcery.com>
11301
11302 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11303 (gdb_wants_all_stopped): Delete.
11304 (linux_wait_1): Don't call them.
11305 * server.c (handle_v_cont): Tag all threads as want-stopped.
11306 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11307 stopped as "client-wants-stopped".
11308
310444ac
PA
113092010-07-31 Pedro Alves <pedro@codesourcery.com>
11310
11311 * Makefile.in (signals_h): New.
11312 (server_h): Depend on it.
11313 (server.o): Don't depend on $(signals_def).
11314 (signals.o): Depend on $(signals_def).
11315
a19cae16
JK
113162010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11317
11318 * Makefile.in (signals_def): New.
11319 (server_h): Append include/gdb/signals.h and signals_def.
11320 (server.o): Append signals_def.
11321
30d50328
JK
113222010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11323
11324 * server.c (handle_target_event): Use target_signal_to_host for
11325 resume_info.sig initialization.
11326 * target.h (struct thread_resume) <sig>: New comment.
11327
5c3216e2
OS
113282010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11329
c6f46ca0
OS
11330 * server.c (handle_query): strcpy() the returned string from paddress()
11331 instead of sprintf().
5c3216e2
OS
11332 * utils.c (paddress): Return phex_nz().
11333
6bd31874
JB
113342010-07-07 Joel Brobecker <brobecker@adacore.com>
11335
11336 * server.c (handle_v_cont): Call mourn_inferior if process
11337 just exited.
11338 (myresume): Likewise.
11339
0fb4aa4b
PA
113402010-07-01 Pedro Alves <pedro@codesourcery.com>
11341
11342 Static tracepoints, and integration with UST.
11343
11344 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11345 * mem-break.c (uninsert_all_breakpoints)
11346 (reinsert_all_breakpoints): New.
11347 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11348 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11349 (gdb_agent_ust_loaded, helper_thread_id)
11350 (gdb_agent_helper_thread_id): New macros.
11351 (struct ipa_sym_addresses): Add addr_ust_loaded,
11352 addr_helper_thread_id, addr_cmd_buf.
11353 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11354 (in_process_agent_loaded_ust): New.
11355 (write_e_ust_not_loaded): New.
11356 (maybe_write_ipa_ust_not_loaded): New.
11357 (struct collect_static_trace_data_action): New.
11358 (enum tracepoint_type) <static_tracepoint>: New.
11359 (struct tracepoint) <handle>: Mention static tracepoints.
11360 (struct static_tracepoint_ctx): New.
11361 (CMD_BUF_SIZE): New.
11362 (add_tracepoint_action): Handle static tracepoint actions.
11363 (unprobe_marker_at): New.
11364 (clear_installed_tracepoints): Handle static tracepoints.
11365 (cmd_qtdp): Handle static tracepoints.
11366 (probe_marker_at): New.
11367 (cmd_qtstart): Handle static tracepoints.
11368 (response_tracepoint): Handle static tracepoints.
11369 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11370 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11371 (get_context_regcache): Handle static tracepoints.
11372 (do_action_at_tracepoint): Handle static tracepoint actions.
11373 (traceframe_find_block_type): Handle static trace data blocks.
11374 (traceframe_read_sdata): New.
11375 (download_tracepoints): Download static tracepoint actions.
11376 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11377 (GDB_PROBE_NAME): New.
11378 (ust_ops): New.
11379 (GET_UST_SYM): New.
11380 (USTF): New.
11381 (dlsym_ust): New.
11382 (ust_marker_to_static_tracepoint): New.
11383 (gdb_probe): New.
11384 (collect_ust_data_at_tracepoint): New.
11385 (gdb_ust_probe): New.
11386 (UNIX_PATH_MAX, SOCK_DIR): New.
11387 (gdb_ust_connect_sync_socket): New.
11388 (resume_thread, stop_thread): New.
11389 (run_inferior_command): New.
11390 (init_named_socket): New.
11391 (gdb_ust_socket_init): New.
11392 (cstr_to_hexstr): New.
11393 (next_st): New.
11394 (first_marker, next_marker): New.
11395 (response_ust_marker): New.
11396 (cmd_qtfstm, cmd_qtsstm): New.
11397 (unprobe_marker_at, probe_marker_at): New.
11398 (cmd_qtstmat, gdb_ust_thread): New.
11399 (gdb_ust_init): New.
11400 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11401 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11402 (ST_REGENTRY): New.
11403 (x86_64_st_collect_regmap): New.
11404 (X86_64_NUM_ST_COLLECT_GREGS): New.
11405 (AMD64_RIP_REGNUM): New.
11406 (supply_static_tracepoint_registers): New.
11407 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11408 (ST_REGENTRY): New.
11409 (i386_st_collect_regmap): New.
11410 (i386_NUM_ST_COLLECT_GREGS): New.
11411 (supply_static_tracepoint_registers): New.
11412 * server.c (handle_query): Handle qXfer:statictrace:read.
11413 <qSupported>: Report support for StaticTracepoints, and
11414 qXfer:statictrace:read features.
11415 * server.h (traceframe_read_sdata)
11416 (supply_static_tracepoint_registers): Declare.
11417 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11418 (unpack_varlen_hex): Include in IPA build.
11419 * Makefile.in (ustlibs, ustinc): New.
11420 (IPA_OBJS): Add remote-utils-ipa.o.
11421 ($(IPA_LIB)): Link -ldl and -lpthread.
11422 (UST_CFLAGS): New.
11423 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11424 * config.in, configure: Regenerate.
11425
9e4344e5
PA
114262010-06-20 Ian Lance Taylor <iant@google.com>
11427 Pedro Alves <pedro@codesourcery.com>
11428
11429 * linux-x86-low.c (always_true): Delete.
11430 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11431 trying to fool the compiler with always_true.
11432
c6beb2cb
PA
114332010-06-20 Pedro Alves <pedro@codesourcery.com>
11434
11435 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11436 conditions in gdbserver.
11437
d2ed6730
UW
114382010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11439
11440 * spu-low.c (spu_read_memory): Wrap around local store limit.
11441 (spu_write_memory): Likewise.
11442
4e29fb54
PA
114432010-06-15 Pedro Alves <pedro@codesourcery.com>
11444
11445 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11446 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11447 LONGEST uses.
11448 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11449 uses.
11450 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11451 uses with LONGEST uses.
11452
6a271cae
PA
114532010-06-14 Stan Shebs <stan@codesourcery.com>
11454 Pedro Alves <pedro@codesourcery.com>
11455
11456 Bytecode compiler.
11457
11458 * linux-x86-low.c: Include limits.h.
11459 (add_insns): New.
11460 (always_true): New.
11461 (EMIT_ASM): New.
11462 (EMIT_ASM32): New.
11463 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11464 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11465 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11466 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11467 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11468 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11469 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11470 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11471 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11472 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11473 (amd64_emit_void_call_2): New.
11474 (amd64_emit_ops): New.
11475 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11476 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11477 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11478 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11479 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11480 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11481 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11482 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11483 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11484 (i386_emit_stack_adjust, i386_emit_int_call_1)
11485 (i386_emit_void_call_2): New.
11486 (i386_emit_ops): New.
11487 (x86_emit_ops): New.
11488 (the_low_target): Install x86_emit_ops.
11489 * server.h (struct emit_ops): New.
11490 (get_raw_reg_func_addr): Declare.
11491 (current_insn_ptr, emit_error): Declare.
11492 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11493 (set_trace_state_variable_value): New defines.
11494 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11495 addr_get_trace_state_variable_value and
11496 addr_set_trace_state_variable_value.
11497 (symbol_list): New fields for get_raw_reg,
11498 get_trace_state_variable_value and set_trace_state_variable_value.
11499 (condfn): New typedef.
11500 (struct tracepoint): New field `compiled_cond'.
11501 (do_action_at_tracepoint): Clear compiled_cond.
11502 (get_trace_state_variable_value, set_trace_state_variable_value):
11503 Export in the IPA.
11504 (condition_true_at_tracepoint): If there's a compiled condition,
11505 run that.
11506 (current_insn_ptr, emit_error): New globals.
11507 (struct bytecode_address): New.
11508 (get_raw_reg_func_addr): New.
11509 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11510 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11511 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11512 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11513 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11514 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11515 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11516 (compile_tracepoint_condition, compile_bytecodes): New.
11517 * target.h (emit_ops): Forward declare.
11518 (struct target_ops): New field emit_ops.
11519 (target_emit_ops): New.
11520 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11521 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11522 * linux-low.c (linux_emit_ops): New.
11523 (linux_target_ops): Install it.
11524 * linux-low.h (struct linux_target_ops): New field emit_ops.
11525
92b72907
UW
115262010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11527
11528 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11529 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11530
fa593d66
PA
115312010-06-01 Pedro Alves <pedro@codesourcery.com>
11532 Stan Shebs <stan@codesourcery.com>
11533
11534 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11535 (all): Depend on $(extra_libraries).
11536 (install-only): Install the IPA.
11537 (IPA_OBJS, IPA_LIB): New.
11538 (clean): Remove the IPA lib.
11539 (IPAGENT_CFLAGS): New.
11540 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11541 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11542 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11543 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11544 * configure.ac: Check for atomic builtins support in the compiler.
11545 (IPA_DEPFILES, extra_libraries): Define.
11546 * configure.srv (ipa_obj): Add description.
11547 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11548 (i[34567]86-*-linux*): Set ipa_obj.
11549 (x86_64-*-linux*): Set ipa_obj.
11550 * linux-low.c (stabilizing_threads): New.
11551 (supports_fast_tracepoints): New.
11552 (linux_detach): Stabilize threads before detaching.
11553 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11554 the lwp is either not stabilizing, or is moving out of a jump pad.
11555 (linux_fast_tracepoint_collecting): New.
11556 (maybe_move_out_of_jump_pad): New.
11557 (enqueue_one_deferred_signal): New.
11558 (dequeue_one_deferred_signal): New.
11559 (linux_wait_for_event_1): If moving out of a jump pad, defer
11560 pending signals to later.
11561 (linux_stabilize_threads): New.
11562 (linux_wait_1): Check if threads need moving out of jump pads, and
11563 do it if so.
11564 (stuck_in_jump_pad_callback): New.
11565 (move_out_of_jump_pad_callback): New.
11566 (lwp_running): New.
11567 (linux_resume_one_lwp): Handle moving out of jump pads.
11568 (linux_set_resume_request): Dequeue deferred signals.
11569 (need_step_over_p): Also step over fast tracepoint jumps.
11570 (start_step_over): Also uninsert fast tracepoint jumps.
11571 (finish_step_over): Also reinsert fast tracepoint jumps.
11572 (linux_install_fast_tracepoint_jump): New.
11573 (linux_target_ops): Install linux_stabilize_threads and
11574 linux_install_fast_tracepoint_jump_pad.
11575 * linux-low.h (linux_target_ops) <get_thread_area,
11576 install_fast_tracepoint_jump_pad>: New fields.
11577 (struct lwp_info) <collecting_fast_tracepoint,
11578 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11579 (linux_get_thread_area): Declare.
11580 * linux-x86-low.c (jump_insn): New.
11581 (x86_get_thread_area): New.
11582 (append_insns): New.
11583 (push_opcode): New.
11584 (amd64_install_fast_tracepoint_jump_pad): New.
11585 (i386_install_fast_tracepoint_jump_pad): New.
11586 (x86_install_fast_tracepoint_jump_pad): New.
11587 (the_low_target): Install x86_get_thread_area and
11588 x86_install_fast_tracepoint_jump_pad.
11589 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11590 (struct fast_tracepoint_jump): New.
11591 (fast_tracepoint_jump_insn): New.
11592 (fast_tracepoint_jump_shadow): New.
11593 (find_fast_tracepoint_jump_at): New.
11594 (fast_tracepoint_jump_here): New.
11595 (delete_fast_tracepoint_jump): New.
11596 (set_fast_tracepoint_jump): New.
11597 (uninsert_fast_tracepoint_jumps_at): New.
11598 (reinsert_fast_tracepoint_jumps_at): New.
11599 (set_breakpoint_at): Use write_inferior_memory.
11600 (uninsert_raw_breakpoint): Use write_inferior_memory.
11601 (check_mem_read): Mask out fast tracepoint jumps.
11602 (check_mem_write): Mask out fast tracepoint jumps.
11603 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11604 (set_fast_tracepoint_jump): Declare.
11605 (delete_fast_tracepoint_jump)
11606 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11607 (reinsert_fast_tracepoint_jumps_at): Declare.
11608 * regcache.c: Don't compile many functions when building the
11609 in-process agent library.
11610 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11611 the register buffer in the heap.
11612 (free_register_cache): If the register buffer isn't owned by the
11613 regcache, don't free it.
11614 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11615 pre-existing register caches.
11616 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11617 type.
11618 (convert_ascii_to_int): : Constify `from' parameter type.
11619 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11620 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11621 the needed buffer in-place.
11622 (relocate_instruction): New.
11623 * server.c (handle_query) <qSymbols>: If the target supports
11624 tracepoints, give it a chance of looking up symbols. Report
11625 support for fast tracepoints.
11626 (handle_status): Stabilize threads.
11627 (process_serial_event): Adjust.
11628 * server.h (struct fast_tracepoint_jump): Forward declare.
11629 (struct process_info) <fast_tracepoint_jumps>: New field.
11630 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11631 (decode_X_packet, decode_M_packet): Adjust.
11632 (relocate_instruction): Declare.
11633 (in_process_agent_loaded): Declare.
11634 (tracepoint_look_up_symbols): Declare.
11635 (struct fast_tpoint_collect_status): Declare.
11636 (fast_tracepoint_collecting): Declare.
11637 (force_unlock_trace_buffer): Declare.
11638 (handle_tracepoint_bkpts): Declare.
11639 (initialize_low_tracepoint)
11640 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11641 * target.h (struct target_ops) <stabilize_threads,
11642 install_fast_tracepoint_jump_pad>: New fields.
11643 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11644 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11645 [HAVE_STDINT_H]: Include stdint.h.
11646 (trace_debug_1): Rename to ...
11647 (trace_vdebug): ... this.
11648 (trace_debug): Rename to ...
11649 (trace_debug_1): ... this. Add `level' parameter.
11650 (trace_debug): New.
11651 (ATTR_USED, ATTR_NOINLINE): New.
11652 (IP_AGENT_EXPORT): New.
11653 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11654 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11655 (about_to_request_buffer_space, trace_buffer_is_full)
11656 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11657 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11658 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11659 (traceframe_write_count, traceframes_created)
11660 (trace_state_variables)
11661 New renaming defines.
11662 (struct ipa_sym_addresses): New.
11663 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11664 (symbol_list): New.
11665 (ipa_sym_addrs): New.
11666 (all_tracepoint_symbols_looked_up): New.
11667 (in_process_agent_loaded): New.
11668 (write_e_ipa_not_loaded): New.
11669 (maybe_write_ipa_not_loaded): New.
11670 (tracepoint_look_up_symbols): New.
11671 (debug_threads) [IN_PROCESS_AGENT]: New.
11672 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11673 (UNKNOWN_SIDE_EFFECTS): New.
11674 (stop_tracing): New.
11675 (flush_trace_buffer): New.
11676 (stop_tracing_bkpt): New.
11677 (flush_trace_buffer_bkpt): New.
11678 (read_inferior_integer): New.
11679 (read_inferior_uinteger): New.
11680 (read_inferior_data_pointer): New.
11681 (write_inferior_data_pointer): New.
11682 (write_inferior_integer): New.
11683 (write_inferior_uinteger): New.
11684 (struct collect_static_trace_data_action): Delete.
11685 (enum tracepoint_type): New.
11686 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11687 <actions_str, step_actions, step_actions_str>: Only include in
11688 GDBserver.
fa593d66
PA
11689 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11690 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11691 (tracepoints): Use IP_AGENT_EXPORT.
11692 (last_tracepoint): Don't include in the IPA.
11693 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11694 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11695 (alloced_trace_state_variables): New.
11696 (trace_state_variables): Use IP_AGENT_EXPORT.
11697 (traceframe_t): Delete unused variable.
11698 (circular_trace_buffer): Don't include in the IPA.
11699 (trace_buffer_start): Delete.
11700 (struct trace_buffer_control): New.
11701 (trace_buffer_free): Delete.
11702 (struct ipa_trace_buffer_control): New.
11703 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11704 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11705 New.
11706 (trace_buffer_ctrl): New.
11707 (TRACE_BUFFER_CTRL_CURR): New.
11708 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11709 Reimplement as macros.
11710 (trace_buffer_wrap): Delete.
11711 (traceframe_write_count, traceframe_read_count)
11712 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11713 (struct tracepoint_hit_ctx) <type>: New field.
11714 (struct fast_tracepoint_ctx): New.
11715 (memory_barrier): New.
11716 (cmpxchg): New.
11717 (record_tracepoint_error): Update atomically in the IPA.
11718 (clear_inferior_trace_buffer): New.
11719 (about_to_request_buffer_space): New.
11720 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11721 updating the same buffer.
11722 (add_tracepoint): Default the tracepoint's type to trap
11723 tracepoint, and orig_size to -1.
11724 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11725 internal variables.
11726 (create_trace_state_variable): New parameter `gdb'. Handle it.
11727 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11728 (cmd_qtdp): Handle fast tracepoints.
11729 (cmd_qtdv): Adjust.
11730 (max_jump_pad_size): New.
11731 (gdb_jump_pad_head): New.
11732 (get_jump_space_head): New.
11733 (claim_jump_space): New.
11734 (sort_tracepoints): New.
11735 (MAX_JUMP_SIZE): New.
11736 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11737 IPA.
11738 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11739 support. Upload fast traceframes, and delete internal IPA
11740 breakpoints.
11741 (stop_tracing_handler): New.
11742 (flush_trace_buffer_handler): New.
11743 (cmd_qtstop): Upload fast tracepoints.
11744 (response_tracepoint): Handle fast tracepoints.
11745 (tracepoint_finished_step): Upload fast traceframes. Set the
11746 tracepoint hit context's tracepoint type.
11747 (handle_tracepoint_bkpts): New.
11748 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11749 type. Add comment about fast tracepoints.
11750 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11751 non-existing action_str field.
11752 (get_context_regcache): Handle fast tracepoints.
11753 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11754 to the regcache.
11755 (fast_tracepoint_from_jump_pad_address): New.
11756 (fast_tracepoint_from_ipa_tpoint_address): New.
11757 (collecting_t): New.
11758 (force_unlock_trace_buffer): New.
11759 (fast_tracepoint_collecting): New.
11760 (collecting): New.
11761 (gdb_collect): New.
11762 (write_inferior_data_ptr): New.
11763 (target_tp_heap): New.
11764 (target_malloc): New.
11765 (download_agent_expr): New.
11766 (UALIGN): New.
11767 (download_tracepoints): New.
11768 (download_trace_state_variables): New.
11769 (upload_fast_traceframes): New.
11770 (IPA_FIRST_TRACEFRAME): New.
11771 (IPA_NEXT_TRACEFRAME_1): New.
11772 (IPA_NEXT_TRACEFRAME): New.
11773 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11774 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11775 (gdb_jump_pad_buffer_end): New.
11776 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11777 (initialize_tracepoint): Adjust.
11778 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11779 buffer. Initialize the low module.
11780 * utils.c (PREFIX, TOOLNAME): New.
11781 (malloc_failure): Use PREFIX.
11782 (error): In the IPA, an error causes an exit.
11783 (fatal, warning): Use PREFIX.
11784 (internal_error): Use TOOLNAME.
11785 (NUMCELLS): Increase to 10.
11786 * configure, config.in: Regenerate.
11787
d149dd1d
PA
117882010-06-01 Pedro Alves <pedro@codesourcery.com>
11789
11790 * server.c (handle_query) <qSupported>: Do two passes over the
11791 qSupported string to avoid nesting strtok.
11792
f6528abd
JK
117932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11794
11795 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11796 (CDEPS): New.
11797 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11798 -Wl,--dynamic-list.
11799 * configure: Regenerate.
11800 * proc-service.list: New.
11801
ca2a87a0
JK
118022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11803
11804 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11805 New comment.
11806
363a6e9f
OS
118072010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11808
11809 * gdbreplay.c (remote_open): Check error return from socket() call by
11810 its equality to -1 not by it being negative.
11811 * remote-utils.c (remote_open): Likewise.
11812
d23b6cb1
PA
118132010-05-23 Pedro Alves <pedro@codesourcery.com>
11814
11815 * config.h: Regenerate.
11816
28d3cf85
MK
118172010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11818
11819 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11820 doesn't provide PTRACE_GET_THREAD_AREA.
11821
fea36a59
MK
118222010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11823
11824 * linux-m68k-low.c: Include <asm/ptrace.h>
11825 (ps_get_thread_area): Implement.
11826
24b066ba
DE
118272010-05-03 Doug Evans <dje@google.com>
11828
11829 * event-loop.c (struct callback_event): New struct.
11830 (callback_list): New global.
11831 (append_callback_event, delete_callback_event): New functions.
11832 (process_callback): New function.
11833 (start_event_loop): Call it.
11834 * remote-utils.c (NOT_SCHEDULED): Define.
11835 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11836 moved out of readchar.
11837 (readchar): Rewrite. Call reschedule before returning.
11838 (reset_readchar): New function.
11839 (remote_close): Call it.
11840 (process_remaining, reschedule): New functions.
11841 * server.h (callback_handler_func): New typedef.
11842 (append_callback_event, delete_callback_event): Declare.
11843
9836d6ea
PA
118442010-05-03 Pedro Alves <pedro@codesourcery.com>
11845
11846 * proc-service.c (ps_pglobal_lookup): Use
11847 thread_db_look_up_one_symbol.
11848 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11849 parameter. Use it instead of all_symbols_looked_up.
11850 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11851 field.
11852 (all_symbols_looked_up): Don't declare.
11853 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11854 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11855 field.
11856 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11857 Set all_symbols_looked_up here.
11858 (thread_db_look_up_one_symbol): New.
11859 (thread_db_get_tls_address): Adjust.
11860 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11861 thread_db object on the heap, and tentatively set it in the
11862 process structure.
11863 (thread_db_init): Don't set all_symbols_looked_up here.
11864 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11865
7984d532
PA
118662010-05-03 Pedro Alves <pedro@codesourcery.com>
11867
11868 * linux-low.c (linux_kill, linux_detach): Adjust.
11869 (status_pending_p_callback): Remove redundant statement. Check
11870 for !TARGET_WAITIKIND_IGNORE, instead of
11871 TARGET_WAITKIND_STOPPED.
11872 (handle_tracepoints): Make sure LWP is locked. Adjust.
11873 (linux_wait_for_event_1): Adjust.
11874 (linux_cancel_breakpoints): New.
11875 (unsuspend_one_lwp): New.
11876 (unsuspend_all_lwps): New.
11877 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11878 (send_sigstop_callback): Change return type to int, add new
11879 `except' parameter and handle it.
11880 (suspend_and_send_sigstop_callback): New.
11881 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11882 pass them down. If SUSPEND, also increment the lwp's suspend
11883 count.
11884 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11885 (need_step_over_p): Don't consider suspended LWPs.
11886 (start_step_over): Adjust.
11887 (proceed_one_lwp): Change return type to int, add new `except'
11888 parameter and handle it.
11889 (unsuspend_and_proceed_one_lwp): New.
11890 (proceed_all_lwps): Use find_inferior instead of
11891 for_each_inferior.
11892 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11893 also decrement the suspend count of LWPs. Pass `except' down,
11894 instead of hacking its suspend count.
11895 (linux_pause_all): Add `freeze' parameter. Adjust.
11896 (linux_unpause_all): New.
11897 (linux_target_ops): Install linux_unpause_all.
11898 * server.c (handle_status): Adjust.
11899 * target.h (struct target_ops): New fields `unpause_all' and
11900 `cancel_breakpoints'. Add new parameter to `pause_all'.
11901 (pause_all): Add new `freeze' parameter.
11902 (unpause_all): New.
11903 (cancel_breakpoints): New.
11904 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11905 cancel breakpoints.
11906 (cmd_qtstart): Pause threads.
11907 (stop_tracing): Pause threads, and cancel breakpoints.
11908 * win32-low.c (win32_target_ops): Adjust.
11909
e471f25b
PA
119102010-05-03 Pedro Alves <pedro@codesourcery.com>
11911
11912 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11913 the inferior right away from here...
11914 (linux_wait_1): ... to here, and adjust to check the thread's
11915 last_resume_kind instead of the lwp's step or stop_expected flags.
11916
1915ef4f
PA
119172010-05-02 Pedro Alves <pedro@codesourcery.com>
11918
11919 * README: Use consistent `GDB' and `GDBserver' spellings.
11920
f9e39928
PA
119212010-05-02 Pedro Alves <pedro@codesourcery.com>
11922
11923 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11924 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11925 (linux_detach_one_lwp): Assume the lwp is stopped.
11926 (any_thread_of): Delete.
11927 (linux_detach): Stop all lwps here. Don't blindly delete all
11928 breakpoints.
11929 (delete_lwp_callback): New.
11930 (linux_mourn): Delete all lwps of the process that is gone.
11931 (linux_wait_1): Don't delete the last lwp of the process here.
11932 * mem-break.h (mark_breakpoints_out): Declare.
11933 * mem-break.c (mark_breakpoints_out): New.
11934 (free_all_breakpoints): Use it.
11935 * server.c (handle_target_event): If the process is gone, mark
11936 breakpoints out.
11937 * thread-db.c (struct thread_db) <create_bp>: New field.
11938 (thread_db_enable_reporting): Fix prototype. Store a thread event
11939 breakpoint reference in the thread_db struct.
11940 (thread_db_load_search): Clear the thread_db object.
11941 (try_thread_db_load_1): Ditto.
11942 (switch_to_process): New.
11943 (disable_thread_event_reporting): Use it.
11944 (remove_thread_event_breakpoints): New.
11945 (thread_db_detach, thread_db_mourn): Use it.
11946
1e7fc18c
PA
119472010-05-01 Pedro Alves <pedro@codesourcery.com>
11948
11949 * linux-low.c (linux_enable_event_reporting): New.
11950 (linux_wait_for_event_1, handle_extended_wait): Use it.
11951
02fc4de7
PA
119522010-04-30 Pedro Alves <pedro@codesourcery.com>
11953
11954 * linux-low.c (linux_kill_one_lwp, linux_kill)
11955 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11956 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11957 SIGSTOP even if the LWP is stopped.
11958 (send_sigstop_callback): New.
11959 (stop_all_lwps): Use send_sigstop_callback instead.
11960 (linux_resume_one_thread): Adjust.
11961 (proceed_one_lwp): Still proceed an LWP that the client has
11962 requested to stop, if we haven't reported it as stopped yet. Make
11963 sure that LWPs the client want stopped, have a pending SIGSTOP.
11964
bc3b5632
DE
119652010-04-26 Doug Evans <dje@google.com>
11966
ae1ada35
DE
11967 * server.c (handle_general_set): Make static.
11968
bc3b5632
DE
11969 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11970 Print received char after testing for error/eof instead of before.
11971 (input_interrupt): Tweak comment.
11972
65730243
DE
119732010-04-23 Doug Evans <dje@google.com>
11974
11975 * server.c (start_inferior): Print inferior argv if --debug.
11976
a8ae7dc0
AR
119772010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11978
11979 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11980 * nto-x86-low.c: Include server.h
11981
1c07cc19
PM
119822010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11983
11984 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11985 be consistent with other sources of this directory.
11986 (init_registers_amd64): Correct name of source file of this function
11987 in the comment.
11988
e0a61e09
PM
119892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11990
11991 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11992 64-bit executables.
11993
54709339
PM
119942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11995
11996 * win32-i386-low.c: Add 64-bit support.
11997 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11998 (init_registers_amd64): Declare.
11999 (mappings): Add 64-bit version of array.
12000 (init_windows_x86): New function.
12001 (the_low_target): Change init_arch field to init_windows_x86.
12002
e8f0053d
PM
120032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12004
12005 * win32-low.c: Adapt to support also 64-bit architecture.
12006 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12007 (get_image_name): Use SIZE_T type for local variable `done'.
12008 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12009 (toolhelp_get_dll_name): Idem.
12010 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12011 Use uintptr_t typecast to avoid warning.
12012 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12013 (handle_exception): Use phex_nz to avoid warning.
12014 (win32_wait): Remove unused local variable `process'.
12015
c481e77e
PM
120162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12017
12018 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12019 `amd64-avx.o'.
12020
12ea4b69
PM
120212010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12022
12023 * configure.ac: Use `ws2_32' library for srv_mingw.
12024 * configure: Regenerate.
12025 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12026 * remote-utils.c: Likewise.
12027
f6d1620c
L
120282010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12029
12030 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12031 if __x86_64__ is defined.
12032
8e642873
PM
120332010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12034
12035 * configure: Regenerate.
12036
711e434b
PM
120372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12038
12039 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12040 * target.h (target_ops): New get_tib_address field.
12041 * win32-low.h (win32_thread_info): Add thread_local_base field.
12042 * win32-low.c (child_add_thread): Add tlb argument.
12043 Set thread_local_base field to TLB.
12044 (get_child_debug_event): Adapt to child_add_thread change.
12045 (win32_get_tib_address): New function.
12046 (win32_target_ops): Set get_tib_address field to
12047 win32_get_tib_address.
12048 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12049
505106cd
PA
120502010-04-12 Pedro Alves <pedro@codesourcery.com>
12051
505106cd
PA
12052 * linux-low.c (linux_mourn): Also remove the process.
12053 * server.c (handle_target_event): Don't remove the process here.
12054 * nto-low.c (nto_mourn): New.
12055 (nto_target_ops): Install it.
12056 * spu-low.c (spu_mourn): New.
12057 (spu_target_ops): Install it.
12058 * win32-low.c (win32_mourn): New.
12059 (win32_target_ops): Install it.
12060
e8470a06
PA
120612010-04-12 Pedro Alves <pedro@codesourcery.com>
12062
12063 * server.h (buffer_xml_printf): Remove redundant `;'.
12064
45ba0d02
PA
120652010-04-12 Pedro Alves <pedro@codesourcery.com>
12066
12067 * regcache.c (set_register_cache): Invalidate regcaches before
12068 changing the register cache layout.
12069 (regcache_invalidate_one): Allow a NULL regcache.
12070 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12071 regcaches before changing the register cache layout or the target
12072 regsets.
12073
59e04013
L
120742010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12075
12076 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12077 variable warning on Linux/x86-64.
12078
8336d594
PA
120792010-04-11 Pedro Alves <pedro@codesourcery.com>
12080
12081 GDBserver disconnected tracing support.
12082
12083 * linux-low.c (linux_remove_process): Delete.
12084 (add_lwp): Don't set last_resume_kind here.
12085 (linux_kill): Use `mourn'.
12086 (linux_detach): Use `thread_db_detach', and `mourn'.
12087 (linux_mourn): New.
12088 (linux_attach_lwp_1): Adjust comment.
12089 (linux_attach): last_resume_kind moved the thread_info; adjust.
12090 (status_pending_p_callback): Adjust.
12091 (linux_wait_for_event_1): Adjust.
12092 (count_events_callback, select_singlestep_lwp_callback)
12093 (select_event_lwp_callback, cancel_breakpoints_callback)
12094 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12095 (proceed_one_lwp): Adjust.
12096 (linux_async): Add debug output.
12097 (linux_thread_stopped): New.
12098 (linux_pause_all): New.
12099 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12100 linux_pause_all.
12101 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12102 (thread_db_free): Delete declaration.
12103 (thread_db_detach, thread_db_mourn): Declare.
12104 * thread-db.c (thread_db_init): Use thread_db_mourn.
12105 (thread_db_free): Delete, split in two.
12106 (disable_thread_event_reporting): New.
12107 (thread_db_detach): New.
12108 (thread_db_mourn): New.
12109
12110 * server.h (struct thread_info) <last_resume_kind>: New field.
12111 <attached>: Add comment.
12112 <gdb_detached>: New field.
12113 (handler_func): Change return type to int.
12114 (handle_serial_event, handle_target_event): Ditto.
12115 (gdb_connected): Declare.
12116 (tracing): Delete.
12117 (disconnected_tracing): Declare.
12118 (stop_tracing): Declare.
12119
12120 * server.c (handle_query) <qSupported>: Report support for
12121 disconnected tracing.
12122 (queue_stop_reply_callback): Account for running threads.
12123 (gdb_wants_thread_stopped): New.
12124 (gdb_wants_all_threads_stopped): New.
12125 (gdb_reattached_process): New.
12126 (handle_status): Clear the `gdb_detached' flag of all processes.
12127 In all-stop, stop all threads.
12128 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12129 (process_serial_event): If the remote connection breaks, or if an
12130 exit was forced with "monitor exit", force an event loop exit.
12131 Handle disconnected tracing on detach.
12132 (handle_serial_event): Adjust.
12133 (handle_target_event): If GDB isn't connected, forward events back
12134 to the inferior, unless the last process exited, in which case,
12135 exit gdbserver. Adjust interface.
12136
12137 * remote-utils.c (remote_open): Don't block in accept. Instead
12138 register an event loop source on the listen socket file
12139 descriptor. Refactor bits into ...
12140 (listen_desc): ... this new global.
12141 (gdb_connected): ... this new function.
12142 (enable_async_notification): ... this new function.
12143 (handle_accept_event): ... this new function.
12144 (remote_close): Clear remote_desc.
12145
12146 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12147
12148 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12149 New fields.
12150 (mourn_inferior): Define.
12151 (target_process_qsupported): Avoid the dangling else problem.
12152 (thread_stopped): Define.
12153 (pause_all): Define.
12154 (target_waitstatus_to_string): Declare.
12155 * target.c (target_waitstatus_to_string): New.
12156
12157 * tracepoint.c (tracing): Make extern.
12158 (disconnected_tracing): New.
12159 (stop_tracing): Make extern. Handle tracing stops due to GDB
12160 disconnecting.
12161 (cmd_qtdisconnected): New.
12162 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12163 (handle_tracepoint_general_set): Handle QTDisconnected.
12164
12165 * event-loop.c (event_handler_func): Change return type to int.
12166 (process_event): Bail out if the event handler wants the event
12167 loop to stop.
12168 (handle_file_event): Ditto.
12169 (start_event_loop): Bail out if the event handler wants the event
12170 loop to stop.
12171
12172 * nto-low.c (nto_target_ops): Adjust.
12173 * spu-low.c (spu_wait): Don't remove the process here.
12174 (spu_target_ops): Adjust.
12175 * win32-low.c (win32_wait): Don't remove the process here.
12176 (win32_target_ops): Adjust.
12177
5d267c4c
PA
121782010-04-11 Pedro Alves <pedro@codesourcery.com>
12179
12180 * regcache.c (realloc_register_cache): Invalidate inferior's
12181 regcache before recreating it.
12182
623ccd72
PA
121832010-04-09 Pedro Alves <pedro@codesourcery.com>
12184
12185 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12186
219f2f23
PA
121872010-04-09 Stan Shebs <stan@codesourcery.com>
12188 Pedro Alves <pedro@codesourcery.com>
12189
12190 * server.h (LONGEST): New.
12191 (struct thread_info) <while_stepping>: New field.
12192 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12193 Declare.
12194 (initialize_tracepoint, handle_tracepoint_general_set)
12195 (handle_tracepoint_query, tracepoint_finished_step)
12196 (tracepoint_was_hit, release_while_stepping_state_list):
12197 (current_traceframe): Declare.
12198 * server.c (handle_general_set): Handle tracepoint packets.
12199 (read_memory): New.
12200 (write_memory): New.
12201 (handle_search_memory_1): Use read_memory.
12202 (handle_query): Report support for conditional tracepoints, trace
12203 state variables, and tracepoint sources. Handle tracepoint
12204 queries.
12205 (main): Initialize the tracepoints module.
12206 (process_serial_event): Handle traceframe reads/writes.
12207
12208 * linux-low.c (handle_tracepoints): New.
12209 (linux_wait_1): Call it.
12210 (linux_resume_one_lwp): Handle while-stepping.
12211 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12212 (linux_target_ops): Install them.
12213 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12214 New field.
12215 * linux-x86-low.c (x86_supports_tracepoints): New.
12216 (the_low_target). Install it.
12217
12218 * mem-break.h (delete_breakpoint): Declare.
12219 * mem-break.c (delete_breakpoint): Make external.
12220
12221 * target.h (struct target_ops): Add `supports_tracepoints',
12222 `read_pc', and `write_pc' fields.
12223 (target_supports_tracepoints): Define.
12224 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12225 (phex_nz): New.
12226
12227 * regcache.h (struct regcache) <registers_owned>: New field.
12228 (init_register_cache, regcache_cpy): Declare.
12229 (regcache_read_pc, regcache_write_pc): Declare.
12230 (register_cache_size): Declare.
12231 (supply_regblock): Declare.
12232 * regcache.c (init_register_cache): New.
12233 (new_register_cache): Use it.
12234 (regcache_cpy): New.
12235 (register_cache_size): New.
12236 (supply_regblock): New.
12237 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12238
219f2f23
PA
12239 * tracepoint.c: New.
12240
12241 * Makefile.in (OBS): Add tracepoint.o.
12242 (tracepoint.o): New rule.
12243
3a13a53b
L
122442010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12245
12246 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12247 (i386-mmx.o): New.
12248 (i386-mmx.c): Likewise.
12249 (i386-mmx-linux.o): Likewise.
12250 (i386-mmx-linux.c): Likewise.
12251
12252 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12253 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12254 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12255 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12256
12257 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12258 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12259 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12260
1570b33e
L
122612010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12262
12263 * Makefile.in (clean): Updated.
12264 (i386-avx.o): New.
12265 (i386-avx.c): Likewise.
12266 (i386-avx-linux.o): Likewise.
12267 (i386-avx-linux.c): Likewise.
12268 (amd64-avx.o): Likewise.
12269 (amd64-avx.c): Likewise.
12270 (amd64-avx-linux.o): Likewise.
12271 (amd64-avx-linux.c): Likewise.
12272
12273 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12274 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12275 (srv_amd64_regobj): Add amd64-avx.o.
12276 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12277 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12278 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12279 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12280 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12281 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12282 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12283
12284 * i387-fp.c: Include "i386-xstate.h".
12285 (i387_xsave): New.
12286 (i387_cache_to_xsave): Likewise.
12287 (i387_xsave_to_cache): Likewise.
12288 (x86_xcr0): Likewise.
12289
12290 * i387-fp.h (i387_cache_to_xsave): Likewise.
12291 (i387_xsave_to_cache): Likewise.
12292 (x86_xcr0): Likewise.
12293
12294 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12295 * linux-crisv32-low.c (target_regsets): Likewise.
12296 * linux-m68k-low.c (target_regsets): Likewise.
12297 * linux-mips-low.c (target_regsets): Likewise.
12298 * linux-ppc-low.c (target_regsets): Likewise.
12299 * linux-s390-low.c (target_regsets): Likewise.
12300 * linux-sh-low.c (target_regsets): Likewise.
12301 * linux-sparc-low.c (target_regsets): Likewise.
12302 * linux-xtensa-low.c (target_regsets): Likewise.
12303
12304 * linux-low.c: Include <sys/uio.h>.
12305 (regsets_fetch_inferior_registers): Support nt_type.
12306 (regsets_store_inferior_registers): Likewise.
12307 (linux_process_qsupported): New.
12308 (linux_target_ops): Add linux_process_qsupported.
12309
12310 * linux-low.h (regset_info): Add nt_type.
12311 (linux_target_ops): Add process_qsupported.
12312
12313 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12314 and <sys/uio.h>.
12315 (init_registers_i386_avx_linux): New.
12316 (init_registers_amd64_avx_linux): Likewise.
12317 (xmltarget_i386_linux_no_xml): Likewise.
12318 (xmltarget_amd64_linux_no_xml): Likewise.
12319 (PTRACE_GETREGSET): Likewise.
12320 (PTRACE_SETREGSET): Likewise.
12321 (x86_fill_xstateregset): Likewise.
12322 (x86_store_xstateregset): Likewise.
12323 (use_xml): Likewise.
12324 (x86_linux_update_xmltarget): Likewise.
12325 (x86_linux_process_qsupported): Likewise.
12326 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12327 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12328 init_registers_i386_linux here. Call
12329 x86_linux_update_xmltarget.
12330 (the_low_target): Add x86_linux_process_qsupported.
12331
12332 * server.c (handle_query): Call target_process_qsupported.
12333
12334 * target.h (target_ops): Add process_qsupported.
12335 (target_process_qsupported): New.
12336
fc7238bb
PA
123372010-04-03 Pedro Alves <pedro@codesourcery.com>
12338
12339 * inferiors.c (add_thread): Set last_status kind to
12340 TARGET_WAITKIND_IGNORE.
12341 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12342 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12343 (linux_wait_1): Move `thread' local definition to block that uses
12344 it. Don't NULL initialize `event_child'.
12345 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12346 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12347 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12348
bdabb078
PA
123492010-04-01 Pedro Alves <pedro@codesourcery.com>
12350
12351 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12352 an extended waitstatus, or by a watchpoint.
12353 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12354 thread was stepping or has been stopped by a watchpoint.
12355
d3bbe7a0
PA
123562010-04-01 Pedro Alves <pedro@codesourcery.com>
12357
12358 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12359 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12360 of another, then delete the previous, and validate all
12361 breakpoints.
12362 (validate_inserted_breakpoint): New.
12363 (delete_disabled_breakpoints): New.
12364 (validate_breakpoints): New.
12365 (check_mem_read): Validate breakpoints before trusting their
12366 shadow. Delete disabled breakpoints.
12367 (check_mem_write): Validate breakpoints before trusting they
12368 should be inserted. Delete disabled breakpoints.
12369 * mem-break.h (validate_breakpoints):
12370 * server.c (handle_query): Validate breakpoints when we see a
12371 qSymbol query.
12372
8b07ae33
PA
123732010-04-01 Pedro Alves <pedro@codesourcery.com>
12374
12375 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12376 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12377 if we could tell there's a GDB breakpoint at stop_pc.
12378 (need_step_over_p): Don't do a step over if we find a GDB
12379 breakpoint at the resume PC.
12380
12381 * mem-break.c (struct raw_breakpoint): New.
12382 (enum bkpt_type): New type `gdb_breakpoint'.
12383 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12384 fields. New field `raw'.
12385 (find_raw_breakpoint_at): New.
12386 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12387 breakpoint instead.
12388 (set_breakpoint_at): Adjust.
12389 (delete_raw_breakpoint): New.
12390 (release_breakpoint): New.
12391 (delete_breakpoint): Rename to...
12392 (delete_breakpoint_1): ... this. Add proc parameter. Use
12393 release_breakpoint. Return ENOENT.
12394 (delete_breakpoint): Reimplement.
12395 (find_breakpoint_at): Delete.
12396 (find_gdb_breakpoint_at): New.
12397 (delete_breakpoint_at): Delete.
12398 (set_gdb_breakpoint_at): New.
12399 (delete_gdb_breakpoint_at): New.
12400 (gdb_breakpoint_here): New.
12401 (set_reinsert_breakpoint): Use release_breakpoint.
12402 (uninsert_breakpoint): Rename to ...
12403 (uninsert_raw_breakpoint): ... this.
12404 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12405 (reinsert_raw_breakpoint): Change parameter type to
12406 raw_breakpoint.
12407 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12408 instead.
12409 (check_breakpoints): Adjust. Use release_breakpoint.
12410 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12411 (breakpoint_inserted_here): Ditto.
12412 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12413 Don't trust the breakpoint's shadow if it is not inserted.
12414 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12415 (delete_all_breakpoints): Adjust.
12416 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12417 use delete_breakpoint_1.
12418
12419 * mem-break.h (breakpoints_supported): Delete declaration.
12420 (set_gdb_breakpoint_at): Declare.
12421 (gdb_breakpoint_here): Declare.
12422 (delete_breakpoint_at): Delete.
12423 (delete_gdb_breakpoint_at): Declare.
12424
12425 * server.h (struct raw_breakpoint): Forward declare.
12426 (struct process_info): New field `raw_breakpoints'.
12427
12428 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12429 breakpoints.
12430
6bf5e0ba
PA
124312010-03-24 Pedro Alves <pedro@codesourcery.com>
12432
12433 * linux-low.c (status_pending_p_callback): Fix comment.
12434 (linux_wait_for_event_1): Move most of the internal breakpoint
12435 handling from here...
12436 (linux_wait_1): ... to here.
12437 (count_events_callback): New.
12438 (select_singlestep_lwp_callback): New.
12439 (select_event_lwp_callback): New.
12440 (cancel_breakpoints_callback): New.
12441 (select_event_lwp): New.
12442 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12443 priority to all LWPs that have had events that should be reported
12444 to the client. Cancel breakpoints when about to reporting the
12445 event to the client, not while stopping lwps. No longer cancel
12446 finished single-steps here.
12447 (cancel_finished_single_step): Delete.
12448 (cancel_finished_single_steps): Delete.
12449
414a389f
PA
124502010-03-24 Pedro Alves <pedro@codesourcery.com>
12451
12452 * mem-break.c (enum bkpt_type): New.
12453 (struct breakpoint): New field `type'.
12454 (set_breakpoint_at): Change return type to struct breakpoint
12455 pointer. Set type to `other_breakpoint' by default.
12456 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12457 in the breakpoint list.
12458 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12459 (reinsert_breakpoint): Rename to ...
12460 (reinsert_raw_breakpoint): ... this.
12461 (reinsert_breakpoints_at): Adjust.
12462 * mem-break.h (struct breakpoint): Declare.
12463 (set_breakpoint_at): Change return type to struct breakpoint
12464 pointer.
12465
2280c721
PA
124662010-03-24 Pedro Alves <pedro@codesourcery.com>
12467
12468 * server.c (handle_query): Assign, not compare.
12469
d50171e4
PA
124702010-03-24 Pedro Alves <pedro@codesourcery.com>
12471
12472 Teach linux gdbserver to step-over-breakpoints.
12473
12474 * linux-low.c (can_hardware_single_step): New.
12475 (supports_breakpoints): New.
12476 (handle_extended_wait): If stopping threads, read the stop pc of
12477 the new cloned LWP.
12478 (get_pc): New.
12479 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12480 low target doesn't support retrieving the PC.
12481 (add_lwp): Set last_resume_kind to resume_continue.
12482 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12483 (linux_attach): Don't clear stop_expected. Set the lwp's
12484 last_resume_kind to resume_stop.
12485 (linux_detach_one_lwp): Don't check for removed breakpoints.
12486 (check_removed_breakpoint): Delete.
12487 (status_pending_p): Rename to ...
12488 (status_pending_p_callback): ... this. Don't check for removed
12489 breakpoints. Don't consider threads that are stopped from GDB's
12490 perspective.
12491 (linux_wait_for_lwp): Always read the stop_pc here.
12492 (cancel_breakpoint): New.
12493 (step_over_bkpt): New global.
12494 (linux_wait_for_event_1): Implement stepping over breakpoints.
12495 (gdb_wants_lwp_stopped): New.
12496 (gdb_wants_all_stopped): New.
12497 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12498 single-step traps here. Store the thread's last reported target
12499 wait status.
12500 (send_sigstop): Don't clear stop_expected. Always set it,
12501 instead.
12502 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12503 (cancel_finished_single_step): New.
12504 (cancel_finished_single_steps): New.
12505 (wait_for_sigstop): Don't cancel finished single-step traps here.
12506 (linux_resume_one_lwp): Don't check for removed breakpoints.
12507 Don't set `step' on non-hardware step archs.
12508 (linux_set_resume_request): Ignore resume_stop requests if already
12509 stopping or stopped. Set the lwp's last_resume_kind.
12510 (resume_status_pending_p): Don't check for removed breakpoints.
12511 (need_step_over_p): New.
12512 (start_step_over): New.
12513 (finish_step_over): New.
12514 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12515 requests. Clear the thread's last reported target waitstatus.
12516 Don't use the `suspended' flag. Don't consider pending breakpoints.
12517 (linux_resume): Start a step-over if necessary.
12518 (proceed_one_lwp): New.
12519 (proceed_all_lwps): New.
12520 (unstop_all_lwps): New.
12521 * linux-low.h (struct lwp_info): Rewrite comment for the
12522 `suspended' flag. Add the `stop_pc' field. Delete the
12523 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12524 Add `'last_resume_kind' and `need_step_over' fields.
12525 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12526 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12527 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12528 (set_raw_breakpoint_at): New.
12529 (set_breakpoint_at): Rewrite to use it.
12530 (reinsert_breakpoint_handler): Delete.
12531 (set_reinsert_breakpoint): New.
12532 (reinsert_breakpoint_by_bp): Delete.
12533 (delete_reinsert_breakpoints): New.
12534 (uninsert_breakpoint): Rewrite.
12535 (uninsert_breakpoints_at): New.
12536 (reinsert_breakpoint): Rewrite.
12537 (reinsert_breakpoints_at): New.
12538 (check_breakpoints): Rewrite.
12539 (breakpoint_here): New.
12540 (breakpoint_inserted_here): New.
12541 (check_mem_read): Adjust.
12542 * mem-break.h (breakpoints_supported, breakpoint_here)
12543 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12544 (reinsert_breakpoint_by_bp): Delete declaration.
12545 (delete_reinsert_breakpoints): Declare.
12546 (reinsert_breakpoint): Delete declaration.
12547 (reinsert_breakpoints_at): Declare.
12548 (uninsert_breakpoint): Delete declaration.
12549 (uninsert_breakpoints_at): Declare.
12550 (check_breakpoints): Adjust prototype.
12551 * server.h: Adjust include order.
12552 (struct thread_info): Declare here. Add a `last_status' field.
12553
30ba68cb
MS
125542010-03-23 Michael Snyder <msnyder@vmware.com>
12555
12556 * server.c (crc32): New function.
12557 (handle_query): Add handling for 'qCRC:' request.
12558
b9a881c2
PA
125592010-03-23 Pedro Alves <pedro@codesourcery.com>
12560
12561 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12562 lwp had been stopped by a watchpoint.
12563
e92d13d5
PA
125642010-03-16 Pedro Alves <pedro@codesourcery.com>
12565
12566 * server.h (internal_error): Declare.
12567 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12568 * utils.c (internal_error): New function.
12569
64daa791
AS
125702010-03-15 Andreas Schwab <schwab@redhat.com>
12571
12572 * configure.srv: Fix typo setting srv_regobj.
12573
f52cd8cd
PA
125742010-03-15 Pedro Alves <pedro@codesourcery.com>
12575
12576 * linux-low.c (fetch_register): Avoid passing a non string literal
12577 format to `error'.
12578 (usr_store_inferior_registers): Ditto.
12579
93ae6fdc
PA
125802010-03-14 Pedro Alves <pedro@codesourcery.com>
12581
12582 * linux-low.c (linux_write_memory): Bail out early if peeking
12583 memory failed.
12584
c3adc08c
PA
125852010-03-14 Pedro Alves <pedro@codesourcery.com>
12586
12587 * linux-low.h (struct lwp_info): New fields
12588 `stopped_by_watchpoint' and `stopped_data_address'.
12589 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12590 here, and cache them in the lwp object.
12591 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12592 directly.
12593 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12594 field.
12595 (linux_stopped_by_watchpoint): Rewrite.
12596 (linux_stopped_data_address): Rewrite.
12597
bce522a2
PA
125982010-03-06 Simo Melenius <simo.melenius@iki.fi>
12599
12600 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12601 switching the current inferior, not before.
12602
90884b2b
L
126032010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12604
12605 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12606 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12607 i386-linux.c and amd64-linux.c.
12608 (reg-i386.o): Removed.
12609 (reg-i386.c): Likewise.
12610 (reg-i386-linux.o): Likewise.
12611 (reg-i386-linux.c): Likewise.
12612 (reg-x86-64.o): Likewise.
12613 (reg-x86-64.c): Likewise.
12614 (reg-x86-64-linux.o): Likewise.
12615 (reg-x86-64-linux.c): Likewise.
12616 (i386.o): New.
12617 (i386.c): Likewise.
12618 (i386-linux.o): Likewise.
12619 (i386-linux.c): Likewise.
12620 (amd64.o): Likewise.
12621 (amd64.c): Likewise.
12622 (amd64-linux.o): Likewise.
12623 (amd64-linux.c): Likewise.
12624
12625 * configure.srv (srv_i386_regobj): New.
12626 (srv_i386_linux_regobj): Likewise.
12627 (srv_amd64_regobj): Likewise.
12628 (srv_amd64_linux_regobj): Likewise.
12629 (srv_i386_32bit_xmlfiles): Likewise.
12630 (srv_i386_64bit_xmlfiles): Likewise.
12631 (srv_i386_xmlfiles): Likewise.
12632 (srv_amd64_xmlfiles): Likewise.
12633 (srv_i386_linux_xmlfiles): Likewise.
12634 (srv_amd64_linux_xmlfiles): Likewise.
12635 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12636 srv_xmlfiles to $srv_i386_xmlfiles.
12637 (i[34567]86-*-mingw32ce*): Likewise.
12638 (i[34567]86-*-mingw*): Likewise.
12639 (i[34567]86-*-nto*): Likewise.
12640 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12641 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12642 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12643 (x86_64-*-linux*): Likewise.
12644
12645 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12646 (init_registers_amd64_linux): New.
12647 (x86_arch_setup): Replace init_registers_x86_64_linux with
12648 init_registers_amd64_linux.
12649
193f13e6
MK
126502010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12651
12652 * configure.ac: Check for libdl. If it is not available link against
12653 static libthread_db.
12654 * configure: Regenerate.
12655
85d721b8
PA
126562010-02-22 Pedro Alves <pedro@codesourcery.com>
12657
12658 PR9605
12659
12660 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12661 handing a read watchpoint.
12662 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12663
6076632b
DE
126642010-02-12 Doug Evans <dje@google.com>
12665
12666 * linux-low.c (linux_supports_tracefork_flag): Document.
12667 (linux_look_up_symbols): Add comment.
12668
3327ccf7
L
126692010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12670
12671 * regcache.c (supply_register): Clear regcache if buf is NULL.
12672
0718675c 126732010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12674 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12675
12676 * inferiors.c (find_inferior): Add function documentation.
12677 (unloaded_dll): Handle the case where the unloaded dll has not
12678 been previously registered in the dll list.
12679
177321bd
DJ
126802010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12681
12682 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12683 (thumb2_breakpoint): New.
12684 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12685
2b009048
DJ
126862010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12687
12688 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12689 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12690 breakpoints.
12691
3be029c7
PA
126922010-01-21 Pedro Alves <pedro@codesourcery.com>
12693
12694 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12695
18f5de3b
JK
126962010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12697
12698 * linux-s390-low.c (s390_collect_ptrace_register)
12699 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12700
3743bb4f
DE
127012010-01-21 Doug Evans <dje@google.com>
12702
14ce3065
DE
12703 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12704 (PTRACE_ARG4_TYPE): New macro.
12705 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12706 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12707 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12708 (usr_store_inferior_registers): Ditto.
12709 (linux_read_memory, linux_write_memory): Ditto.
12710 (linux_test_for_tracefork): Ditto.
12711
3743bb4f
DE
12712 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12713 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12714
8b315be5
PA
127152010-01-21 Pedro Alves <pedro@codesourcery.com>
12716
12717 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12718 target.
12719
85492558
PA
127202010-01-21 Pedro Alves <pedro@codesourcery.com>
12721
12722 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12723 prototype to take a regcache. Adjust.
12724
442ea881
PA
127252010-01-20 Pedro Alves <pedro@codesourcery.com>
12726
12727 * regcache.h (struct thread_info): Forward declare.
12728 (struct regcache): New.
12729 (new_register_cache): Adjust prototype.
12730 (get_thread_regcache): Declare.
12731 (free_register_cache): Adjust prototype.
12732 (registers_to_string, registers_from_string): Ditto.
12733 (supply_register, supply_register_by_name, collect_register)
12734 (collect_register_as_string, collect_register_by_name): Ditto.
12735 * regcache.c (struct inferior_regcache_data): Delete.
12736 (get_regcache): Rename to ...
12737 (get_thread_regcache): ... this. Adjust. Switch inferior before
12738 fetching registers.
12739 (regcache_invalidate_one): Adjust.
12740 (regcache_invalidate): Fix prototype.
12741 (new_register_cache): Return the new register cache.
12742 (free_register_cache): Change prototype.
12743 (realloc_register_cache): Adjust.
12744 (registers_to_string): Change prototype to take a regcache. Adjust.
12745 (registers_from_string): Ditto.
12746 (register_data): Ditto.
12747 (supply_register): Ditto.
12748 (supply_register_by_name): Ditto.
12749 (collect_register): Ditto.
12750 (collect_register_as_string): Ditto.
12751 (collect_register_by_name): Ditto.
12752 * server.c (process_serial_event): Adjust.
12753 * linux-low.h (regset_fill_func, regset_store_func): Change
12754 prototype.
12755 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12756 Change prototype.
12757 * linux-low.c (get_stop_pc): Adjust.
12758 (check_removed_breakpoint): Adjust.
12759 (linux_wait_for_event): Adjust.
12760 (linux_resume_one_lwp): Adjust.
12761 (fetch_register): Add regcache parameter. Adjust.
12762 (usr_store_inferior_registers): Ditto.
12763 (regsets_fetch_inferior_registers): Ditto.
12764 (regsets_store_inferior_registers): Ditto.
12765 (linux_fetch_registers, linux_store_registers): Ditto.
12766 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12767 regcache. Adjust.
43aaf8b6
PA
12768 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12769 Ditto.
442ea881
PA
12770 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12771 prototype to take a regcache.
12772 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12773 * remote-utils.c (convert_ascii_to_int, outreg)
12774 (prepare_resume_reply): Change prototype to take a regcache.
12775 Adjust.
12776 * target.h (struct target_ops) <fetch_registers, store_registers>:
12777 Change prototype to take a regcache.
12778 (fetch_inferior_registers, store_inferior_registers): Change
12779 prototype to take a regcache. Adjust.
12780 * proc-service.c (ps_lgetregs): Adjust.
12781 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12782 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12783 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12784 take a regcache. Adjust.
12785 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12786 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12787 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12788 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12789 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12790 (cris_cannot_fetch_register):
12791 (cris_breakpoint_at): Change prototype to take a regcache.
12792 Adjust.
12793 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12794 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12795 to take a regcache. Adjust.
12796 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12797 Adjust.
12798 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12799 take a regcache. Adjust.
12800 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12801 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12802 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12803 * linux-mips-low.c (mips_get_pc):
12804 (mips_set_pc): Change prototype to take a regcache. Adjust.
12805 (mips_reinsert_addr): Adjust.
12806 (mips_collect_register): Change prototype to take a regcache.
12807 Adjust.
12808 (mips_supply_register):
12809 (mips_collect_register_32bit, mips_supply_register_32bit)
12810 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12811 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12812 * linux-ppc-low.c (ppc_supply_ptrace_register)
12813 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12814 (parse_spufs_run): Adjust.
12815 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12816 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12817 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12818 take a regcache. Adjust.
12819 * linux-s390-low.c (s390_collect_ptrace_register)
12820 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12821 (s390_set_pc): Change prototype to take a regcache. Adjust.
12822 (s390_arch_setup): Adjust.
12823 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12824 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12825 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12826 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12827 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12828 regcache. Adjust.
12829 (sparc_breakpoint_at): Adjust.
12830 * linux-xtensa-low.c (xtensa_fill_gregset):
12831 (xtensa_store_gregset):
12832 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12833 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12834 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12835 prototype to take a regcache. Adjust.
12836 * win32-arm-low.c (arm_fetch_inferior_register)
12837 (arm_store_inferior_register): Change prototype to take a
12838 regcache. Adjust.
12839 * win32-i386-low.c (i386_fetch_inferior_register)
12840 (i386_store_inferior_register): Change prototype to take a
12841 regcache. Adjust.
12842 * win32-low.c (child_fetch_inferior_registers)
12843 (child_store_inferior_registers): Change prototype to take a
12844 regcache. Adjust.
12845 (win32_wait): Adjust.
12846 (win32_fetch_inferior_registers): Change prototype to take a
12847 regcache. Adjust.
12848 (win32_store_inferior_registers): Adjust.
12849 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12850 store_inferior_register>: Change prototype to take a regcache.
12851
60c3d7b0
DE
128522010-01-20 Doug Evans <dje@google.com>
12853
12854 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12855 #ifdef.
12856 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12857 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12858
dc146f7c
VP
128592010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12860
12861 * linux-low.c (linux_core_of_thread): New.
12862 (compare_ints, show_process, list_threads): New.
12863 (linux_qxfer_osdata): Report threads and cores.
12864 (linux_target_op): Register linux_core_of_thread.
12865 * remote-utils.c (prepare_resume_reply): Report the core.
12866 (buffer_xml_printf): Support %d specifier.
12867 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12868 New.
12869 (handle_query): Handle qXfer:threads. Announce availability
12870 thereof.
12871 * target.h (struct target_ops): New field core_of_thread.
12872
7803799a
UW
128732010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12874
12875 * Makefile.in (clean): Remove new generated files.
12876 (reg-s390.o, reg-s390.c): Remove rules.
12877 (reg-s390x.o, reg-s390x.c): Likewise.
12878 (s390-linux32.o, s390-linux32.c): Add rules.
12879 (s390-linux64.o, s390-linux64.c): Likewise.
12880 (s390x-linux64.o, s390x-linux64.c): Likewise.
12881 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12882 * linux-s390-low.c: Include <elf.h>.
12883 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12884 (init_registers_s390): Remove prototype.
12885 (init_registers_s390x): Likewise.
12886 (init_registers_s390_linux32): Add prototype.
12887 (init_registers_s390_linux64): Likewise.
12888 (init_registers_s390x_linux64): Likewise.
12889 (s390_num_regs_3264): New define.
12890 (s390_regmap_3264): New global variable.
12891 (s390_cannot_fetch_register): Remove obsolete check.
12892 (s390_cannot_store_register): Likewise.
12893 (s390_collect_ptrace_register): Handle upper/lower register halves.
12894 (s390_supply_ptrace_register): Likewise.
12895 (s390_fill_gregset): Update to register number changes.
12896 (s390_get_hwcap): New routine.
12897 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12898 Install appropriate regmap and register set.
12899
6e7ffa39
JB
129002010-01-01 Joel Brobecker <brobecker@adacore.com>
12901
12902 * server.c (gdbserver_version): Update copyright year to 2010.
12903 * gdbreplay.c (gdbreplay_version): Likewise.
12904
957f3f49
DE
129052009-12-28 Doug Evans <dje@google.com>
12906
12907 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12908 elf/external.h. Include <elf.h> instead but only if necessary.
12909
ca5c370d
PA
129102009-12-28 Pedro Alves <pedro@codesourcery.com>
12911
12912 * linux-low.c (linux_remove_process): Remove `detaching'
12913 parameter. Don't release/detach from thread_db here.
12914 (linux_kill): Release/detach from thread_db here, ...
12915 (linux_detach): ... and here, before actually detaching.
12916 (linux_wait_1): ... and here, when a process exits.
12917 * thread-db.c (any_thread_of): New.
12918 (thread_db_free): Switch the current inferior to a thread of the
12919 passed in process.
12920
4ee62156
DE
129212009-12-21 Doug Evans <dje@google.com>
12922
d90e6a88
DE
12923 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12924
c5f62d5f
DE
12925 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12926 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12927 warning ifndef __NR_tkill. Move setting of errno there too.
12928 Delete unnecessary resetting of errno after syscall.
12929 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12930
10e86dd7
DE
12931 * configure.ac: Check for dladdr.
12932 * config.in: Regenerate.
12933 * configure: Regenerate.
12934 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12935 (try_thread_db_load): Update.
12936
4ee62156
DE
12937 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12938
00f515da
DE
129392009-12-18 Doug Evans <dje@google.com>
12940
e9464885
DE
12941 * event-loop.c: Include unistd.h if it exists.
12942
07d4f67e
DE
12943 * linux-low.c (my_waitpid): Move definition away from being in
12944 between linux_tracefork_child/linux_test_for_tracefork.
12945
00f515da
DE
12946 * gdb_proc_service.h (psaddr_t): Fix type.
12947 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12948 signature to match glibc.
12949
1de1badb
DE
129502009-12-16 Doug Evans <dje@google.com>
12951
12952 * linux-low.c (linux_read_memory): Fix argument to read.
12953
aeeb81d1
PA
129542009-11-26 Pedro Alves <pedro@codesourcery.com>
12955
12956 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12957 events, don't leave current_inferior pointing at null.
12958
10357975
PA
129592009-11-26 Pedro Alves <pedro@codesourcery.com>
12960
12961 * win32-low.c (LOG): Delete.
12962 (OUTMSG): Output to stderr.
12963 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12964 on compile time LOG macro.
12965 (win32_wait): Fix debug output.
12966
cf6e3471
PA
129672009-11-26 Pedro Alves <pedro@codesourcery.com>
12968
12969 * win32-low.c (win32_add_one_solib): If the dll name is
12970 "ntdll.dll", prepend the system directory to the dll path.
12971
0c85e18e
MK
129722009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12973
12974 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12975
9ac544ce 129762009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12977 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12978
12979 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12980 * configure.ac: Check for __mcoldfire__ and set
12981 gdb_cv_m68k_is_coldfire.
12982 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12983 reg-cf.o and reg-m68k.o.
12984 * configure: Regenerated.
12985
fd7dd3e6
PA
129862009-11-16 Pedro Alves <pedro@codesourcery.com>
12987
12988 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12989 Pass it to thread_db_free.
12990 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12991 proper `detaching' argument to linux_remove_process.
12992 * linux-low.h (thread_db_free): Add `detaching' parameter.
12993 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12994 to thread_db_free.
12995 (thread_db_free): Add `detaching' parameter. Only
12996 call td_ta_clear_event if detaching from process.
12997
75aa492e
MK
129982009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12999
13000 * thread-db.c (thread_db_free): Fix typo.
13001
21e1bee4
PP
130022009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13003
13004 PR gdb/10838
13005 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13006
8838b45e
NS
130072009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13008
13009 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13010 with an i686 compiler.
13011 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13012 needed.
13013 * configure: Rebuilt.
13014
8a35fb51
SL
130152009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13016
13017 PR gdb/10783
13018
13019 * server.c (handle_search_memory_1): Correct read_addr initialization
13020 in loop for searching subsequent chunks.
13021
96f15937
PP
130222009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13023
13024 * configure.ac: New --with-libthread-db option.
13025 * thread-db.c: Allow direct dependence on libthread_db.
13026 (thread_db_free): Adjust.
13027 * config.in: Regenerate.
13028 * configure: Likewise.
889bf7c5 13029
5f7d1694
PP
130302009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13031
13032 PR gdb/10757
13033 * thread-db.c (attach_thread): New function.
13034 (maybe_attach_thread): Return success/failure.
13035 (find_new_threads_callback): Adjust.
889bf7c5
PA
13036 (thread_db_find_new_threads): Loop until no new threads.
13037
88e3b899
PA
130382009-10-13 Pedro Alves <pedro@codesourcery.com>
13039
13040 * proc-service.c (ps_lgetregs): Formatting.
13041
cdbfd419
PP
130422009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13043
13044 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13045 * configure.ac: Adjust.
13046 * linux-low.h (struct process_info_private): Move members to struct
13047 thread_db.
13048 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13049 * linux-low.c (linux_remove_process): Adjust.
13050 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13051 * server.c (handle_query): Move code ...
13052 (handle_monitor_command): ... here. New function.
13053 * target.h (struct target_ops): New member.
13054 * thread-db.c (struct thread_db): New.
13055 (libthread_db_search_path): New variable.
13056 (thread_db_create_event, thread_db_enable_reporting)
13057 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13058 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13059 (try_thread_db_load_1, dladdr_to_soname): New functions.
13060 (try_thread_db_load, thread_db_load_search): New functions.
13061 (thread_db_init): Search for libthread_db.
13062 (thread_db_free): New function.
13063 (thread_db_handle_monitor_command): Likewise.
13064 * config.in: Regenerate.
13065 * configure: Regenerate.
889bf7c5 13066
4168d2d6
UW
130672009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13068
13069 * spu-low.c (spu_kill): Wait for inferior to terminate.
13070 Call clear_inferiors.
13071 (spu_detach): Call clear_inferiors.
13072
81ecdfbb
RW
130732009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13074
13075 * aclocal.m4: Regenerate.
13076 * config.in: Likewise.
13077 * configure: Likewise.
13078
0b9ff2c0
UW
130792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13080
13081 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13082 (parse_spufs_run): New function.
13083 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13084 (ppc_breakpoint_at): Handle SPU breakpoints.
13085
efcbbd14
UW
130862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13087
13088 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13089 (SPUFS_MAGIC): Define.
13090 (spu_enumerate_spu_ids): New function.
13091 (linux_qxfer_spu): New function.
13092 (linux_target_ops): Install linux_qxfer_spu.
13093
f4d9bade
UW
130942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13095
13096 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13097 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13098 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13099 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13100 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13101 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13102 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13103 (init_registers_powerpc_cell32l): Add prototype.
13104 (init_registers_powerpc_cell64l): Likewise.
13105 (ppc_arch_setup): Detect Cell/B.E. architecture.
13106
96e946ca
RW
131072009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13108
13109 * Makefile.in (datarootdir): New variable.
13110
58d6951d
DJ
131112009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13112
13113 * linux-low.c (linux_write_memory): Update debugging output.
13114 * Makefile.in (clean): Add new descriptions.
13115 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13116 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13117 * configure.srv: Add new files for arm*-*-linux*.
13118 * linux-arm-low.c: Add new declarations.
13119 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13120 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13121 (HWCAP_VFPv3D16): New.
13122 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13123 instead of __IWMMXT__.
13124 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13125 (arm_arch_setup): New.
13126 (target_regsets): Remove #ifdef. Add VFP regset.
13127 (the_low_target): Use arm_arch_setup.
13128
12b42a12
DJ
131292009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13130
13131 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13132 the main thread again.
13133
ac8c974e
AR
131342009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13135
13136 Adding Neutrino gdbserver.
13137 * configure: Regenerated.
13138 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13139 * configure.srv (i[34567]86-*-nto*): New target.
13140 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13141 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13142 (nto_comctrl) [__QNX__]: New function.
13143 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13144
4424e0c3 131452009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13146
13147 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13148 srv_tgtobj.
13149
912cf4ba
PA
131502009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13151 Pedro Alves <pedro@codesourcery.com>
13152
13153 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13154 don't support CONTEXT_EXTENDED_REGISTERS.
13155 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13156 (the_low_target): Install them.
13157 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13158 failing with ERROR_PIPE_NOT_CONNECTED.
13159
aa5ca48f
DE
131602009-06-30 Doug Evans <dje@google.com>
13161 Pierre Muller <muller@ics.u-strasbg.fr>
13162
13163 Add h/w watchpoint support to x86-linux, win32-i386.
13164 * Makefile.in (SFILES): Add i386-low.c
13165 (i386_low_h): Define.
13166 (i386-low.o): Add dependencies.
13167 (linux-x86-low.o): Add i386-low.h dependency.
13168 (win32-i386-low.o): Ditto.
13169 * i386-low.c: New file.
13170 * i386-low.h: New file.
13171 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13172 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13173 * linux-low.c (linux_add_process): Initialize arch_private.
13174 (linux_remove_process): Free arch_private.
13175 (add_lwp): Initialize arch_private.
13176 (delete_lwp): Free arch_private.
13177 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13178 provided.
13179 * linux-low.h (process_info_private): New member arch_private.
13180 (lwp_info): New member arch_private.
13181 (linux_target_ops): New members new_process, new_thread,
13182 prepare_to_resume.
13183 (ptid_of): New macro.
13184 * linux-x86-low.c: Include stddef.h, i386-low.h.
13185 (arch_process_info): New struct.
13186 (arch_lwp_info): New struct.
13187 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13188 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13189 (i386_dr_low_get_status): New function.
13190 (x86_insert_point, x86_remove_point): New functions.
13191 (x86_stopped_by_watchpoint): New function.
13192 (x86_stopped_data_address): New function.
13193 (x86_linux_new_process, x86_linux_new_thread): New functions.
13194 (x86_linux_prepare_to_resume): New function.
13195 (the_low_target): Add entries for insert_point, remove_point,
13196 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13197 prepare_to_resume.
13198 * server.c (debug_hw_points): New global.
13199 (monitor_show_help): Document set debug-hw-points.
13200 (handle_query): Process "set debug-hw-points".
13201 * server.h (debug_hw_points): Declare.
13202 (paddress): Declare.
13203 * utils.c (NUMCELLS, CELLSIZE): New macros.
13204 (get_sell, xsnprintf, paddress): New functions.
13205 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13206 remove_point, stopped_by_watchpoint, stopped_data_address.
13207 * win32-i386-low.c: Include i386-low.h.
13208 (debug_reg_state): Replaces dr.
13209 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13210 (i386_dr_low_get_status): New function.
13211 (i386_insert_point, i386_remove_point): New functions.
13212 (i386_stopped_by_watchpoint): New function.
13213 (i386_stopped_data_address): New function.
13214 (i386_initial_stuff): Update.
13215 (get_thread_context,set_thread_context,i386_thread_added): Update.
13216 (the_low_target): Add entries for insert_point,
13217 remove_point, stopped_by_watchpoint, stopped_data_address.
13218 * win32-low.c (win32_insert_watchpoint): New function.
13219 (win32_remove_watchpoint): New function.
13220 (win32_stopped_by_watchpoint): New function.
13221 (win32_stopped_data_address): New function.
13222 (win32_target_ops): Add entries for insert_watchpoint,
13223 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13224 * win32-low.h (win32_target_ops): New members insert_point,
13225 remove_point, stopped_by_watchpoint, stopped_data_address.
13226
d993e290
PA
132272009-06-25 Pedro Alves <pedro@codesourcery.com>
13228
13229 * server.c (process_serial_event): Re-return unsupported, not
13230 error, if the type isn't recognized. Re-allow supporting only
13231 insert or remove packets. Also call require_running for
13232 breakpoints. Add missing break statement to default case. Tidy.
13233 * target.h (struct target_ops): Rename insert_watchpoint to
13234 insert_point, and remove_watchpoint to remove_point.
13235
13236 * linux-low.h (struct linux_target_ops): Likewise.
13237 * linux-low.c (linux_insert_watchpoint): Rename to ...
13238 (linux_insert_point): ... this. Adjust.
13239 (linux_remove_watchpoint): Rename to ...
13240 (linux_remove_point): ... this. Adjust.
13241 (linux_target_ops): Adjust.
13242 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13243 (cris_insert_point): ... this.
13244 (cris_remove_watchpoint): Rename to ...
13245 (cris_remove_point): ... this.
13246 (the_low_target): Adjust.
13247
0f54c268
PM
132482009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13249
13250 * server.c (handle_v_kill): Pass signal_pid to
13251 kill_inferior if multi_process is zero.
13252
c6314022
AR
132532009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13254
13255 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13256 * target.h (target_ops): Comment for *_watchpoint to make it clear
13257 the functions can get types '0' and '1'.
13258
4463ce24
AR
132592009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13260
13261 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13262 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13263 * regcache.c (get_regcache): Likewise.
13264 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13265 * win32-low.c (child_fetch_inferior_registers): Remove check for
13266 regno 0.
13267
cf8fd78b
PA
132682009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13269 Pedro Alves <pedro@codesourcery.com>
13270
13271 * target.h (struct target_ops) <supports_multi_process>: New
13272 callback.
13273 (target_supports_multi_process): New.
13274 * server.c (handle_query): Even if GDB reports support, only
13275 enable multi-process if the target also supports it. Report
13276 multi-process support only if the target backend supports it.
13277 * linux-low.c (linux_supports_multi_process): New function.
13278 (linux_target_ops): Install it as target_supports_multi_process
13279 callback.
13280
47c0c975
DE
132812009-05-24 Doug Evans <dje@google.com>
13282
e09875d4
DE
13283 Global renaming of find_thread_pid to find_thread_ptid.
13284 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13285 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13286 All callers updated.
13287
e27d73f6
DE
13288 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13289 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13290 directly.
13291
47c0c975
DE
13292 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13293 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13294 (linux_resume_one_lwp): Ditto.
13295
2acc282a
DE
132962009-05-23 Doug Evans <dje@google.com>
13297
13298 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13299 from struct inferior_list_entry * to struct lwp_info *.
13300 All callers updated.
13301
9f1036c1
DE
133022009-05-13 Doug Evans <dje@google.com>
13303
13304 * linux-x86-low.c: Don't include assert.h.
13305 (x86_siginfo_fixup): Use fatal, not assert.
13306 (x86_arch_setup): Fix comment.
13307
d0722149
DE
133082009-05-12 Doug Evans <dje@google.com>
13309
13310 Biarch support for i386/amd64 gdbserver.
13311 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13312 Add linux-x86-low.c.
13313 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13314 (linux-x86-low.o): Add.
13315 * linux-x86-64-low.c: Delete.
13316 * linux-i386-low.c: Delete.
13317 * linux-x86-low.c: New file.
13318 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13319 linux-x86-low.o.
13320 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13321 linux-x86-low.o.
13322 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13323 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13324 (linux_child_pid_to_exec_file): New function.
13325 (elf_64_header_p, elf_64_file_p): New functions.
13326 (siginfo_fixup): New function.
13327 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13328 give target a chance to convert layout.
13329 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13330 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13331
fdeb2a12
DE
133322009-05-07 Doug Evans <dje@google.com>
13333
13334 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13335 (regsets_store_inferior_registers): Ditto.
13336
a6dbe5df
PA
133372009-05-06 Pedro Alves <pedro@codesourcery.com>
13338
13339 PR server/10048
13340
13341 * linux-low.c (must_set_ptrace_flags): Delete.
13342 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13343 of the global.
13344 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13345 `lwp->must_set_ptrace_flags' instead.
ba42693b 13346 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13347 (linux_wait_1): ... not here.
13348
5091eb23
DE
133492009-04-30 Doug Evans <dje@google.com>
13350
9f767825
DE
13351 * inferiors.c (started_inferior_callback): New function.
13352 (attached_inferior_callback): New function.
13353 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13354 * server.c (print_started_pid, print_attached_pid): New functions.
13355 (detach_or_kill_for_exit): New function.
13356 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13357 * server.h (have_started_inferiors_p): Declare.
13358 (have_attached_inferiors_p): Declare.
13359
5091eb23
DE
13360 * inferiors.c (remove_process): Fix memory leak, free process.
13361 * linux-low.c (linux_remove_process): New function.
13362 (linux_kill): Call it instead of remove_process.
13363 (linux_detach, linux_wait_1): Ditto.
13364
155c8968
PA
133652009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13366
13367 * configure.srv: Add x86 Windows CE target.
13368
7fe519cb
UW
133692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13370
13371 * inferiors.c (get_thread_process): Make global.
13372 * server.h (get_thread_process): Add prototype.
13373 * thread-db.c (find_one_thread): Use get_thread_process
13374 instead of current_process.
13375 (thread_db_get_tls_address): Do not crash if called when
13376 thread layer is not yet initialized.
13377
5472f405
UW
133782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13379
13380 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13381 * spu-low.c (current_tid): Rename to ...
13382 (current_ptid): ... this.
13383 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13384 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13385 ptid_get_lwp (current_ptid) instead of current_tid.
13386 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13387 instead of current_tid. Use find_process_pid to verify pid
13388 argument is valid. Pass proper argument to remove_process.
13389 (spu_thread_alive): Compare current_ptid instead of current_tid.
13390 (spu_resume): Likewise.
13391
55ac2b99
PA
133922009-04-02 Pedro Alves <pedro@codesourcery.com>
13393
13394 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13395 variable.
13396
95954743
PA
133972009-04-01 Pedro Alves <pedro@codesourcery.com>
13398
13399 Implement the multiprocess extensions, and add linux multiprocess
13400 support.
13401
13402 * server.h (ULONGEST): Declare.
13403 (struct ptid, ptid_t): New.
13404 (minus_one_ptid, null_ptid): Declare.
13405 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13406 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13407 (struct inferior_list_entry): Change `id' type from unsigned from
13408 to ptid_t.
13409 (struct sym_cache, struct breakpoint, struct
13410 process_info_private): Forward declare.
13411 (struct process_info): Declare.
13412 (current_process): Declare.
13413 (all_processes): Declare.
13414 (initialize_inferiors): Declare.
13415 (add_thread): Adjust to use ptid_t.
13416 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13417 (add_process, remove_process, find_thread_pid): Declare.
13418 (find_inferior_id): Adjust to use ptid_t.
13419 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13420 (multi_process): Declare.
13421 (push_event): Adjust to use ptid_t.
13422 (read_ptid, write_ptid): Declare.
13423 (prepare_resume_reply): Adjust to use ptid_t.
13424 (clear_symbol_cache): Declare.
13425 * inferiors.c (all_processes): New.
13426 (null_ptid, minus_one_ptid): New.
13427 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13428 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13429 (add_thread): Change unsigned long to ptid. Remove gdb_id
13430 parameter. Adjust.
13431 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13432 (gdb_id_to_thread): Rename to ...
13433 (find_thread_pid): ... this. Change unsigned long to ptid.
13434 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13435 (loaded_dll, pull_pid_from_list): Adjust.
13436 (add_process, remove_process, find_process_pid)
13437 (get_thread_process, current_process, initialize_inferiors): New.
13438 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13439 (struct target_waitstatus) <related_pid>: Ditto.
13440 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13441 return type to int.
13442 (struct target_ops) <join>: Add `pid' argument.
13443 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13444 (struct target_ops) <wait>: Add `ptid' field. Change return type
13445 to ptid.
13446 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13447 (mywait): Add `ptid' argument. Change return type to ptid_t.
13448 (target_pid_to_str): Declare.
13449 * target.c (set_desired_inferior): Adjust to use ptids.
13450 (mywait): Add new `ptid' argument. Adjust.
13451 (target_pid_to_str): New.
13452 * mem-break.h (free_all_breakpoints): Declare.
13453 * mem-break.c (breakpoints): Delelete.
13454 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13455 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13456 to use per-process breakpoint list.
13457 (free_all_breakpoints): New.
13458 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13459 (symbol_cache, all_symbols_looked_up): Delete.
13460 (hexchars): New.
13461 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13462 read_ptid): New.
13463 (prepare_resume_reply): Change ptid argument's type from unsigned
13464 long to ptid_t. Adjust. Implement W;process and X;process.
13465 (free_sym_cache, clear_symbol_cache): New.
13466 (look_up_one_symbol): Adjust to per-process symbol cache. *
13467 * server.c (cont_thread, general_thread, step_thread): Change type
13468 to ptid_t.
13469 (attached): Delete.
13470 (multi_process): New.
13471 (last_ptid): Change type to ptid_t.
13472 (struct vstop_notif) <ptid>: Change type to ptid_t.
13473 (queue_stop_reply, push_event): Change `ptid' argument's type to
13474 ptid_t.
13475 (discard_queued_stop_replies): Add `pid' argument.
13476 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13477 changes. Don't reference the `attached' global.
13478 (attach_inferior): Adjust to mywait interface changes.
13479 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13480 features. Handle and report "multiprocess+". Handle
13481 "qAttached:PID".
13482 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13483 changes.
13484 (handle_v_kill): New.
13485 (handle_v_stopped): Adjust to use target_pid_to_str.
13486 (handle_v_requests): Allow multiple attaches and runs when
13487 multiprocess extensions are in effect. Handle "vKill".
13488 (myresume): Adjust to use ptids.
13489 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13490 (handle_status): Adjust to discard_queued_stop_replies interface
13491 change.
13492 (first_thread_of, kill_inferior_callback)
13493 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13494 (main): Call initialize_inferiors. Adjust to use ptids, killing
13495 and detaching from all inferiors. Handle multiprocess packet
13496 variants.
13497 * linux-low.h: Include gdb_proc_service.h.
13498 (struct process_info_private): New.
13499 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13500 <lwpid_of>: Use ptid_get_lwp.
13501 (get_lwp_thread): Adjust.
13502 (struct lwp_info): Add `dead' member.
13503 (find_lwp_pid): Declare.
13504 * linux-low.c (thread_db_active): Delete.
13505 (new_inferior): Adjust comment.
13506 (inferior_pid): Delete.
13507 (linux_add_process): New.
13508 (handle_extended_wait): Adjust.
13509 (add_lwp): Change unsigned long to ptid.
13510 (linux_create_inferior): Add process to processes table. Adjust
13511 to use ptids. Don't set new_inferior here.
13512 (linux_attach_lwp): Rename to ...
13513 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13514 it. Adjust to use ptids.
13515 (linux_attach_lwp): New.
13516 (linux_attach): Add process to processes table. Don't set
13517 new_inferior here.
13518 (struct counter): New.
13519 (second_thread_of_pid_p, last_thread_of_process_p): New.
13520 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13521 multiple processes.
13522 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13523 processes. Remove process from process table.
13524 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13525 to multiple processes.
13526 (any_thread_of): New.
13527 (linux_detach): Add `pid' argument, and handle it. Remove process
13528 from processes table.
13529 (linux_join): Add `pid' argument. Handle it.
13530 (linux_thread_alive): Change unsighed long argument to ptid_t.
13531 Consider dead lwps as not being alive.
13532 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13533 threads we're not interested in.
13534 (same_lwp, find_lwp_pid): New.
13535 (linux_wait_for_lwp): Change `pid' argument's type from int to
13536 ptid_t. Adjust.
13537 (linux_wait_for_event): Rename to ...
13538 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13539 from int to ptid_t. Adjust.
13540 (linux_wait_for_event): New.
13541 (linux_wait_1): Add `ptid' argument. Change return type to
13542 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13543 that exit from the process table.
13544 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13545 Adjust.
13546 (mark_lwp_dead): New.
13547 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13548 stopping all threads, mark its main lwp as dead.
13549 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13550 ptids.
13551 (fetch_register, usr_store_inferior_registers)
13552 (regsets_fetch_inferior_registers)
13553 (regsets_store_inferior_registers, linux_read_memory)
13554 (linux_write_memory): Inline `inferior_pid'.
13555 (linux_look_up_symbols): Adjust to use per-process
13556 `thread_db_active'.
13557 (linux_request_interrupt): Adjust to use ptids.
13558 (linux_read_auxv): Inline `inferior_pid'.
13559 (initialize_low): Don't reference thread_db_active.
13560 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13561 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13562 (ps_getpid): Return the pid of the current inferior.
13563 * thread-db.c (proc_handle, thread_agent): Delete.
13564 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13565 per-process data.
13566 (find_one_thread): Change argument type to ptid_t. Adjust to
13567 per-process data.
13568 (maybe_attach_thread): Adjust to per-process data and ptids.
13569 (thread_db_find_new_threads): Ditto.
13570 (thread_db_init): Ditto.
13571 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13572 processes table. Adjust to use ptids.
13573 (spu_kill, spu_detach): Adjust interface. Remove process from
13574 processes table.
13575 (spu_join, spu_thread_alive): Adjust interface.
13576 (spu_wait): Adjust interface. Remove process from processes
13577 table. Adjust to use ptids.
13578 * win32-low.c (current_inferior_tid): Delete.
13579 (current_inferior_ptid): New.
13580 (debug_event_ptid): New.
13581 (thread_rec): Take a ptid. Adjust.
13582 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13583 (child_delete_thread): Ditto.
13584 (do_initial_child_stuff): Add `attached' argument. Add process to
13585 processes table.
13586 (child_fetch_inferior_registers, child_store_inferior_registers):
13587 Adjust.
13588 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13589 (win32_attach): Pass 1 to do_initial_child_stuff.
13590 (win32_kill): Adjust interface. Remove process from processes
13591 table.
13592 (win32_detach): Ditto.
13593 (win32_join): Adjust interface.
13594 (win32_thread_alive): Take a ptid.
13595 (win32_resume): Adjust to use ptids.
13596 (get_child_debug_event): Ditto.
13597 (win32_wait): Adjust interface. Remove exiting process from
13598 processes table.
13599
bd99dc85
PA
136002009-04-01 Pedro Alves <pedro@codesourcery.com>
13601
13602 Non-stop mode support.
13603
13604 * server.h (non_stop): Declare.
13605 (gdb_client_data, handler_func): Declare.
13606 (delete_file_handler, add_file_handler, start_event_loop):
13607 Declare.
13608 (handle_serial_event, handle_target_event, push_event)
13609 (putpkt_notif): Declare.
13610 * target.h (enum resume_kind): New.
13611 (struct thread_resume): Replace `step' field by `kind' field.
13612 (TARGET_WNOHANG): Define.
13613 (struct target_ops) <wait>: Add `options' argument.
13614 <supports_non_stop, async, start_non_stop>: New fields.
13615 (target_supports_non_stop, target_async): New.
13616 (start_non_stop): Declare.
13617 (mywait): Add `options' argument.
13618 * target.c (mywait): Add `options' argument. Print child exit
13619 notifications here.
13620 (start_non_stop): New.
13621 * server.c (non_stop, own_buf, mem_buf): New globals.
13622 (struct vstop_notif): New.
13623 (notif_queue): New global.
13624 (queue_stop_reply, push_event, discard_queued_stop_replies)
13625 (send_next_stop_reply): New.
13626 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13627 interface changes.
13628 (attach_inferior): In non-stop mode, don't wait for the target
13629 here.
13630 (handle_general_set): Handle QNonStop.
13631 (handle_query): When handling qC, return the current general
13632 thread, instead of the first thread of the list.
13633 (handle_query): If the backend supports non-stop mode, include
13634 QNonStop+ in the qSupported query response.
13635 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13636 and non-stop mode.
13637 (handle_v_attach, handle_v_run): Handle non-stop mode.
13638 (handle_v_stopped): New.
13639 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13640 (myresume): Adjust to use resume_kind. Handle non-stop.
13641 (queue_stop_reply_callback): New.
13642 (handle_status): Handle non-stop mode.
13643 (main): Clear non_stop flag on reconnection. Use the event-loop.
13644 Refactor serial protocol handling from here ...
13645 (process_serial_event): ... to this new function. When GDB
13646 selects any thread, select one here. In non-stop mode, wait until
13647 GDB acks all pending events before exiting.
13648 (handle_serial_event, handle_target_event): New.
13649 * remote-utils.c (remote_open): Install remote_desc in the event
13650 loop.
13651 (remote_close): Remove remote_desc from the event loop.
13652 (putpkt_binary): Rename to...
13653 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13654 (putpkt_binary): New as wrapper around putpkt_binary_1.
13655 (putpkt_notif): New.
13656 (prepare_resume_reply): In non-stop mode, don't change the
13657 general_thread.
13658 * event-loop.c: New.
13659 * Makefile.in (OBJ): Add event-loop.o.
13660 (event-loop.o): New rule.
13661
13662 * linux-low.h (pid_of): Moved here.
13663 (lwpid_of): New.
13664 (get_lwp_thread): Use lwpid_of.
13665 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13666 * linux-low.c (pid_of): Delete.
13667 (inferior_pid): Use lwpid_of.
13668 (linux_event_pipe): New.
13669 (target_is_async_p): New.
13670 (delete_lwp): New.
13671 (handle_extended_wait): Use lwpid_of.
13672 (add_lwp): Don't set lwpid field.
13673 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13674 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13675 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13676 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13677 first. Adjust to linux_wait_for_event interface changes. Use
13678 lwpid_of.
13679 (linux_detach): Don't delete the main lwp here.
13680 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13681 (status_pending_p): Don't consider explicitly suspended lwps.
13682 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13683 pointer. Add OPTIONS argument. Change return type to int. Use
13684 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13685 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13686 pointer. Add status pointer argument. Return a pid instead of a
13687 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13688 changes. In non-stop mode, don't switch to a random thread.
13689 (linux_wait): Rename to...
13690 (linux_wait_1): ... this. Add target_options argument, and handle
13691 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13692 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13693 clean exit and signal exit code. Don't stop all threads in
13694 non-stop mode. In all-stop mode, only stop all threads when
13695 reporting a stop to GDB. Handle explicit thread stop requests.
13696 (async_file_flush, async_file_mark): New.
13697 (linux_wait): New.
13698 (send_sigstop): Use lwpid_of.
13699 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13700 interface changes. In non-stop mode, don't switch to a random
13701 thread.
13702 (linux_resume_one_lwp): Use lwpid_of.
13703 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13704 (linux_resume_one_thread): ... this. Handle resume_stop. In
13705 non-stop mode, don't look for pending flag in all threads.
13706 (resume_status_pending_p): Don't consider explicitly suspended
13707 threads.
13708 (my_waitpid): Reimplement. Emulate __WALL.
13709 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13710 Use lwpid_of.
13711 (sigchld_handler, linux_supports_non_stop, linux_async)
13712 (linux_start_non_stop): New.
13713 (linux_target_ops): Register linux_supports_non_stop, linux_async
13714 and linux_start_non_stop.
13715 (initialize_low): Install SIGCHLD handler.
13716 * thread-db.c (thread_db_create_event, find_one_thread)
13717 (thread_db_get_tls_address): Use lwpid_of.
13718 * win32-low.c (win32_detach): Adjust to use resume_kind.
13719 (win32_wait): Add `options' argument.
13720 * spu-low.c (spu_resume): Adjust to use resume_kind.
13721 (spu_wait): Add `options' argument.
13722
5b1c542e
PA
137232009-04-01 Pedro Alves <pedro@codesourcery.com>
13724
13725 Decouple target code from remote protocol.
13726
13727 * target.h (enum target_waitkind): New.
13728 (struct target_waitstatus): New.
13729 (struct target_ops) <wait>: Return an unsigned long. Take a
13730 target_waitstatus pointer instead of a char pointer.
13731 (mywait): Likewise.
13732 * target.c (mywait): Change prototype to return an unsigned long.
13733 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13734 * server.h (thread_from_wait, old_thread_from_wait): Delete
13735 declarations.
13736 (prepare_resume_reply): Change prototype to take a
13737 target_waitstatus.
13738 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13739 (last_status, last_ptid): New.
13740 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13741 pid instead of a signal.
13742 (attach_inferior): Remove "status" and "signal" parameters.
13743 Adjust.
13744 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13745 not as an address.
13746 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13747 (handle_v_requests, myresume): Remove "status" and "signal"
13748 parameters. Adjust.
13749 (handle_status): New.
13750 (main): Delete local `status'. Adjust.
13751 * remote-utils.c: Include target.h.
13752 (prepare_resume_reply): Change prototype to take a
13753 target_waitstatus. Adjust.
13754
13755 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13756 interface.
13757 * spu-low.c (spu_wait): Adjust.
13758 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13759 Delete.
13760 (win32_wait): Adjust.
13761
2bd7c093
PA
137622009-04-01 Pedro Alves <pedro@codesourcery.com>
13763
13764 * target.h (struct thread_resume): Delete leave_stopped member.
13765 (struct target_ops): Add a `n' argument to the `resume' callback.
13766 * server.c (start_inferior): Adjust.
13767 (handle_v_cont, myresume): Adjust.
13768 * linux-low.c (check_removed_breakpoint): Adjust to resume
13769 interface change, and to removed leave_stopped field.
13770 (resume_ptr): Delete.
13771 (struct thread_resume_array): New.
13772 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13773 resume interface change.
13774 (linux_continue_one_thread, linux_queue_one_thread)
13775 (resume_status_pending_p): Check if the resume field is NULL
13776 instead of checking the leave_stopped member.
13777 (linux_resume): Adjust to the target resume interface change.
13778 * spu-low.c (spu_resume): Adjust to the target resume interface
13779 change.
13780 * win32-low.c (win32_detach, win32_resume): Ditto.
13781
c35fafde
PA
137822009-04-01 Pedro Alves <pedro@codesourcery.com>
13783
13784 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13785 flag.
13786 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13787 pending.
13788 (linux_continue_one_thread): Only preserve the stepping flag if
13789 there's a pending breakpoint.
13790
0a59d50b
PA
137912009-03-31 Pedro Alves <pedro@codesourcery.com>
13792
13793 * server.c (main): After the inferior having exited, call
13794 remote_close before exiting gdbserver.
13795
f04c6d38
TJB
137962009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13797
13798 Fix size of FPSCR in Power 7 processors.
13799 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13800 (PPC_FEATURE_HAS_DFP): New #define.
13801 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13802 size of the FPSCR.
13803
78e5cee6
PA
138042009-03-23 Pedro Alves <pedro@codesourcery.com>
13805
13806 * server.c (handle_query) Whitespace and formatting.
13807
1b3f6016
PA
138082009-03-22 Pedro Alves <pedro@codesourcery.com>
13809
13810 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13811 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13812 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13813 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13814 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13815 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13816 Makefile.in, configure.ac: Fix whitespace throughout.
13817 * configure: Regenerate.
13818
a07b2135
PA
138192009-03-22 Pedro Alves <pedro@codesourcery.com>
13820
13821 * inferiors.c (find_inferior): Make it safe for the callback
13822 function to delete the currently iterated inferior.
13823
67cc2626
PA
138242009-03-22 Pedro Alves <pedro@codesourcery.com>
13825
13826 * Makefile.in (linuw_low_h): Move higher.
13827 (thread-db.o): Depend on $(linux_low_h).
13828
54a0b537
PA
138292009-03-17 Pedro Alves <pedro@codesourcery.com>
13830
13831 Rename "process" to "lwp" throughout.
13832
13833 * linux-low.c (all_processes): Rename to...
13834 (all_lwps): ... this.
13835 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13836 (add_process): Rename to ...
13837 (add_lwp): ... this. Adjust.
13838 (linux_create_inferior): Adjust.
13839 (linux_attach_lwp): Adjust.
13840 (linux_attach): Adjust.
13841 (linux_kill_one_process): Rename to ...
13842 (linux_kill_one_lwp): ... this. Adjust.
13843 (linux_kill): Adjust.
13844 (linux_detach_one_process): Rename to ...
13845 (linux_detach_one_lwp): ... this. Adjust.
13846 (linux_detach): Adjust.
13847 (check_removed_breakpoint): Adjust.
13848 (status_pending_p): Adjust.
13849 (linux_wait_for_process): Rename to ...
13850 (linux_wait_for_lwp): ... this. Adjust.
13851 (linux_wait_for_event): Adjust.
13852 (send_sigstop): Adjust.
13853 (wait_for_sigstop): Adjust.
13854 (stop_all_processes): Rename to ...
13855 (stop_all_lwps): ... this.
13856 (linux_resume_one_process): Rename to ...
13857 (linux_resume_one_lwp): ... this. Adjust.
13858 (linux_set_resume_request, linux_continue_one_thread)
13859 (linux_queue_one_thread, resume_status_pending_p)
13860 (usr_store_inferior_registers, regsets_store_inferior_registers)
13861 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13862 Adjust.
13863 * linux-low.h (get_process): Rename to ...
13864 (get_lwp): ... this. Adjust.
13865 (get_thread_process): Rename to ...
13866 (get_thread_lwp): ... this. Adjust.
13867 (get_process_thread): Rename to ...
13868 (get_lwp_thread): ... this. Adjust.
13869 (struct process_info): Rename to ...
13870 (struct lwp_info): ... this.
13871 (all_processes): Rename to ...
13872 (all_lwps): ... this.
13873 * proc-service.c (ps_lgetregs): Adjust.
13874 * thread-db.c (thread_db_create_event, find_one_thread)
13875 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13876
0b16c5cf
PA
138772009-03-14 Pedro Alves <pedro@codesourcery.com>
13878
13879 * server.c (handle_query): Handle "qAttached".
13880
32de4b9d
NS
138812009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13882
13883 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13884 GPLv3, update license URL.
13885
2aecd87f
DE
138862009-03-01 Doug Evans <dje@google.com>
13887
93efd302 13888 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13889 (server_h): Add gdb_signals.h.
13890 (signals.o): Update.
13891 * server.h (target_signal_from_host,target_signal_to_host_p)
13892 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13893
86b1f9c5
PM
138942009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13895
13896 * remote-utils.c (getpkt): Also generate remote-debug
13897 information if noack_mode is set.
13898
4aa995e1
PA
138992009-02-06 Pedro Alves <pedro@codesourcery.com>
13900
13901 * server.c (handle_query): Report qXfer:siginfo:read and
13902 qXfer:siginfo:write as supported and handle them.
13903 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13904 * linux-low.c (linux_xfer_siginfo): New.
13905 (linux_target_ops): Set it.
13906
62709adf
PA
139072009-01-26 Pedro Alves <pedro@codesourcery.com>
13908
13909 * server.c (gdbserver_usage): Mention --remote-debug.
13910 (main): Accept '--remote-debug' switch.
13911
aef93bd7
DE
139122009-01-18 Doug Evans <dje@google.com>
13913
13914 * regcache.c (new_register_cache): No need to check result of xcalloc.
13915 * server.c (handle_search_memory): Back out calls to xmalloc,
13916 result is checked and error is returned to user upon failure.
13917 (handle_query): Ditto. Add more checks for result of malloc.
13918 (handle_v_cont): Check result of malloc, report error back to
13919 user upon failure.
13920 (handle_v_run): Ditto. Call freeargv.
13921 * server.h (freeargv): Declare.
13922 * utils.c (freeargv): New fn.
13923
54363045
DE
139242009-01-15 Doug Evans <dje@google.com>
13925
f626972c
DE
13926 * gdbreplay.c (perror_with_name): Make arg const char *.
13927 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13928 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13929 * utils.c (perror_with_name): Make arg const char *.
54363045 13930
18aae699
PA
139312009-01-14 Pedro Alves <pedro@codesourcery.com>
13932
13933 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13934 when handling a EXIT_PROCESS_DEBUG_EVENT.
13935
ff703abe
JB
139362009-01-06 Joel Brobecker <brobecker@adacore.com>
13937
13938 * gdbreplay.c (gdbreplay_version): Update copyright year.
13939 * server.c (gdbserver_version): Likewise.
13940
f21cc1a2 139412009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13942
13943 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13944 (handle_extended_wait): Improve comment.
0e21c1ec 13945
bca929d3
DE
139462008-12-13 Doug Evans <dje@google.com>
13947
13948 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13949 * server.h (ATTR_MALLOC): New macro.
13950 (xmalloc,xcalloc,xstrdup): Declare.
13951 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13952 * inferiors.c: Ditto.
13953 * linux-low.c: Ditto.
13954 * mem-break.c: Ditto.
13955 * regcache.c: Ditto.
13956 * remote-utils.c: Ditto.
13957 * server.c: Ditto.
13958 * target.c: Ditto.
13959 * win32-low.c: Ditto.
13960
97438e3f
DE
139612008-12-12 Doug Evans <dje@google.com>
13962
896c7fbb
DE
13963 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13964 in debugging printf.
13965
97438e3f
DE
13966 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13967
e3b886f8
DE
139682008-12-09 Doug Evans <dje@google.com>
13969
13970 * linux-low.h (struct process_info): Delete member tid, unused.
13971 * thread-db.c (find_one_thread): Update.
13972 (maybe_attach_thread): Update.
13973
07e059b5
VP
139742008-12-02 Pedro Alves <pedro@codesourcery.com>
13975
889bf7c5
PA
13976 * target.h (struct target_ops): Add qxfer_osdata member.
13977 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13978 and dirent.h.
13979 (linux_qxfer_osdata): New functions.
13980 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13981 callback.
13982 * server.c (handle_query): Handle "qXfer:osdata:read:".
13983 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13984 (buffer_xml_printf): New functions.
13985 * server.h (struct buffer): New.
13986 (buffer_grow_str, buffer_grow_str0): New macros.
13987 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13988 (buffer_xml_printf): Declare.
07e059b5 13989
4cab47ab
DE
139902008-11-24 Doug Evans <dje@google.com>
13991
13992 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13993
f142445f
DJ
139942008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13995
13996 * server.c (handle_v_run): Always use the supplied argument list.
13997
d0107bb6 139982008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13999
d0107bb6
BW
14000 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14001 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14002
2c4ad781
TJB
140032008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14004
14005 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14006 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14007 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14008 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14009 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14010 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14011 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14012 XML target descriptions.
14013 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14014 when inferior is running on an ISA 2.05 or later processor. Add
14015 special case to return offset for full 64-bit slot of FPSCR when
14016 in 32-bits.
14017
dfb64f85
DJ
140182008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14019
14020 * Makefile.in (SFILES, clean): Added sparc64 files.
14021 (reg-sparc64.o, reg-sparc64.c): New.
14022 * configure.srv (sparc*-*-linux*): New configuration.
14023 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14024 syscall arguments for SPARC.
14025 (regsets_store_inferior_registers): Likewise.
14026 * linux-sparc-low.c: New file.
14027
66b6e1dd
DE
140282008-10-21 Doug Evans <dje@google.com>
14029
14030 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14031 (READLINE_DIR,READLINE_DEP): Delete.
14032 (INTERNAL_CFLAGS): Update.
14033 (LINTFLAGS): Update.
14034
9b710a42
PA
140352008-10-10 Pedro Alves <pedro@codesourcery.com>
14036
14037 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14038 whole argv from the last run, not just argv[0].
14039
5822d809
PA
140402008-09-08 Pedro Alves <pedro@codesourcery.com>
14041
14042 * regcache.c (new_register_cache): Return NULL if the register
14043 cache size isn't known yet.
14044 (free_register_cache): Avoid dereferencing a NULL regcache.
14045
74aac56f
DJ
140462008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14047
14048 * configure.srv: Merge MIPS and MIPS64.
14049
400b20f5
MR
140502008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14051
14052 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14053
677c5bb1
LM
140542008-08-18 Luis Machado <luisgpm@br.ibm.com>
14055
14056 * Makefile.in: Add required vsx dependencies.
14057
14058 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14059 Declare init_registers_powerpc_vsx32l.
14060 Declare init_registers_powerpc_vsx64l.
14061 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14062 (ppc_arch_setup): Check for VSX in hwcap.
14063 (ppc_fill_vsxregset): New function.
14064 (ppc_store_vsxregset): New function.
14065 Add new VSX entry in regset_info target_regsets.
14066
14067 * configure.srv: Add new VSX dependencies.
14068
a6f3e723
SL
140692008-08-12 Pedro Alves <pedro@codesourcery.com>
14070
14071 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14072 (remote_open): Set or clear transport_is_reliable.
14073 (putpkt_binary): Don't expect acks in noack mode.
14074 (getpkt): Don't send ack/nac in noack mode.
14075 * server.c (handle_general_set): Handle QStartNoAckMode.
14076 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14077 qSupported.
14078 (main): Reset noack_mode on every connection.
14079 * server.h (noack_mode): Declare.
14080
a417dc56
RW
140812008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14082
14083 * Makefile.in (GDBREPLAY_OBS): New variable.
14084 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14085
3221518c
UW
140862008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14087 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14090 (usr_store_inferior_registers): Likewise.
14091 (regsets_store_inferior_registers): Likewise.
14092
ec56be1b
PA
140932008-07-31 Rolf Jansen <rj@surtec.com>
14094 Pedro Alves <pedro@codesourcery.com>
14095
14096 * configure.ac: Check for memmem declaration.
14097 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14098 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14099 (disable_packet_qfThreadInfo): Unconditionally compile.
14100 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14101 * configure, config.in: Regenerate.
14102
2fe5e3ff
DE
141032008-07-28 Doug Kwan <dougkwan@google.com>
14104
14105 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14106 (linux_write_memory): Remove declaration of errno.
14107
836acd6d
UW
141082008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14109
14110 * linux-low.c (handle_extended_wait): Do not use "status"
14111 variable uninitialized.
14112
aeba519e
PA
141132008-07-07 Pedro Alves <pedro@codesourcery.com>
14114
14115 * server.c (handle_v_attach): Inhibit reporting dll changes.
14116
db42f210
PA
141172008-06-27 Pedro Alves <pedro@codesourcery.com>
14118
14119 * remote-utils.c (prepare_resume_reply): If requested, don't
14120 output "thread:TID" in the T stop reply.
14121
14122 * server.c (disable_packet_vCont, disable_packet_Tthread)
14123 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14124 (handle_query): If requested, disable support for qC, qfThreadInfo
14125 and qsThreadInfo.
14126 (handle_v_requests): If requested, disable support for vCont.
14127 (gdbserver_show_disableable): New.
14128 (main): Handle --disable-packet and --disable-packet=LIST.
14129
14130 * server.h (disable_packet_vCont, disable_packet_Tthread)
14131 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14132
8e4c5421
CD
141332008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14134
14135 * server.c (gdbserver_usage): Mention --version.
14136
6e23a804
DJ
141372008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * Makefile.in (gdbreplay.o): New rule.
14140
90aa6a40
JM
141412008-06-06 Joseph Myers <joseph@codesourcery.com>
14142
14143 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14144 message, not gdbserver.
14145
c16158bc 141462008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14147 Nathan Sidwell <nathan@codesourcery.com>
14148 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14149
14150 * acinclude.m4: Include ../../config/acx.m4.
14151 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14152 * configure, config.in: Regenerate.
14153 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14154 * server.c (gdbserver_version): Print PKGVERSION.
14155 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14156 (main): Adjust gdbserver_usage calls.
14157 * gdbreplay.c (version, host_name): Add declarations.
14158 (gdbreplay_version, gdbreplay_usage): New.
14159 (main): Accept --version and --help options.
14160
aeb75bf5
DJ
141612008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14164 (arm_breakpoint_at): Handle Thumb.
14165 (the_low_target): Add comment.
14166
76b233dd
UW
141672008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14168
14169 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14170
08388c79
DE
141712008-05-09 Doug Evans <dje@google.com>
14172
a3c83fae
DE
14173 * server.h (decode_search_memory_packet): Declare.
14174 * remote-utils.c (decode_search_memory_packet): New fn.
14175 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14176 (handle_search_memory): New fn.
14177 (handle_query): Process qSearch:memory packets.
14178
bb9c3d36
UW
141792008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14180
14181 * regcache.c (registers_length): Remove.
14182 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14183 full register packet.
14184 * regcache.h (registers_length): Remove prototype.
14185 * server.h (PBUFSIZ): Define to 16384.
14186
7284e1be
UW
141872008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14188
14189 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14190 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14191 powerpc-64l.o, and powerpc-altivec64l.o.
14192 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14193 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14194 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14195 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14196 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14197 to srv_xmlfiles.
14198
14199 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14200 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14201 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14202 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14203 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14204 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14205 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14206 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14207 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14208 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14209 (clean): Update.
14210
14211 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14212 (init_registers_powerpc_32l): ... this new prototype.
14213 (init_registers_powerpc_32): Remove, replace by ...
14214 (init_registers_powerpc_altivec32l): ... this new prototype.
14215 (init_registers_powerpc_e500): Remove, replace by ...
14216 (init_registers_powerpc_e500l): ... this new prototype.
14217 (init_registers_ppc64): Remove, replace by ...
14218 (init_registers_powerpc_64l): ... this new prototype.
14219 (init_registers_powerpc_64): Remove, replace by ...
14220 (init_registers_powerpc_altivec64l): ... this new prototype.
14221 (ppc_num_regs): Set to 73.
14222 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14223 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14224 (ppc_cannot_store_register): Handle orig_r3 and trap.
14225 (ppc_arch_setup): Update init_registers_... calls.
14226 (ppc_fill_gregset): Handle orig_r3 and trap.
14227
14228 * inferiors.c (clear_inferiors): Reset current_inferior.
14229
fdc59709
PB
142302008-04-23 Paolo Bonzini <bonzini@gnu.org>
14231
889bf7c5
PA
14232 * acinclude.m4: Add override.m4.
14233 * configure: Regenerate.
fdc59709 14234
c9b2f845
UW
142352008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14236
14237 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14238 initial call to init_register_ppc64.
14239
550512b8
UW
142402008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14241
43aaf8b6
PA
14242 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14243 single powerpc*-*-linux* case.
550512b8
UW
14244 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14245
b6430ec3
UW
142462008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14247
14248 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14249 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14250 from reg_xmlfiles.
14251 * linux-ppc-low.c: Include <elf.h>.
14252 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14253 (ppc_hwcap): New global variable.
14254 (ppc_regmap): Remove __SPE__ #ifdef sections.
14255 (ppc_regmap_e500): New global variable.
14256 (ppc_cannot_store_register): Update __SPE__ special case.
14257 (ppc_get_hwcap): New function.
14258 (ppc_arch_setup): Use it to determine whether inferior supports
14259 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14260 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14261 Do not access registers if target does not support AltiVec.
14262 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14263 Do not access registers if target does not support SPE.
14264 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14265
52fa2412
UW
142662008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14267
14268 * linux-low.c (disabled_regsets, num_regsets): New.
14269 (use_regsets_p): Delete.
14270 (linux_wait_for_process): Clear disabled_regsets.
14271 (regsets_fetch_inferior_registers): Check and set it.
14272 (regsets_store_inferior_registers): Likewise.
14273 (linux_fetch_registers, linux_store_registers): Do not use
14274 use_regsets_p.
14275 (initialize_low): Allocate disabled_regsets.
14276
e28b3332
DJ
142772008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14278
14279 * Makefile.in (LIBOBJS): New.
14280 (OBS): Use LIBOBJS.
14281 (memmem.o): New rule.
14282 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14283 * configure: Regenerated.
14284
4536995d
UW
142852008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14286
14287 * server.c (handle_query): Never return "unsupported" for
14288 qXfer:features:read queries.
14289
221c031f
UW
142902008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14291
14292 * server.c (get_features_xml): Fix inverted condition.
14293 (handle_query): Always support qXfer:feature:read.
14294
ccd213ac
DJ
142952008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14296
14297 * server.c (wrapper_argv): New.
14298 (start_inferior): Handle wrapper_argv. If set, expect an extra
14299 trap.
14300 (gdbserver_usage): Document --wrapper.
14301 (main): Parse --wrapper.
14302
6fe305f7
UW
143032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14304
14305 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14306 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14307 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14308 (ppc_set_pc): Likewise.
14309 (ppc_arch_setup): New function.
14310 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14311 of collect_register.
889bf7c5 14312 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14313
5b0a002e
UW
143142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14315
14316 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14317 instead of linux-ppc64-low.o.
14318 * linux-ppc64-low.c: Remove file.
14319 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14320 (linux-ppc64-low.o): Remove rule.
14321
14322 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14323 (init_registers_powerpc_64): Likewise.
14324 (ppc_regmap): Conditionally define depending on __powerpc64__.
14325 (ppc_cannot_store_register): Do not special-case "fpscr" when
14326 compiled on __powerpc64__.
14327 (ppc_collect_ptrace_register): New function.
14328 (ppc_supply_ptrace_register): New function.
14329 (ppc_breakpoint): Change type to "unsigned int".
14330 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14331 (the_low_target): Conditionally provide initializers for the
889bf7c5 14332 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14333 collect_ptrace_register and supply_ptrace_register members.
14334
9b4b61c8
UW
143352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14336
14337 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14338 * server.c (gdbserver_xmltarget): Define.
14339 (get_features_xml): Use it to replace "target.xml" and arch_string.
14340
14341 * configure.srv: Remove srv_xmltarget. Add XML files that were
14342 mentioned there to srv_xmlfiles instead. Remove conditional tests
14343 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14344 srv_xmlfiles and srv_regobj to include all possible choices.
14345 * configure.ac (srv_xmltarget): Remove.
14346 (srv_xmlfiles): Do not add "target.xml".
14347 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14348 checks for supplementary target information.
14349 * configure: Regenerate.
14350 * Makefile.in (XML_TARGET): Remove.
14351 (target.xml): Remove rule.
14352 (clean): Do not clean up target.xml.
14353 (.PRECIOUS): Do not mention target.xml.
14354
14355 * target.h (struct target_ops): Remove arch_string member.
14356 * linux-low.c (linux_arch_string): Remove.
14357 (linux_target_ops): Remove arch_string initializer.
14358 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14359 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14360 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14361 * spu-low.c (spu_arch_string): Remove.
14362 (spu_target_ops): Remove arch_string initializer.
14363 * win32-low.c (win32_arch_string): Remove.
14364 (win32_target_ops): Remove arch_string initializer.
14365 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14366 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14367 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14368
ee1a7ae4
UW
143692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14370
14371 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14372 by collect_ptrace_register and supply_ptrace_register hooks.
14373 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14374 instead of checking for the_low_target.left_pad_xfer.
14375 (usr_store_inferior_registers): Use collect_ptrace_register callback
14376 instead of checking for the_low_target.left_pad_xfer.
14377
14378 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14379 (s390_supply_ptrace_register): Likewise.
14380 (s390_fill_gregset): Call s390_collect_ptrace_register.
14381 (the_low_target): Update.
14382
14383 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14384 (ppc_supply_ptrace_register): Likewise.
14385 (the_low_target): Update.
14386
14387 * linux-i386-low.c (the_low_target): Update.
14388 * linux-x86-64-low.c (the_low_target): Update.
14389
d61ddec4
UW
143902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14391
14392 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14393 reg-s390.o and reg-s390x.o.
14394
14395 * linux-low.c (new_inferior): New global variable.
14396 (linux_create_inferior, linux_attach): Set it.
14397 (linux_wait_for_process): Call the_low_target.arch_setup after the
14398 target has stopped for the first time.
14399 (initialize_low): Do not call the_low_target.arch_setup.
14400
14401 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14402 (s390_set_pc): Likewise.
14403 (s390_arch_setup): New function.
14404 (the_low_target): Use s390_arch_setup as arch_setup routine.
14405
14406 * regcache.c (realloc_register_cache): New function.
14407 (set_register_cache): Call it for each existing regcache.
14408
d05b4ac3
UW
144092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14410
14411 * server.h (init_registers): Remove prototype.
14412
14413 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14414 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14415 instead of init_registers ().
14416 * linux-arm-low.c (init_registers_arm): Add prototype.
14417 (init_registers_arm_with_iwmmxt): Likewise.
14418 (the_low_target): Add initializer for arch_setup field.
14419 * linux-cris-low.c (init_registers_cris): Add prototype.
14420 (the_low_target): Add initializer for arch_setup field.
14421 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14422 (the_low_target): Add initializer for arch_setup field.
14423 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14424 (the_low_target): Add initializer for arch_setup field.
14425 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14426 (the_low_target): Add initializer for arch_setup field.
14427 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14428 (the_low_target): Add initializer for arch_setup field.
14429 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14430 (the_low_target): Add initializer for arch_setup field.
14431 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14432 (init_registers_mips64_linux): Likewise.
14433 (the_low_target): Add initializer for arch_setup field.
14434 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14435 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14436 (the_low_target): Add initializer for arch_setup field.
14437 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14438 (init_registers_powerpc_64): Likewise.
14439 (the_low_target): Add initializer for arch_setup field.
14440 * linux-s390-low.c (init_registers_s390): Add prototype.
14441 (init_registers_s390x): Likewise.
14442 (the_low_target): Add initializer for arch_setup field.
14443 * linux-sh-low.c (init_registers_sh): Add prototype.
14444 (the_low_target): Add initializer for arch_setup field.
14445 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14446 (the_low_target): Add initializer for arch_setup field.
14447 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14448 (the_low_target): Add initializer for arch_setup field.
14449
14450 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14451 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14452 instead of init_registers ().
14453 * win32-arm-low.c (init_registers_arm): Add prototype.
14454 (the_low_target): Add initializer for arch_setup field.
14455 * win32-i386-low.c (init_registers_i386): Add prototype.
14456 (the_low_target): Add initializer for arch_setup field.
14457
14458 * spu-low.c (init_registers_spu): Add prototype.
14459 (initialize_low): Call initialie_registers_spu () instead of
14460 initialize_registers ().
14461
fd96d250
PA
144622008-02-19 Pedro Alves <pedro@codesourcery.com>
14463
14464 * server.c (handle_v_requests): When handling the vRun and vAttach
14465 packets, if already debugging a process, don't kill it. Return an
14466 error instead.
14467
d41b6bb4
DJ
144682008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14469
14470 * server.c (handle_query): Correct length check.
14471
5ac588cf
PA
144722008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14473
14474 * win32-low.c (do_initial_child_stuff): Add process handle
14475 parameter. Set current_process_handle and current_process_id from the
14476 parameters. Clear globals.
14477 (win32_create_inferior): Don't set current_process_handle and
14478 current_process_id here. Instead pass them on the call to
14479 do_initial_child_stuff.
14480 (win32_attach): Likewise.
14481 (win32_clear_inferiors): New.
14482 (win32_kill): Don't close the current process handle or the
14483 current thread handle here. Instead call win32_clear_inferiors.
14484 (win32_detach): Don't open a new handle to the process. Call
14485 win32_clear_inferiors.
14486 (win32_join): Don't rely on current_process_handle; open a new
14487 handle using the process id.
14488 (win32_wait): Call win32_clear_inferiors when the inferior process
14489 has exited.
14490
ecd7ecbc
DJ
144912008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14492
14493 * server.c (monitor_show_help): Add "exit".
14494
1525d545
MG
144952008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14496
ecd7ecbc 14497 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14498 (clean): Add reg-xtensa.c.
14499 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14500 * configure.srv (xtensa*-*-linux*) New target.
14501 * linux-xtensa-low.c: New.
14502 * xtensa-xtregs.c: New.
1525d545 14503
59a016f0
PA
145042008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14505
14506 * hostio.c: Don't include errno.h.
14507 (errno_to_fileio_errno): Move to hostio-errno.
14508 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14509 error number outputting to the target->hostio_last_error callback.
14510 (hostio_packet_error): Use FILEIO_EINVAL directly.
14511 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14512 calls to hostio_error.
14513 * hostio-errno.c: New.
14514 * server.h (hostio_last_error_from_errno): Declare.
14515 * target.h (target_ops): Add hostio_last_error member.
14516 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14517 as hostio_last_error handler.
889bf7c5 14518 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14519 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14520 (wince_hostio_last_error): New functions.
14521 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14522 as hostio_last_error handler.
14523 (win32_target_ops) [!_WIN32_WCE]: Register
14524 hostio_last_error_from_errno as hostio_last_error handler.
14525 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14526 (hostio-errno.o): New rule.
14527 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14528 * configure.srv (srv_hostio_err_objs): New variable. Default to
14529 hostio-errno.o.
14530 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14531 * configure: Regenerate.
14532
2d717e4f
DJ
145332008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14536 (linux_kill, linux_detach): Clean up the process list.
14537 * remote-utils.c (remote_open): Improve port number parsing.
14538 (putpkt_binary, input_interrupt): Only send interrupts if the target
14539 is running.
14540 * server.c (extended_protocol): Make static.
14541 (attached): Define earlier.
14542 (exit_requested, response_needed, program_argv): New variables.
14543 (target_running): New.
14544 (start_inferior): Clear attached here.
14545 (attach_inferior): Set attached here.
14546 (require_running): Define.
14547 (handle_query): Use require_running and target_running. Implement
14548 "monitor exit".
14549 (handle_v_attach, handle_v_run): New.
14550 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14551 (gdbserver_usage): Update.
14552 (main): Redo argument parsing. Handle --debug and --multi. Handle
14553 --attach along with other options or after the port. Save
14554 program_argv. Support no initial program. Resynchronize
14555 communication with GDB after an error. Handle "monitor exit".
14556 Use require_running and target_running. Always allow the extended
14557 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14558 restart in extended mode.
14559 * README: Refer to the GDB manual. Update --attach usage.
14560
7407e2de
AS
145612007-12-20 Andreas Schwab <schwab@suse.de>
14562
14563 * linux-low.c (STACK_SIZE): Define.
14564 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14565 (linux_test_for_tracefork): Likewise.
14566
b65d95c5
DJ
145672007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14568
14569 * linux-low.c (linux_wait_for_event): Update messages. Do not
14570 reinsert auto-delete breakpoints.
14571 * mem-break.c (struct breakpoint): Change return type of handler to
14572 int.
14573 (set_breakpoint_at): Update handler type.
14574 (reinsert_breakpoint_handler): Return 1 instead of calling
14575 delete_breakpoint.
14576 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14577 setting a new one.
14578 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14579 * mem-break.h (set_breakpoint_at): Update handler type.
14580 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14581 * win32-low.c (auto_delete_breakpoint): New.
14582 (get_child_debug_event): Use it.
14583
4e799345
DJ
145842007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14585
14586 * configure.ac: Check for pread and pwrite.
14587 * hostio.c (handle_pread): Fall back to lseek and read.
14588 (handle_pwrite): Fall back to lseek and write.
14589 * config.in, configure: Regenerated.
14590
27524b67
DJ
145912007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * server.c (myresume): Add own_buf argument.
14594 (main): Update calls.
14595
a20d5e98
DJ
145962007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14599 * remote-utils.c (remote_open): Do not call disable_async_io.
14600 (block_async_io): Delete.
14601 (unblock_async_io): Make static.
14602 (initialize_async_io): New.
14603 * server.c (handle_v_cont): Handle async I/O here.
14604 (myresume): Likewise. Move other common resume tasks here...
14605 (main): ... from here. Call initialize_async_io. Disable async
14606 I/O before the main loop.
14607 * server.h (initialize_async_io): Declare.
14608 (block_async_io, unblock_async_io): Delete prototypes.
14609 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14610
b79d787e
DJ
146112007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14612
14613 * remote-utils.c (readchar): Allow binary data in received messages.
14614
d97903b2
PA
146152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14616
14617 * win32-low.c (attaching): New global.
14618 (win32_create_inferior): Clear the `attaching' global.
14619 (win32_attach): Set the `attaching' global.
14620 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14621 attaching. Only set a breakpoint at the entry point if not
14622 attaching.
14623
311de423
PA
146242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14625
14626 * server.c (main): Don't report dll events on the initial
14627 connection on attaches.
14628
6c2d16d2
PA
146292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14630
14631 * server.c (main): Relax numerical bases supported for the pid of
14632 the --attach command line argument.
14633
5ca906e6
PA
146342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14635
14636 * win32-low.c (win32_attach): Call OpenProcess before
14637 DebugActiveProcess, not after. Add last error output to error
14638 call.
14639
9c6c8194
PA
146402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14641
14642 * win32-low.c (win32_get_thread_context)
14643 (win32_set_thread_context): New functions.
14644 (thread_rec): Use win32_get_thread_context.
14645 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14646 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14647 field.
14648
4d5d1aaa
PA
146492007-12-03 Leo Zayas
14650 Pedro Alves <pedro_alves@portugalmail.pt>
14651
14652 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14653 global variables.
14654 (child_add_thread): Minor cleanup.
14655 (child_continue): Resume artificially suspended threads before
14656 calling ContinueDebugEvent.
14657 (suspend_one_thread): New.
14658 (fake_breakpoint_event): New.
14659 (get_child_debug_event): Change return type to int. Check here if
14660 gdb sent an interrupt request. If a soft interrupt was requested,
14661 fake a breakpoint event. Return 0 if there is no event to handle,
14662 and 1 otherwise.
14663 (win32_wait): Don't check here if gdb sent an interrupt request.
14664 Ensure there is a valid event to handle.
14665 (win32_request_interrupt): Add soft interruption method as last
14666 resort.
14667
c436e841
PA
146682007-12-03 Leo Zayas
14669 Pedro Alves <pedro_alves@portugalmail.pt>
14670
14671 * win32-low.h (win32_thread_info): Add descriptions to the
14672 structure members. Replace `suspend_count' counter by a
14673 `suspended' flag.
14674 * win32-low.c (thread_rec): Update condition of when to get the
14675 context from the inferior. Rely on ContextFlags being set if it
14676 has already been retrieved. Only suspend the inferior thread if
14677 we haven't already. Warn if that fails.
14678 (continue_one_thread): s/suspend_count/suspended/. Only call
14679 ResumeThread once. Warn if that fails.
14680
e7b5fa67
PA
146812007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14682
14683 * win32-low.c (win32_wait): Don't read from the inferior when it
14684 has already exited.
14685
a385171d
PA
146862007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14687
14688 * Makefile.in (win32_low_h): New variable.
14689 (win32-low.o): Add dependency on $(win32_low_h).
14690 (win32-arm-low.o, win32-i386-low.o): New rules.
14691
f80c84b3
DJ
146922007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * hostio.c: Correct copyright year.
14695
a6b151f1
DJ
146962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * Makefile.in (OBS): Add hostio.o.
14699 (hostio.o): New rule.
14700 * server.h (handle_vFile): Declare.
14701 * hostio.c: New file.
14702 * server.c (handle_v_requests): Take packet_len and new_packet_len
14703 for binary packets. Call handle_vFile.
14704 (main): Update call to handle_v_requests.
14705
f9387fc3
DJ
147062007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14707
14708 * linux-low.c: Include <sched.h>.
14709
51c2684e
DJ
147102007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * linux-low.c (linux_tracefork_grandchild): New.
14713 (linux_tracefork_child): Use clone.
14714 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14715
75f83163
JB
147162007-10-31 Joel Brobecker <brobecker@adacore.com>
14717
14718 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14719
da5898ce
DJ
147202007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14721
14722 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14723
24a09b5f
DJ
147242007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * inferiors.c (change_inferior_id): Delete.
14727 (add_pid_to_list, pull_pid_from_list): New.
14728 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14729 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14730 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14731 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14732 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14733 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14734 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14735 (using_threads): Always set to 1.
14736 (handle_extended_wait): New.
14737 (add_process): Do not set TID.
14738 (linux_create_inferior): Set must_set_ptrace_flags.
14739 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14740 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14741 (linux_thread_alive): Rename TID argument to LWPID.
14742 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14743 (linux_wait_for_event): Do not use TID or check using_threads. Update
14744 call to dead_thread_notify. Call handle_extended_wait.
14745 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14746 (send_sigstop): Delete sigstop_sent.
14747 (wait_for_sigstop): Avoid TID.
14748 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14749 (linux_test_for_tracefork): New.
14750 (linux_lookup_signals): Use thread_db_active and
14751 linux_supports_tracefork_flag.
14752 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14753 * linux-low.h (get_process_thread): Avoid TID.
14754 (struct process_ifo): Move thread_known and tid to the end. Remove
14755 sigstop_sent.
14756 (linux_attach_lwp, thread_db_init): Update prototypes.
14757 * server.h (change_inferior_id): Delete prototype.
14758 (add_pid_to_list, pull_pid_from_list): New prototypes.
14759 * thread-db.c (thread_db_use_events): New.
14760 (find_first_thread): Rename to...
14761 (find_one_thread): ...this. Update callers and messages. Do not
14762 call fatal. Check thread_db_use_events. Do not call
14763 change_inferior_id or new_thread_notify.
14764 (maybe_attach_thread): Update. Do not call new_thread_notify.
14765 (thread_db_init): Set thread_db_use_events. Check use_events.
14766 * utils.c (fatal, warning): Correct message prefix.
14767
30ed0a8f
DJ
147682007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14769
14770 * Makefile.in (clean): Remove new files.
14771 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14772 (powerpc-64.o, powerpc-64.c): New rules.
14773 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14774 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14775 with SPE.
14776 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14777 SPE targets.
14778 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14779 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14780 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14781 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14782 (target_regsets): Add AltiVec and SPE register sets.
14783 * configure.ac: Check for AltiVec and SPE.
14784 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14785 (ppc_fill_vrregset, ppc_store_vrregset): New.
14786 (target_regsets): Add AltiVec register set.
14787 * configure: Regenerated.
14788
fd462a61
DJ
147892007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14790
14791 * linux-low.c (O_LARGEFILE): Define.
14792 (linux_read_memory): Use /proc/PID/mem.
14793 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14794 * configure, config.in: Regenerated.
14795
69f223ed
DJ
147962007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * linux-low.c (linux_wait_for_event): Do not pass signals while
14799 single-stepping.
14800
aec18585
PA
148012007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14802
14803 * win32-low.c (create_process): New.
14804 (win32_create_inferior): Use create_process instead of
14805 CreateProcess. If create_process failed retry appending an ".exe"
14806 suffix. Store the GetLastError result immediatelly after
14807 create_process calls and use it on the call to error.
14808
34d86ddd
PA
148092007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14810
14811 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14812
5a0e3bd0
JB
148132007-08-23 Joel Brobecker <brobecker@adacore.com>
14814
14815 * configure.ac: Switch license to GPLv3.
14816
f88c79e6
MS
148172007-08-01 Michael Snyder <msnyder@access-company.com>
14818
14819 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14820
6b3d9b83
PA
148212007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14822
14823 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14824 typedef.
14825 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14826 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14827 CloseToolhelp32Snapshot.
14828 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14829 CloseToolhelp32Snapshot.
14830
c588c53c
MS
148312007-07-27 Michael Snyder <michael.snyder@access-company.com>
14832
14833 * server.c (main): Check for inferior exit before main loop.
14834
aa0403d9
PA
148352007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14836
14837 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14838 instead of on tmp_desc.
14839
255e7678
DJ
148402007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14841 Daniel Jacobowitz <dan@codesourcery.com>
14842
14843 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14844 (add_thread): Minor cleanups.
14845 (clear_inferiors): Move lower in the file. Clear the DLL
14846 list.
14847 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14848 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14849 (xml_escape_text): New.
14850 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14851 for qSupported.
14852 (handle_v_cont): Report errors.
14853 (gdbserver_version): Update.
14854 (main): Correct size of own_buf. Do not report initial DLL events.
14855 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14856 (unloaded_dll, xml_escape_text): New.
14857 * win32-low.c (enum target_waitkind): Update comments.
14858 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14859 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14860 (win32_EnumProcessModules, win32_GetModuleInformation)
14861 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14862 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14863 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14864 (win32_Module32First, win32_Module32Next, load_toolhelp)
14865 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14866 (get_child_debug_event): Handle DLL events.
14867 (win32_wait): Likewise.
14868
0d37add9
DJ
148692007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14870
14871 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14872 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14873
45e2715e
PA
148742007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14875
14876 * win32-low.c (handle_output_debug_string): Ignore event if not
14877 waiting.
14878
c5674cf1
PA
148792007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14880
14881 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14882
2bbe3cc1
DJ
148832007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14884
14885 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14886
ae13219e
DJ
148872007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14888
14889 * inferiors.c (change_inferior_id): Add comment.
14890 * linux-low.c (check_removed_breakpoint): Add an early
14891 prototype. Improve debug output.
14892 (linux_attach): Doc update.
14893 (linux_detach_one_process, linux_detach): Clean up before releasing
14894 each process.
14895 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14896 * linux-low.h (struct process_info): Doc improvement.
14897 * mem-break.c (delete_all_breakpoints): New.
14898 * mem-break.h (delete_all_breakpoints): New prototype.
14899 * thread-db.c (find_first_thread): New.
14900 (thread_db_create_event): Call it instead of
14901 thread_db_find_new_threads. Clean up unused variables.
14902 (maybe_attach_thread): Remove first thread handling.
14903 (thread_db_find_new_threads): Use find_first_thread.
14904 (thread_db_get_tls_address): Likewise.
14905
4105de34
DJ
149062007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * thread-db.c (thread_db_find_new_threads): Add prototype.
14909 (thread_db_create_event): Check for the main thread before adding
14910 a new thread.
14911 (maybe_attach_thread): Only enable event reporting if TID == 0.
14912 (thread_db_get_tls_address): Check for new threads.
14913
2b876972
DJ
149142007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14915
14916 * linux-low.c (linux_create_inferior): Try execv before execvp.
14917 * spu-low.c (spu_create_inferior): Likewise.
14918
7a245884
DJ
149192007-06-13 Mike Frysinger <vapier@gentoo.org>
14920
14921 * linux-low.c (linux_create_inferior): Change execv to execvp.
14922 * spu-low.c (spu_create_inferior): Likewies.
14923
117ce543
DJ
149242007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * Makefile.in (clean): Clean new files instead of deleted ones.
14927 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14928 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14929 rules.
14930 * configure.srv: Specify XML files and new regformats for MIPS and
14931 MIPS64 GNU/Linux.
14932 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14933 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14934 an entry for the restart register.
14935 (mips_cannot_fetch_register, mips_cannot_store_register)
14936 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14937 register names to match the XML descriptions.
14938 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14939 restart register instead of $0.
14940
0e7f50da
UW
149412007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14942 Markus Deuling <deuling@de.ibm.com>
14943
14944 * remote-utils.c (decode_xfer_write): New function.
14945 * server.h (decode_xfer_write): Add prototype.
14946 * server.c (handle_query): Add PACKET_LEN argument. Support
14947 qXfer:spu:read and qXfer:spu:write packets.
14948 (main): Pass packet_len to handle_query.
14949 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14950 * target.h (target_ops): Add qxfer_spu.
14951
374c1d38
UW
149522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14953
14954 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14955 accessing non-seekable spufs files.
14956
bb63802a
UW
149572007-05-16 Markus Deuling <deuling@de.ibm.com>
14958
889bf7c5 14959 * server.c (handle_query): Add reply for qC packet.
bb63802a 14960
7390519e
PA
149612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14962 Leo Zayas <lerele@champenstudios@com>
14963
14964 * server.h (check_remote_input_interrupt_request): New function.
14965 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14966 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14967 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14968 (check_remote_input_interrupt_request): New function.
14969 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14970 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14971 winapi_GenerateConsoleCtrlEvent): New typedefs.
14972 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14973 to 250 ms.
14974 (win32_wait): Check for remote interrupt request
14975 with check_remote_input_interrupt_request.
14976 (win32_request_interrupt): New function.
14977 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14978
34b34921
PA
149792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14980
14981 * win32-low.c (debug_registers_changed,
14982 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14983 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14984 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14985 (thread_rec): Get context using the low target.
14986 (child_add_thread): Call thread_added on the low target,
14987 which does the same thing.
14988 (regptr): Delete.
14989 (do_initial_child_stuff): Remove debug registers references.
14990 Set context using the low target. Resume threads after
14991 setting the contexts.
14992 (child_continue): Remove dead variable. Remove debug
14993 registers references.
14994 (child_fetch_inferior_registers): Go through the low target.
14995 (do_child_store_inferior_registers): Remove.
14996 (child_store_inferior_registers): Go through the low target.
14997 (win32_resume): Remove debug registers references.
14998 Set context using the low target.
14999 (handle_exception): Change return type to void. Don't record
15000 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15001 first chance exception.
889bf7c5 15002 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15003 goto loop. Always return after waiting for debug event.
15004 (win32_wait): Convert to switch statement. Handle spurious
15005 events.
15006
15007 * win32-i386-low.c (debug_registers_changed,
15008 debug_registers_used): New.
15009 (initial_stuff): Rename to ...
15010 (i386_initial_stuff): ... this. Clear debug registers
15011 state variables.
15012 (store_debug_registers): Delete.
15013 (i386_get_thread_context): New.
15014 (load_debug_registers): Delete.
15015 (i386_set_thread_context): New.
15016 (i386_thread_added): New.
15017 (single_step): Rename to ...
15018 (i386_single_step): ... this.
15019 (do_fetch_inferior_registers): Rename to ...
15020 (i386_fetch_inferior_register): ... this.
15021 (i386_store_inferior_register): New.
15022 (the_low_target): Adapt to new interface.
15023
15024 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15025 (arm_get_thread_context): New.
15026 (arm_set_thread_context): New.
15027 (regptr): New.
15028 (do_fetch_inferior_registers): Rename to ...
15029 (arm_fetch_inferior_register): ... this.
15030 (arm_store_inferior_register): New.
15031 (arm_wince_breakpoint): Reimplement as unsigned long.
15032 (arm_wince_breakpoint_len): Define.
15033 (the_low_target): Adapt to new interface.
15034
15035 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15036 load_debug_registers. Add get_thread_context, set_thread_context,
15037 thread_added and store_inferior_register. Rename
15038 fetch_inferior_registers to fetch_inferior_register.
15039 (regptr): Remove declaration.
15040
dd6953e1
PA
150412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15042
15043 * linux-low.c (linux_detach): Change return type to int. Return 0.
15044 * spu-low.c (spu_detach): Likewise.
15045
444d6139
PA
150462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15047
15048 * target.h (target_ops): Change return type of detach to int.
15049 Add join.
15050 (join_inferior): New.
15051 * server.c (main): Don't skip detach support on mingw32.
15052 If the inferior doesn't support detaching return error.
15053 Call join_inferior instead of using waitpid.
15054 * linux-low.c (linux_join): New.
15055 (linux_target_op): Add linux_join.
15056 * spu-low.c (spu_join): New.
15057 (spu_target_ops): Add spu_join.
15058 * win32-low.c (win32_detach): Adapt to new interface.
15059 Reopen current_process_handle before detaching. Issue a child
15060 resume before detaching.
15061 (win32_join): New.
15062 (win32_target_op): Add win32_join.
15063
1d5315fe
PA
150642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15065
15066 * win32-low.c (win32-attach): Fix return value.
15067 * target.h (target_ops): Describe ATTACH return values.
15068
bf914831
PA
150692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15070
15071 * win32-low.c (GETPROCADDRESS): Define.
15072 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15073 (winapi_DebugSetProcessKillOnExit): Likewise.
15074 (win32_create_inferior): Force usage of ansi CreateProcessA.
15075 (win32_attach): Use GETPROCADDRESS.
15076 (win32_detach): Likewise.
15077
f72f3e60
PA
150782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15081
ed50f18f
PA
150822007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15083
15084 * win32-low.c: Commit leftover changes from 2007-03-29.
15085
0c2ead7e
DJ
150862007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15087
15088 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15089 fields short instead of int. Add explicit padding.
15090 (i387_cache_to_fsave): Remove unnecessary casts.
15091 (i387_fsave_to_cache): Doc fix.
15092 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15093
73725ff3
DJ
150942007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15095
15096 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15097 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15098
d99f33d8
PA
150992007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15100
15101 * configure.srv (arm*-*-mingw32ce*): Move near the other
15102 arm targets.
15103
68070c10
PA
151042007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15105
2482afc6 15106 * configure.ac: Add errno checking.
68070c10
PA
15107 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15108 sys/file.h and malloc.h.
15109 (AC_CHECK_DECLS): Add perror.
15110 (srv_mingwce): Handle.
2482afc6 15111 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15112 win32-i386-low.o to srv_tgtobj.
15113 (i[34567]86-*-mingw*): Likewise.
15114 (arm*-*-mingw32ce*): Add case.
15115 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15116 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15117 [__MINGW32CE__] (strerror): New function.
15118 [__MINGW32CE__] (errno): Define to GetLastError.
15119 [__MINGW32CE__] (COUNTOF): New macro.
15120 (remote_open): Remove extra close call.
15121 * mem-break.c (delete_breakpoint_at): New function.
15122 * mem-break.h (delete_breakpoint_at): Declare.
15123 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15124 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15125 [USE_WIN32API] (read, write): Add char* casts.
15126 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15127 * server.h: Include wincecompat.h on Windows CE.
15128 [HAVE_ERRNO_H]: Check.
15129 (perror): Declare if not declared.
15130 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15131 (perror_with_name): Remove errno declaration.
15132 * wincecompat.h: New.
15133 * wincecompat.c: New.
15134 * win32-low.h: New.
15135 * win32-arm-low.c: New.
15136 * win32-i386-low.c: New.
15137 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15138 (OUTMSG2): Make it safe.
15139 (_T): New macro.
15140 (COUNTOF): New macro.
15141 (NUM_REGS): Get it from the low target.
15142 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15143 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15144 (thread_rec): Let low target handle debug registers.
15145 (child_add_thread): Likewise.
15146 (child_init_thread_list): Likewise.
15147 (continue_one_thread): Likewise.
15148 (regptr): New.
15149 (do_child_fetch_inferior_registers): Move to ...
15150 * win32-i386-low.c: ... here, and rename to ...
15151 (do_fetch_inferior_registers): ... this.
889bf7c5 15152 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15153 Go through the low target.
15154 (do_child_store_inferior_registers): Use regptr.
15155 (strwinerror): New function.
15156 (win32_create_inferior): Handle Windows CE.
15157 Use strwinerror instead of strerror on Windows error
15158 codes. Add program to the error output.
15159 Don't close the main thread handle on Windows CE.
15160 (win32_attach): Use coredll.dll on Windows CE.
15161 (win32_kill): Close current process and current
15162 thread handles.
15163 (win32_detach): Use coredll.dll on Windows CE.
15164 (win32_resume): Let low target handle debug registers, and
15165 step request.
15166 (handle_exception): Add/Remove initial breakpoint. Avoid
15167 non-existant WSTOPSIG on Windows CE.
15168 (win32_read_inferior_memory): Cast to remove warning.
15169 (win32_arch_string): Go through the low target.
15170 (initialize_low): Call set_breakpoint_data with the low
15171 target's breakpoint.
15172 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15173 FOP_REGNUM, mappings): Move to ...
15174 * win32-i386-low.c: ... here.
15175 * win32-low.c (win32_thread_info): Move to ...
15176 * win32-low.h: ... here.
15177 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15178 win32-arm-low.c and wincecompat.c.
15179 (all:): Add $EXEEXT.
15180 (install-only:): Likewise.
15181 (gdbserver:): Likewise.
15182 (gdbreplay:): Likewise.
15183 * config.in: Regenerate.
15184 * configure: Regenerate.
15185
41093d81
PA
151862007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15187
15188 * win32-low.c: Rename typedef thread_info to
15189 win32_thread_info throughout.
15190
544afa54
PA
151912007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15192
15193 * win32-i386-low.c: Rename to ...
15194 * win32-low.c: ... this.
15195 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15196 * Makefile.in: Likewise.
15197
bce7165d
PA
151982007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15199
15200 * remote-utils.c (monitor_output): Constify msg parameter.
15201 * server.h (monitor_output): Likewise.
15202 * win32-i386-low.c (handle_output_debug_string): New.
15203 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15204 handle_output_debug_string.
15205 (get_child_debug_event): Likewise.
15206
506c7aa0
DJ
152072007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15208
15209 * server.c (main): Correct strtoul check.
15210
42c81e2a
DJ
152112007-03-27 Jon Ringle <jon@ringle.org>
15212
15213 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15214
9453113a
DJ
152152007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15216
15217 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15218
64a69107
DJ
152192007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15220
15221 * terminal.h: Check HAVE_SGTTY_H.
15222
152232007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15224
15225 * remote-utils.c (remote_open): Print out the assigned port number.
15226
c74d0ad8
DJ
152272007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15228
15229 * remote-utils.c (monitor_output): New function.
15230 * server.c (debug_threads): Define here.
15231 (monitor_show_help): New function.
15232 (handle_query): Handle qRcmd.
15233 (main): Do not handle 'd' packet.
15234 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15235 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15236 of debug_threads.
15237
de7c3b4a
PA
152382007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15239
15240 * Makefile.in (EXEEXT): New.
15241 (clean): Use $(EXEEXT).
15242
ef57601b
PA
152432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15244
15245 * target.h (target_ops): Rename send_signal to request_interrupt,
15246 and remove enum target_signal parameter.
15247 * linux-low.c (linux_request_interrupt): Rename from
15248 linux_send_signal, and always send SIGINT.
15249 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15250 and always send SIGINT.
15251 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15252 of send_signal.
15253 (input_interrupt): Likewise.
15254
820f2bda
PA
152552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15256
15257 * server.c (get_features_xml): Check if target implemented
15258 arch_string.
15259 * win32-i386-low.c (win32_arch_string): New.
15260 (win32_target_ops): Add win32_arch_string as arch_string member.
15261
ab39bf24
UW
152622007-02-22 Markus Deuling <deuling@de.ibm.com>
15263
15264 * spu-low.c (spu_arch_string): New.
15265 (spu_target_ops): Add spu_arch_string.
15266
61ff6e04
DJ
152672007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15268
15269 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15270 * configure.ac: Do not check for terminal.h.
15271 * configure, config.in: Regenerated.
15272
fb1e4ffc
DJ
152732007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15274
15275 * Makefile.in (OBS): Add $(XML_BUILTIN).
15276 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15277 (clean): Update.
15278 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15279 (arm-with-iwmmxt.c): New.
15280 * config.in, configure: Regenerate.
15281 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15282 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15283 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15284 (arm*-*-linux*): Add iWMMXt and regset support.
15285 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15286 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15287 (arm_store_wmmxregset, target_regsets): New.
15288 * server.c (get_features_xml): Take annex argument. Check builtin
15289 XML documents.
15290 (handle_query): Handle multiple annexes.
15291
0f48aa01
DJ
152922007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * remote-utils.c [USE_WIN32API] (read, write): Define.
15295 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15296 write.
15297
23181151
DJ
152982007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * linux-i386-low.c (the_low_target): Set arch_string.
15301 * linux-x86-64-low.c (the_low_target): Likewise.
15302 * linux-low.c (linux_arch_string): New.
15303 (linux_target_ops): Add it.
15304 * linux-low.h (struct linux_target_ops): Add arch_string.
15305 * server.c (write_qxfer_response): Use const void * for DATA.
15306 (get_features_xml): New.
15307 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15308 * target.h (struct target_ops): Add arch_string method.
15309
9d606399
DJ
153102007-01-03 Denis Pilat <denis.pilat@st.com>
15311 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * linux-low.c (linux_kill): Handle being called with no threads.
15314 * win32-i386-low.c (win32_kill): Likewise.
15315 (get_child_debug_event): Clear current_process_handle.
15316
153172006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15318 Daniel Jacobowitz <dan@codesourcery.com>
15319
15320 * remote-utils.c (remote_open): Check the type of specified
15321 serial port devices before opening them.
15322 * server.c (main): Kill the inferior if an error occurs during
15323 the first remote_open.
15324
a5e13d24
DJ
153252006-12-05 Markus Deuling <deuling@de.ibm.com>
15326
15327 * README: Update supported targets.
15328
186947f7
DJ
153292006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15330
15331 * Makefile.in (clean): Remove reg-mips64.c.
15332 (reg-mips64.c, reg-mips64.o): New rules.
15333 * configure.srv: Handle mips64. Include regset support for mips.
15334 * linux-mips-low.c (union mips_register): New.
15335 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15336 (mips_breakpoint, mips_breakpoint_at): Use int.
15337 (mips_collect_register, mips_supply_register)
15338 (mips_collect_register_32bit, mips_supply_register_32bit)
15339 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15340 (mips_store_fpregset, target_regsets): New.
15341 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15342
a13e2c95
UW
153432006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15344
15345 * configure.srv: Add target "spu*-*-*".
15346 * Makefile.in (clean): Remove reg-spu.c.
15347 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15348 * spu-low.c: New file.
15349
cb7283db
DJ
153502006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15351
15352 * configure.ac: Correct td_thr_tls_get_addr test.
15353 * configure: Regenerated.
15354
89be2091
DJ
153552006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15356
15357 * linux-low.c (linux_wait_for_event): Reformat. Use the
15358 pass_signals array.
15359 * remote-utils.c (decode_address_to_semicolon): New.
15360 * server.c (pass_signals, handle_general_set): New.
15361 (handle_query): Mention QPassSignals for qSupported.
15362 (main): Call handle_general_set.
15363 * server.h (pass_signals, decode_address_to_semicolon): New.
15364
000ef4f0
DJ
153652006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15366
15367 * server.c (handle_query): Correct error handling for read_auxv.
15368
b7149293
UW
153692005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15370
15371 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15372 and srv_linux_thread_db to yes.
15373 * linux-s390-low.c (s390_fill_gregset): New function.
15374 (target_regsets): Define data structure.
15375
dae5f5cf
DJ
153762006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15377
15378 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15379 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15380 * config.in, configure: Regenerated.
15381 * inferiors.c (gdb_id_to_thread): New function.
15382 (gdb_id_to_thread_id): Use it.
15383 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15384 * linux-low.h (struct process_info): Add th member.
15385 (thread_db_get_tls_address): New prototype.
15386 * remote-utils.c (decode_address): Make non-static.
15387 * server.c (handle_query): Handle qGetTLSAddr.
15388 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15389 * target.h (struct target_ops): Add get_tls_address.
15390 * thread-db.c (maybe_attach_thread): Save the thread handle.
15391 (thread_db_get_tls_address): New.
15392
32ca6d61
DJ
153932006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15396 (linux_resume_one_process): Take a siginfo_t *. Update all
15397 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15398 (struct pending_signals): Add a siginfo_t.
15399 (linux_wait_for_process): Always set last_status.
15400 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15401 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15402 * linux-low.h (struct process_info): Add last_status.
15403
5ffff7c1
DJ
154042006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15405
15406 * remote-utils.c (try_rle): New function.
15407 (putpkt_binary): Use it.
15408
8695c747
DJ
154092006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15410
15411 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15412 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15413 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15414 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15415 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15416 point registers.
15417
290fadea
RS
154182006-08-08 Richard Sandiford <richard@codesourcery.com>
15419
15420 * server.c (terminal_fd): New variable.
15421 (old_foreground_pgrp): Likewise.
15422 (restore_old_foreground_pgrp): New function.
15423 (start_inferior): Record the terminal file descriptor in terminal_fd
15424 and its original foreground group in old_foreground_pgrp. Register
15425 restore_old_foreground_pgrp with atexit().
15426
9f2e1e63
DJ
154272006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * server.c (handle_query): Correct qPart to qXfer.
15430
b80864fb
DJ
154312006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15432
15433 * configure.ac: Check for more headers which are missing on
15434 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15435 * configure.srv: Add Cygwin and mingw32.
15436 * remote-utils.c: Don't include headers unconditionally which
15437 are missing on mingw32. Include <winsock.h> for mingw32.
15438 (remote_open): Adjust for mingw32 support. Flush
15439 standard error after writing to it.
15440 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15441 (unblock_async_io, enable_async_io, disable_async_io)
15442 (readchar, getpkt): Update for Winsock support.
15443 (prepare_resume_reply): Expect a protocol signal number.
15444 * server.c: Disable <sys/wait.h> on mingw32.
15445 (start_inferior): Adjust for mingw32 support. Flush
15446 standard error after writing to it.
15447 (attach_inferior): Likewise. Use protocol signal
15448 numbers.
15449 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15450 and names.
15451 * win32-i386-low.c: New file.
15452 * Makefile.in (XM_CLIBS): Set.
15453 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15454 (win32-i386-low.o): New dependency rule.
15455 * linux-low.c (linux_wait): Use target signal numbers.
15456 * target.h (struct target_ops): Doc fix.
15457 * server.h (target_signal_to_name): New prototype.
15458 * gdbreplay.c: Don't include headers unconditionally which
15459 are missing on mingw32. Include <winsock.h> for mingw32.
15460 (remote_close, remote_open): Adjust for Winsock support.
15461 * configure, config.in: Regenerated.
15462
0876f84a
DJ
154632006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15464
15465 * server.c (decode_xfer_read, write_qxfer_response): New.
15466 (handle_query): Take a packet length argument. Handle
15467 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15468 the qSupported response.
15469 (main): Update call to handle_query.
15470
01f9e8fa
DJ
154712006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15472
15473 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15474 (putpkt_binary): Renamed from putpkt and adjusted for binary
15475 data.
15476 (putpkt): New wrapper for putpkt_binary.
15477 (readchar): Don't mask off the high bit.
15478 (decode_X_packet): New function.
15479 * server.c (main): Call putpkt_binary if a handler sets the packet
15480 length. Save the length of the incoming packet. Handle 'X'.
15481 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15482
be2a5f71
DJ
154832006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15484
15485 * server.c (handle_query): Handle qSupported.
15486
ea025f5f
DJ
154872006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15488
15489 * remote-utils.c (all_symbols_looked_up): New variable.
15490 (look_up_one_symbol): Check it.
15491 * server.h (look_up_one_symbol): New declaration.
15492 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15493
9308fc88
DJ
154942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15495
15496 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15497 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15498 (PTRACE_GET_THREAD_AREA): Define.
15499 (ps_get_thread_area): New function.
15500
52fb6437
NS
155012006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15502
15503 * configure.srv (m68k*-*-uclinux*): New target.
15504 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15505 (linux_resume_one_process): Remove extraneous cast.
15506 (linux_read_offsets): New.
15507 (linux_target_op): Add linux_read_offsets on mmuless systems.
15508 * server.c (handle_query): Add qOffsets logic.
15509 * target.h (struct target_ops): Add read_offsets.
15510
21b0f40c
DJ
155112006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15512
15513 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15514 (PTRACE_GET_THREAD_AREA): Define.
15515 (ps_get_thread_area): New function.
15516 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15517 (linux-x86-64-low.o): Update.
15518
0050a760
DJ
155192006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * configure.ac: Remove checks for prfpregset_t.
15522 * gdb_proc_service.h: New file.
15523 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15524 new "gdb_proc_service.h".
15525 * proc-service.c: Likewise.
15526 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15527 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15528 * Makefile.in (gdb_proc_service_h): Updated.
15529 * configure, config.in: Regenerated.
15530
b92a518e
DJ
155312006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15532
15533 * remote-utils.c (prepare_resume_reply): Move declaration
15534 of gdb_id_from_wait to the top of the block.
15535
545587ee
DJ
155362006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15537
15538 * linux-low.c (regsets_store_inferior_registers): Read the regset
15539 from the target before filling it.
15540
9db87ebd
DJ
155412006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15542
15543 * server.c (attach_inferior): Return SIGTRAP for a successful
15544 attach.
15545
dd24457d
DJ
155462006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * Makefile.in (OBS): Add version.o.
15549 (STAGESTUFF): Delete.
15550 (version.o): Add dependencies.
15551 (version.c): Replace rule.
15552 (clean): Remove version.c.
15553 * server.c (gdbserver_version): New.
15554 (gdbserver_usage): Use printf.
15555 (main): Handle --version and --help.
15556 * server.h (version, host_name): Add declarations.
15557
6f0f660e
EZ
155582005-12-23 Eli Zaretskii <eliz@gnu.org>
15559
889bf7c5
PA
15560 * linux-arm-low.c:
15561 * linux-arm-low.c:
15562 * inferiors.c:
15563 * i387-fp.h:
15564 * i387-fp.c:
15565 * gdbreplay.c:
15566 * regcache.c:
15567 * proc-service.c:
15568 * mem-break.h:
15569 * mem-break.c:
15570 * linux-x86-64-low.c:
15571 * linux-sh-low.c:
15572 * linux-s390-low.c:
15573 * linux-ppc64-low.c:
15574 * linux-ppc-low.c:
15575 * linux-mips-low.c:
15576 * linux-m68k-low.c:
15577 * linux-m32r-low.c:
15578 * linux-low.h:
15579 * linux-low.c:
15580 * linux-ia64-low.c:
15581 * linux-i386-low.c:
15582 * linux-crisv32-low.c:
15583 * thread-db.c:
15584 * terminal.h:
15585 * target.h:
15586 * target.c:
15587 * server.h:
15588 * server.c:
15589 * remote-utils.c:
15590 * regcache.h:
15591 * utils.c:
15592 * Makefile.in:
15593 * configure.ac:
6f0f660e
EZ
15594 * gdbserver.1: Add (C) after Copyright. Update the FSF
15595 address.
15596
9d1fb177
DJ
155972005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15600 (arm_breakpoint_at): Recognize both breakpoints.
15601 (the_low_target): Use the correct breakpoint instruction.
15602
011a70c2
DJ
156032005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15604
15605 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15606 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15607 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15608 (the_low_target): Update.
15609
7fb85e41
AS
156102005-10-25 Andreas Schwab <schwab@suse.de>
15611
15612 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15613
15614 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15615 (ia64_num_regs): Reduce to 462.
15616
3db0444b
DJ
156172005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15618
15619 * acinclude.m4: Correct quoting.
15620 * aclocal.m4: Regenerated.
15621
15622 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15623 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15624 (thread_db_init): Call thread_db_err_str.
15625 * configure.ac: Check for TD_VERSION.
15626 * config.in, configure: Regenerated.
15627
bee0189a
DJ
156282005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15629
15630 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15631
e9d25b98
DJ
156322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15633
15634 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15635 is not available. Define HAVE_PTRACE_GETREGS if it is.
15636 * config.in, configure: Regenerated.
15637 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15638 * linux-i386-low.c, linux-m68k-low.c: Update to use
15639 HAVE_PTRACE_GETREGS.
15640 * linux-low.c (regsets_fetch_inferior_registers)
15641 (regsets_store_inferior_registers): Only return 0 if we processed
15642 GENERAL_REGS.
15643 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15644 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15645
a06660f7
DJ
156462005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15647
15648 * inferiors.c (struct thread_info): Add gdb_id.
15649 (add_thread): Add gdb_id argument.
15650 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15651 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15652 calls to add_thread.
15653 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15654 * server.c (handle_query): Use thread_to_gdb_id.
15655 (handle_v_cont, main): Use gdb_id_to_thread_id.
15656 * server.h (add_thread): Update prototype.
15657 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15658 prototypes.
15659
5a1f5858
DJ
156602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15663 left-padded registers.
15664 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15665 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15666
e122f1f5
SE
156672005-07-01 Steve Ellcey <sje@cup.hp.com>
15668
15669 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15670 * configure: Regenerate.
15671 * config.in: Regenerate.
15672 * server.h (NEED_DECLARATION_STRERROR):
15673 Replace with !HAVE_DECL_STRERROR.
15674
d592fa2f
DJ
156752005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * linux-low.c (linux_wait, linux_send_signal): Don't test
15678 an unsigned long variable for > 0 if it could be MAX_ULONG.
15679 * server.c (myresume): Likewise.
15680 * target.c (set_desired_inferior): Likewise.
15681
ccbd4912
MK
156822005-06-13 Mark Kettenis <kettenis@gnu.org>
15683
15684 * configure.ac: Simplify and improve check for socklen_t.
15685 * configure, config.in: Regenerate.
15686
f450004a
DJ
156872005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15688
15689 * acconfig.h: Remove.
15690 * configure.ac: Add a test for socklen_t. Use three-argument
15691 AC_DEFINE throughout.
15692 * config.in: Regenerated using autoheader 2.59.
15693 * configure: Regenerated.
15694
15695 * gdbreplay.c (socklen_t): Provide a default.
15696 (remote_open): Use socklen_t.
15697 * remote-utils.c (socklen_t): Provide a default.
15698 (remote_open): Use socklen_t.
15699 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15700 unsigned char.
15701
15702 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15703 char for buffers.
15704 * linux-low.c (linux_read_memory, linux_write_memory)
15705 (linux_read_auxv): Likewise.
15706 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15707 (check_mem_write): Likewise.
15708 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15709 Likewise.
15710 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15711 (registers_from_string, register_data): Likewise.
15712 * server.c (handle_query, main): Likewise.
15713 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15714 (decode_M_packet): Likewise.
15715 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15716 * target.h (struct target_ops): Update read_memory, write_memory,
15717 and read_auxv.
15718 (read_inferior_memory, write_inferior_memory): Update.
15719 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15720 to unsigned char *.
15721 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15722 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15723 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15724 linux-s390-low.c, linux-sh-low.c: Update for changes in
15725 read_inferior_memory and the_low_target->breakpoint.
15726
eee84df1
DJ
157272005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15728
15729 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15730 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15731 * configure.srv: Add powerpc64-*-linux*.
15732 * linux-ppc64-low.c: New file.
15733
45b134e5
OF
157342005-05-23 Orjan Friberg <orjanf@axis.com>
15735
15736 * linux-cris-low.c: New file with support for CRIS.
15737 * linux-crisv32-low.c: Ditto for CRISv32.
15738 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15739 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15740 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15741 reg-crisv32.o, and reg-crisv32.c to make rules.
15742 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15743 recognized targets.
15744
48d93c75
UW
157452005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15746
15747 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15748 of sizeof (PTRACE_XFER_TYPE).
15749 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15750
e013ee27
OF
157512005-05-12 Orjan Friberg <orjanf@axis.com>
15752
889bf7c5 15753 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15754 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15755 pointers for hardware watchpoint support.
15756 * linux-low.h (struct linux_target_ops): Ditto.
15757 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15758 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15759 to linux_target_ops.
15760 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15761 reply packet.
15762 * server.c (main): Recognize 'Z' and 'z' packets.
15763
b0ded00b
UW
157642005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15765
15766 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15767 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15768 (the_low_target): Add new members.
15769
8643e2ad
DJ
157702005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15771
15772 * proc-service.c (ps_lgetregs): Search all_processes instead of
15773 all_threads.
15774
fc620387
DJ
157752005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15776
15777 * server.c (start_inferior): Change return type to int.
15778 (attach_inferior): Change sigptr to int *.
15779 (handle_v_cont, handle_v_requests): Change signal to int *.
15780 (main): Change signal to int.
15781
157822005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15783
15784 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15785 * configure.srv: Add m32r*-*-linux*.
15786 * linux-m32r-low.c: New file.
15787
e0e76420
DJ
157882005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15789
15790 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15791
a1928bad
DJ
157922005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15793
15794 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15795 Take unsigned long arguments for PIDs.
15796 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15797 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15798 (wait_for_sigstop, linux_resume_one_process)
15799 (regsets_fetch_inferior_registers, linux_send_signal)
15800 (linux_read_auxv): Likewise. Update the types of variables holding
15801 PIDs. Update format string specifiers.
15802 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15803 * remote-utils.c (prepare_resume_reply): Likewise.
15804 * server.c (cont_thread, general_thread, step_thread)
15805 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15806 unsigned long.
15807 (handle_query): Update format specifiers.
15808 (handle_v_cont, main): Use strtoul for thread IDs.
15809 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15810 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15811 (general_thread, step_thread, thread_from_wait)
15812 (old_thread_from_wait): Update.
15813 * target.h (struct thread_resume): Use unsigned long for THREAD.
15814 (struct target_ops): Use unsigned long for arguments to attach and
15815 thread_alive.
15816
dcdb98d2
DJ
158172005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15818
15819 * acinclude.m4: Include bfd/bfd.m4 directly.
15820 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15821 <agriffis@toolchain.org>.
15822 * aclocal.m4, configure: Regenerated.
15823
bec39cab
AC
158242005-01-07 Andrew Cagney <cagney@gnu.org>
15825
15826 * configure.ac: Rename configure.in, require autoconf 2.59.
15827 * configure: Re-generate.
15828
434c4c77
DJ
158292004-12-08 Daniel Jacobowitz <dan@debian.org>
15830
15831 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15832 LIBS when finished.
15833 * aclocal.m4: Regenerated.
15834 * configure: Regenerated.
15835
db1d3e1b
AS
158362004-11-21 Andreas Schwab <schwab@suse.de>
15837
15838 * linux-m68k-low.c (m68k_num_gregs): Define.
15839 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15840 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15841 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15842 (m68k_breakpoint_at): New. Add to the_low_target.
15843
15844 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15845 srv_linux_thread_db to yes.
15846
43360365
JB
158472004-10-20 Joel Brobecker <brobecker@gnat.com>
15848
15849 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15850 (ARCH_SET_FS): Likewise.
15851 (ARCH_GET_FS): Likewise.
15852 (ARCH_GET_GS): Likewise.
15853
fd500816
DJ
158542004-10-16 Daniel Jacobowitz <dan@debian.org>
15855
15856 * linux-i386-low.c (ps_get_thread_area): New.
15857 * linux-x86-64-low.c (ps_get_thread_area): New.
15858 * linux-low.c: Include <sys/syscall.h>.
15859 (linux_kill_one_process): Don't kill the first thread here.
15860 (linux_kill): Kill the first thread here.
15861 (kill_lwp): New function.
15862 (send_sigstop, linux_send_signal): Use it.
15863 * proc-service.c: Clean up #ifdefs.
15864 (fpregset_info): Delete.
15865 (ps_lgetregs): Update and enable implementation.
15866 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15867 implementations.
15868 * remote-utils.c (struct sym_cache, symbol_cache): New.
15869 (input_interrupt): Print a clearer message.
15870 (async_io_enabled): New variable.
15871 (enable_async_io, disable_async_io): Use it. Update comments.
15872 (look_up_one_symbol): Use the symbol cache.
15873 * thread-db.c (thread_db_look_up_symbols): New function.
15874 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15875
f6de3c42
DJ
158762004-10-16 Daniel Jacobowitz <dan@debian.org>
15877
15878 * configure.in: Test for -rdynamic.
15879 * configure: Regenerated.
15880 * Makefile (INTERNAL_LDFLAGS): New.
15881 (gdbserver, gdbreplay): Use it.
15882
2c0fc042
AC
158832004-09-02 Andrew Cagney <cagney@gnu.org>
15884
15885 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15886
075b3282
DJ
158872004-03-23 Daniel Jacobowitz <drow@mvista.com>
15888
15889 * linux-low.c (linux_wait): Clear all_processes list also.
15890
fa6a77dc
DJ
158912004-03-12 Daniel Jacobowitz <drow@mvista.com>
15892
15893 * linux-low.c: Include <errno.h>. Remove extern declaration of
15894 errno.
15895
6d782a97
DJ
158962004-03-12 Daniel Jacobowitz <drow@mvista.com>
15897
15898 * gdbreplay.c, server.h, utils.c: Update copyright years.
15899
3a7fb99b
DJ
159002004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15901
15902 * server.c (main): Print child status or termination signal from
15903 variable 'signal', not 'sig'.
15904
c3e735a6
DJ
159052004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15906
15907 * linux-low.c (linux_read_memory): Change return type to
15908 int. Check for and return error from ptrace().
15909 * target.c (read_inferior_memory): Change return type to int. Pass
15910 back return status from the_target->read_memory().
15911 * target.h (struct target_ops): Adapt *read_memory() prototype.
15912 Update comment.
15913 (read_inferior_memory): Adapt prototype.
15914 * server.c (main): Return an error packet if
15915 read_inferior_memory() returns an error.
15916
a59d1c82
DJ
159172004-03-04 Daniel Jacobowitz <drow@mvista.com>
15918
15919 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15920 Unify with other clean targets.
15921
dc3f8883
DJ
159222004-02-29 Daniel Jacobowitz <drow@mvista.com>
15923
15924 * server.c (handle_v_cont): Call set_desired_inferior.
15925
89a208da
DJ
159262004-02-29 Daniel Jacobowitz <drow@mvista.com>
15927
15928 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15929
62ea82f5
DJ
159302004-02-29 Daniel Jacobowitz <drow@mvista.com>
15931
15932 * linux-low.c (linux_wait): Unblock async I/O.
15933 (linux_resume): Block and enable async I/O.
15934 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15935 * server.h (block_async_io, unblock_async_io): Add prototypes.
15936
6910d122
DJ
159372004-02-29 Daniel Jacobowitz <drow@mvista.com>
15938
15939 * remote-utils.c (remote_open): Print a status notice after
15940 opening a TCP port.
15941 * server.c (attach_inferior): Print a status notice after
15942 attaching.
15943
159442004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15945
15946 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15947
c89dc5d4
DJ
159482004-02-26 Daniel Jacobowitz <drow@mvista.com>
15949
15950 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15951 error packet.
15952 * server.c, target.h: Update copyright years.
15953
4b8dad4a
RM
159542004-02-25 Roland McGrath <roland@redhat.com>
15955
15956 * target.h (struct target_ops): New member `read_auxv'.
15957 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15958 * linux-low.c (linux_read_auxv): New function.
15959 (linux_target_ops): Initialize `read_auxv' member to that.
15960
d7446758
JB
159612004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15962
15963 Committed by Jim Blandy <jimb@redhat.com>.
15964
15965 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15966 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15967 instead of GPR_SIZE to distiguish s390 and s390x targets.
15968
5544ad89
DJ
159692004-01-31 Daniel Jacobowitz <drow@mvista.com>
15970
15971 * linux-low.c: Update copyright year.
15972 (check_removed_breakpoint): Clear pending_is_breakpoint.
15973 (linux_set_resume_request, linux_queue_one_thread)
15974 (resume_status_pending_p): New functions.
15975 (linux_continue_one_thread): Use process->resume.
15976 (linux_resume): Only resume threads if there are no pending events.
15977 * linux-low.h (struct process_info): Add resume request
15978 pointer.
15979
2a68b70e
DJ
159802004-01-30 Daniel Jacobowitz <drow@mvista.com>
15981
15982 * regcache.c (new_register_cache): Clear the allocated register
15983 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15984
64386c31
DJ
159852003-10-13 Daniel Jacobowitz <drow@mvista.com>
15986
15987 * linux-low.c (linux_resume): Take a struct thread_resume *
15988 argument.
15989 (linux_wait): Update call.
15990 (resume_ptr): New static variable.
15991 (linux_continue_one_thread): Renamed from
15992 linux_continue_one_process. Use resume_ptr.
15993 (linux_resume): Use linux_continue_one_thread.
15994 * server.c (handle_v_cont, handle_v_requests): New functions.
15995 (myresume): New function.
15996 (main): Handle 'v' case.
15997 * target.h (struct thread_resume): New type.
15998 (struct target_ops): Change argument of "resume" to struct
15999 thread_resume *.
16000 (myresume): Delete macro.
16001
c938e9b0
L
160022003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16003
16004 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16005 (uninstall): Support DESTDIR.
16006
7f313d07
BC
16007Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16008
16009 * configure.srv: Add xscale*linux copy of arm*linux entry.
16010
3b2fc2ea
DJ
160112003-07-24 Daniel Jacobowitz <drow@mvista.com>
16012
16013 * linux-arm-low.c (arm_reinsert_addr): New function.
16014 (the_low_target): Add arm_reinsert_addr.
16015
1c0a559e
MK
160162003-07-08 Mark Kettenis <kettenis@gnu.org>
16017
16018 * mem-break.c: Remove whitespace at end of file.
16019
43d5792c
DJ
160202003-06-28 Daniel Jacobowitz <drow@mvista.com>
16021
16022 * configure.in: Check whether we need to prototype strerror.
16023 * server.h: Optionally prototype strerror.
16024 * gdbreplay.c (perror_with_name): Use strerror.
16025 * linux-low.c (linux_attach_lwp): Use strerror.
16026 * utils.c (perror_with_name): Use strerror.
16027 * config.in, configure: Regenerated.
16028
c8a86edf
DJ
160292003-06-28 Daniel Jacobowitz <drow@mvista.com>
16030
16031 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16032 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16033
73d37363
DJ
160342003-06-20 Daniel Jacobowitz <drow@mvista.com>
16035
16036 * Makefile.in (SFILES): Update.
16037 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16038 low-sun3.c: Remove files.
16039
6ad8ae5c
DJ
160402003-06-17 Daniel Jacobowitz <drow@mvista.com>
16041
16042 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16043 (linux_detach_one_process, linux_detach): New functions.
16044 (linux_target_ops): Add linux_detach.
16045 * server.c (main): Handle 'D' packet.
16046 * target.h (struct target_ops): Add "detach" member.
16047 (detach_inferior): Define.
16048
1581182a
MK
160492003-06-13 Mark Kettenis <kettenis@gnu.org>
16050
16051 From Kelley Cook <kelleycook@wideopenwest.com>:
16052 * configure.srv: Accept i[34567]86 variants.
16053
e5379b03
DJ
160542003-06-05 Daniel Jacobowitz <drow@mvista.com>
16055
16056 * linux-low.c (linux_wait_for_event): Correct comment typos.
16057 (linux_resume_one_process): Call check_removed_breakpoint.
16058 (linux_send_signal): New function.
16059 (linux_target_ops): Add linux_send_signal.
16060 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16061 of kill.
16062 * target.h (struct target_ops): Add send_signal.
16063
2ff29de4
JB
160642003-05-29 Jim Blandy <jimb@redhat.com>
16065
16066 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16067 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16068 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16069 away part of the register's value.
16070
254787d4
DJ
160712003-03-26 Daniel Jacobowitz <drow@mvista.com>
16072
16073 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16074 (linux_wait_for_event, linux_init_signals): Likewise.
16075
94e10508
DJ
160762003-03-17 Daniel Jacobowitz <drow@mvista.com>
16077
16078 * configure.in: Check for stdlib.h.
16079 * configure: Regenerated.
16080 * config.in: Regenerated.
16081
4c0711e0
DJ
160822003-01-04 Andreas Schwab <schwab@suse.de>
16083
16084 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16085
ef66e766
AC
160862003-01-02 Andrew Cagney <ac131313@redhat.com>
16087
16088 * Makefile.in: Remove obsolete code.
16089
a1358604
DJ
160902002-11-20 Daniel Jacobowitz <drow@mvista.com>
16091
16092 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16093 defined(PT_FPR0_HI).
16094
23ce3b1c
DJ
160952002-11-17 Stuart Hughes <seh@zee2.com>
16096
16097 * linux-arm-low.c (arm_num_regs): Increase.
16098 (arm_regmap): Include status register.
16099
161002002-11-17 Daniel Jacobowitz <drow@mvista.com>
16101
16102 * linux-low.c (register_addr): Remove incorrect -1 check.
16103
a9fa9f7d
DJ
161042002-08-29 Daniel Jacobowitz <drow@mvista.com>
16105
16106 * linux-low.c (linux_create_inferior): Call setpgid. Return
16107 the new PID.
16108 (unstopped_p, linux_signal_pid): Remove.
16109 (linux_target_ops): Remove linux_signal_pid.
16110 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16111 global instead of target method.
16112 * target.h (struct target_ops): Remove signal_pid. Update comment
16113 for create_inferior.
16114 * server.c (signal_pid): New variable.
16115 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16116 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16117 (attach_inferior): Set signal_pid.
16118
17574093
DJ
161192002-08-23 Daniel Jacobowitz <drow@mvista.com>
16120
16121 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16122
161232002-08-20 Jim Blandy <jimb@redhat.com>
16124
16125 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16126 default for this.
16127
161282002-08-01 Andrew Cagney <cagney@redhat.com>
16129
16130 * Makefile.in: Make chill references obsolete.
16131
161322002-07-24 Kevin Buettner <kevinb@redhat.com>
16133
16134 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16135 * configure: Regenerate.
16136 * config.in: Regenerate.
16137
161382002-07-09 David O'Brien <obrien@FreeBSD.org>
16139
16140 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16141 (perror_with_name, remote_close, remote_open, expect, play): Static.
16142
161432002-07-04 Michal Ludvig <mludvig@suse.cz>
16144
4b8dad4a 16145 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16146 byte offsets instead of an array of indexes.
16147 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16148
161492002-06-13 Daniel Jacobowitz <drow@mvista.com>
16150
16151 * regcache.c: Add comment.
16152
161532002-06-11 Daniel Jacobowitz <drow@mvista.com>
16154
16155 * thread-db.c: New file.
16156 * proc-service.c: New file.
16157 * acinclude.m4: New file.
16158 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16159 proc-service.o, and thread-db.o.
16160 (linux-low.o): Add USE_THREAD_DB.
16161 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16162 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16163 * aclocal.m4: Regenerated.
16164 * config.in: Regenerated.
16165 * configure: Regenerated.
16166 * configure.in: Check for proc_service.h, sys/procfs.h,
16167 thread_db.h, and linux/elf.h headrs.
16168 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16169 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16170 Check for -lthread_db and thread support.
16171 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16172 PowerPC, and SuperH.
16173 * i387-fp.c: Constify arguments.
16174 * i387-fp.h: Likewise.
16175 * inferiors.c: (struct thread_info): Renamed from
16176 `struct inferior_info'. Remove PID member. Use generic inferior
16177 list header. All uses updated.
16178 (inferiors, signal_pid): Removed.
16179 (all_threads): New variable.
16180 (get_thread): Define.
16181 (add_inferior_to_list): New function.
16182 (for_each_inferior): New function.
16183 (change_inferior_id): New function.
16184 (add_inferior): Removed.
16185 (remove_inferior): New function.
16186 (add_thread): New function.
16187 (free_one_thread): New function.
16188 (remove_thread): New function.
16189 (clear_inferiors): Use for_each_inferior and free_one_thread.
16190 (find_inferior): New function.
16191 (find_inferior_id): New function.
16192 (inferior_target_data): Update argument type.
16193 (set_inferior_target_data): Likewise.
16194 (inferior_regcache_data): Likewise.
16195 (set_inferior_regcache_data): Likewise.
16196 * linux-low.c (linux_bp_reinsert): Remove.
16197 (all_processes, stopping_threads, using_thrads)
16198 (struct pending_signals, debug_threads, pid_of): New.
16199 (inferior_pid): Replace with macro.
16200 (struct inferior_linux_data): Remove.
16201 (get_stop_pc, add_process): New functions.
16202 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16203 Use add_process and add_thread.
16204 (linux_attach_lwp): New function, based on old linux_attach. Use
16205 add_process and add_thread. Set stop_expected for new threads.
16206 (linux_attach): New function.
16207 (linux_kill_one_process): New function.
16208 (linux_kill): Kill all LWPs.
16209 (linux_thread_alive): Use find_inferior_id.
16210 (check_removed_breakpoints, status_pending_p): New functions.
16211 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16212 Update. Use WNOHANG. Wait for cloned processes also. Update process
16213 struct for the found process.
16214 (linux_wait_for_event): New function.
16215 (linux_wait): Use it. Support LWPs.
16216 (send_sigstop, wait_for_sigstop, stop_all_processes)
16217 (linux_resume_one_process, linux_continue_one_process): New functions.
16218 (linux_resume): Support LWPs.
16219 (REGISTER_RAW_SIZE): Remove.
16220 (fetch_register): Use register_size instead. Call supply_register.
16221 (usr_store_inferior_registers): Likewise. Call collect_register.
16222 Fix recursive case.
16223 (regsets_fetch_inferior_registers): Improve error message.
16224 (regsets_store_inferior_registers): Add debugging.
16225 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16226 (unstopped_p, linux_signal_pid): New functions.
16227 (linux_target_ops): Add linux_signal_pid.
16228 (linux_init_signals): New function.
16229 (initialize_low): Call it. Initialize using_threads.
16230 * regcache.c (inferior_regcache_data): Add valid
16231 flag.
16232 (get_regcache): Fetch registers lazily. Add fetch argument
16233 and update all callers.
16234 (regcache_invalidate_one, regcache_invalidate): New
16235 functions.
16236 (new_register_cache): Renamed from create_register_cache.
16237 Return the new regcache.
16238 (free_register_cache): Change argument to a void *.
16239 (registers_to_string, registers_from_string): Call get_regcache
16240 with fetch flag set.
16241 (register_data): Make static. Pass fetch flag to get_regcache.
16242 (supply_register): Call get_regcache with fetch flag clear.
16243 (collect_register): Call get_regcache with fetch flag set.
16244 (collect_register_as_string): New function.
16245 * regcache.h: Update.
16246 * remote-utils.c (putpkt): Flush after debug output and use
16247 stderr.
16248 Handle input interrupts while waiting for an ACK.
16249 (input_interrupt): Use signal_pid method.
16250 (getpkt): Flush after debug output and use stderr.
16251 (outreg): Use collect_register_as_string.
16252 (new_thread_notify, dead_thread_notify): New functions.
16253 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16254 and general_thread.
16255 (look_up_one_symbol): Flush after debug output.
16256 * server.c (step_thread, server_waiting): New variables.
16257 (start_inferior): Don't use signal_pid. Update call to mywait.
16258 (attach_inferior): Update call to mywait.
16259 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16260 (main): Don't fetch/store registers explicitly. Use
16261 set_desired_inferior. Support proposed ``Hs'' packet. Update
16262 calls to mywait.
16263 * server.h: Update.
16264 (struct inferior_list, struct_inferior_list_entry): New.
16265 * target.c (set_desired_inferior): New.
16266 (write_inferior_memory): Constify.
16267 (mywait): New function.
16268 * target.h: Update.
16269 (struct target_ops): New signal_pid method.
16270 (mywait): Removed macro, added prototype.
16271
16272 * linux-low.h (regset_func): Removed.
16273 (regset_fill_func, regset_store_func): New.
16274 (enum regset_type): New.
16275 (struct regset_info): Add type field. Use new operation types.
16276 (struct linux_target_ops): stop_pc renamed to get_pc.
16277 Add decr_pc_after_break and breakpoint_at.
16278 (get_process, get_thread_proess, get_process_thread)
16279 (strut process_info, all_processes, linux_attach_lwp)
16280 (thread_db_init): New.
16281
16282 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16283 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16284 (the_low_target): Add new members.
16285 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16286 (i386_store_fpxregset): Constify.
16287 (target_regsets): Add new kind identifier.
16288 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16289 (i386_set_pc): Add debugging.
16290 (i386_breakpoint_at): New function.
16291 (the_low_target): Add new members.
16292 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16293 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16294 (mips_breakpoint_at): New.
16295 (the_low_target): Add new members.
16296 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16297 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16298 (the_low_target): Add new members.
16299 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16300 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16301 (the_low_target): Add new members.
16302 * linux-x86-64-low.c (target_regsets): Add new kind
16303 identifier.
16304
163052002-05-15 Daniel Jacobowitz <drow@mvista.com>
16306
16307 From Martin Pool <mbp@samba.org>:
16308 * server.c (gdbserver_usage): New function.
16309 (main): Call it.
16310
163112002-05-14 Daniel Jacobowitz <drow@mvista.com>
16312
16313 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16314 stop_at -> stop_pc.
16315
163162002-05-04 Andrew Cagney <ac131313@redhat.com>
16317
16318 * Makefile.in: Remove obsolete code.
16319
163202002-04-24 Michal Ludvig <mludvig@suse.cz>
16321
16322 * linux-low.c (regsets_fetch_inferior_registers),
16323 (regsets_store_inferior_registers): Removed cast to int from
16324 ptrace() calls.
16325 * regcache.h: Added declaration of struct inferior_info.
16326
163272002-04-20 Daniel Jacobowitz <drow@mvista.com>
16328
16329 * inferiors.c (struct inferior_info): Add regcache_data.
16330 (add_inferior): Call create_register_cache.
16331 (clear_inferiors): Call free_register_cache.
16332 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16333 * regcache.c (struct inferior_regcache_data): New.
16334 (registers): Remove.
16335 (get_regcache): New function.
16336 (create_register_cache, free_register_cache): New functions.
16337 (set_register_cache): Don't initialize the register cache here.
16338 (registers_to_string, registers_from_string, register_data): Call
16339 get_regcache.
16340 * regcache.h: Add prototypes.
16341 * server.h: Likewise.
16342
163432002-04-20 Daniel Jacobowitz <drow@mvista.com>
16344
16345 * mem-break.c: New file.
16346 * mem-break.h: New file.
16347 * Makefile.in: Add mem-break.o rule; update server.h
16348 dependencies.
16349 * inferiors.c (struct inferior_info): Add target_data
16350 member.
16351 (clear_inferiors): Free target_data member if set.
16352 (inferior_target_data, set_inferior_target_data): New functions.
16353 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16354 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16355 * linux-low.c (linux_bp_reinsert): New variable.
16356 (struct inferior_linux_data): New.
16357 (linux_create_inferior): Use set_inferior_target_data.
16358 (linux_attach): Likewise. Call add_inferior.
16359 (linux_wait_for_one_inferior): New function.
16360 (linux_wait): Call it.
16361 (linux_write_memory): Add const.
16362 (initialize_low): Call set_breakpoint_data.
16363 * linux-low.h (struct linux_target_ops): Add breakpoint
16364 handling members.
16365 * server.c (attach_inferior): Remove extra add_inferior
16366 call.
16367 * server.h: Include mem-break.h. Update inferior.c
16368 prototypes.
16369 * target.c (read_inferior_memory)
16370 (write_inferior_memory): New functions.
16371 * target.h (read_inferior_memory)
16372 (write_inferior_memory): Change macros to prototypes.
16373 (struct target_ops): Update comments. Add const to write_memory
16374 definition.
16375
163762002-04-11 Daniel Jacobowitz <drow@mvista.com>
16377
16378 * linux-low.c (usr_store_inferior_registers): Support
16379 registers which are allowed to fail to store.
16380 * linux-low.h (linux_target_ops): Likewise.
16381 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16382 (ppc_cannot_store_register): FPSCR may not be storable.
16383
163842002-04-09 Daniel Jacobowitz <drow@mvista.com>
16385
16386 * server.h: Include <string.h> if HAVE_STRING_H.
16387 * ChangeLog: Correct paths in last ChangeLog entry.
16388
163892002-04-09 Daniel Jacobowitz <drow@mvista.com>
16390
16391 * linux-low.h: Remove obsolete prototypes.
16392 (struct linux_target_ops): New.
16393 (extern the_low_target): New.
16394 * linux-low.c (num_regs, regmap): Remove declarations.
16395 (register_addr): Use the_low_target explicitly.
16396 (fetch_register): Likewise.
16397 (usr_fetch_inferior_registers): Likewise.
16398 (usr_store_inferior_registers): Likewise.
16399 * linux-arm-low.c (num_regs): Remove.
16400 (arm_num_regs): Define.
16401 (arm_regmap): Renamed from regmap, made static.
16402 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16403 made static.
16404 (arm_cannot_store_register): Renamed from cannot_store_register,
16405 made static.
16406 (the_low_target): New.
16407 * linux-i386-low.c (num_regs): Remove.
16408 (i386_num_regs): Define.
16409 (i386_regmap): Renamed from regmap, made static.
16410 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16411 made static.
16412 (i386_cannot_store_register): Renamed from cannot_store_register,
16413 made static.
16414 (the_low_target): New.
16415 * linux-ia64-low.c (num_regs): Remove.
16416 (ia64_num_regs): Define.
16417 (ia64_regmap): Renamed from regmap, made static.
16418 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16419 made static.
16420 (ia64_cannot_store_register): Renamed from cannot_store_register,
16421 made static.
16422 (the_low_target): New.
16423 * linux-m68k-low.c (num_regs): Remove.
16424 (m68k_num_regs): Define.
16425 (m68k_regmap): Renamed from regmap, made static.
16426 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16427 made static.
16428 (m68k_cannot_store_register): Renamed from cannot_store_register,
16429 made static.
16430 (the_low_target): New.
16431 * linux-mips-low.c (num_regs): Remove.
16432 (mips_num_regs): Define.
16433 (mips_regmap): Renamed from regmap, made static.
16434 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16435 made static.
16436 (mips_cannot_store_register): Renamed from cannot_store_register,
16437 made static.
16438 (the_low_target): New.
16439 * linux-ppc-low.c (num_regs): Remove.
16440 (ppc_num_regs): Define.
16441 (ppc_regmap): Renamed from regmap, made static.
16442 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16443 made static.
16444 (ppc_cannot_store_register): Renamed from cannot_store_register,
16445 made static.
16446 (the_low_target): New.
16447 * linux-s390-low.c (num_regs): Remove.
16448 (s390_num_regs): Define.
16449 (s390_regmap): Renamed from regmap, made static.
16450 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16451 made static.
16452 (s390_cannot_store_register): Renamed from cannot_store_register,
16453 made static.
16454 (the_low_target): New.
16455 * linux-sh-low.c (num_regs): Remove.
16456 (sh_num_regs): Define.
16457 (sh_regmap): Renamed from regmap, made static.
16458 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16459 made static.
16460 (sh_cannot_store_register): Renamed from cannot_store_register,
16461 made static.
16462 (the_low_target): New.
16463 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16464 (the_low_target): New.
16465
164662002-04-09 Daniel Jacobowitz <drow@mvista.com>
16467
16468 * Makefile.in: Add stamp-h target.
16469 * configure.in: Create stamp-h.
16470 * configure: Regenerated.
16471
164722002-04-09 Daniel Jacobowitz <drow@mvista.com>
16473
16474 * inferiors.c: New file.
16475 * target.c: New file.
16476 * target.h: New file.
16477 * Makefile.in: Add target.o and inferiors.o. Update
16478 dependencies.
16479 * linux-low.c (inferior_pid): New static variable,
16480 moved from server.c.
16481 (linux_create_inferior): Renamed from create_inferior.
16482 Call add_inferior. Return 0 on success instead of a PID.
16483 (linux_attach): Renamed from myattach.
16484 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16485 (linux_thread_alive): Renamed from mythread_alive.
16486 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16487 child dies.
16488 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16489 (regsets_store_inferior_registers): Correct error message.
16490 Add missing ``return 0''.
16491 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16492 (linux_store_registers): Renamed from store_inferior_registers.
16493 (linux_read_memory): Renamed from read_inferior_memory.
16494 (linux_write_memory): Renamed from write_inferior_memory.
16495 (linux_target_ops): New structure.
16496 (initialize_low): Call set_target_ops ().
16497 * remote-utils.c (unhexify): New function.
16498 (hexify): New function.
16499 (input_interrupt): Send signals to ``signal_pid''.
16500 * server.c (inferior_pid): Remove.
16501 (start_inferior): Update create_inferior call.
16502 (attach_inferior): Call add_inferior.
16503 (handle_query): New function.
16504 (main): Call handle_query for `q' packets.
16505 * server.h: Include "target.h". Remove obsolete prototypes.
16506 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16507
165082002-04-09 Daniel Jacobowitz <drow@mvista.com>
16509
16510 * Makefile.in: Add WARN_CFLAGS. Update configury
16511 dependencies.
16512 * configure.in: Check for <string.h>
16513 * configure: Regenerate.
16514 * config.in: Regenerate.
16515 * gdbreplay.c: Include needed system headers.
16516 (remote_open): Remove strchr prototype.
16517 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16518 * regcache.c (supply_register): Change buf argument to const void *.
16519 (supply_register_by_name): Likewise.
16520 (collect_register): Change buf argument to void *.
16521 (collect_register_by_name): Likewise.
16522 * regcache.h: Add missing prototypes.
16523 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16524 * server.c (handle_query): New function.
16525 (attached): New static variable, moved out of main.
16526 (main): Quiet longjmp clobber warnings.
16527 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16528 * utils.c (error): Remove NORETURN.
16529 (fatal): Likewise.
This page took 3.001484 seconds and 4 git commands to generate.