binutils-gdb.git
12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:11:23 +0000 (21:11 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* common/signals.c (default_target_signal_to_host)
(default_target_signal_from_host): Move ...
* arch-utils.c: ... here.
* arch-utils.h (default_target_signal_to_host)
(default_target_signal_from_host): Declare.

* common/signals.c (target_signal_from_command): Move ...
* infrun.c: ... here.
* inferior.h (target_signal_from_command): Declare.
* target.h (target_signal_from_command)
(default_target_signal_from_host, default_target_signal_to_host):
Delete declarations.

* common/signals.c (_initialize_signals): Delete.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:09:55 +0000 (21:09 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* jit-reader.in (plugin_is_GPL_compatible): Add declarations for
both __cplusplus and !__cplusplus.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:09:16 +0000 (21:09 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* psymtab.c (find_and_open_source): Delete declaration.
* source.c (find_and_open_source): Move comment ...
* source.h (find_and_open_source): ... to this new declaration.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:08:37 +0000 (21:08 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* inline-frame.c: Include inline-frame.h.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:08:07 +0000 (21:08 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* tui/tui-data.c (set_gen_win_origin): Delete.
* tui/tui-data.h (tui_set_gen_win_origin): Delete declaration.
* tui/tui-regs.c (tui_last_reg_element_no_in_line): Delete.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:07:31 +0000 (21:07 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* remote.c (encode_actions): Delete declaration.
* tracepoint.c (encode_actions): Make extern.
* tracepoint.h (encode_actions): Declare.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:06:54 +0000 (21:06 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* python/py-breakpoint.c: Include python.h.
* python/py-continueevent.c (create_continue_event_object): Make
static.
* python/py-lazy-string.c (stpy_get_type): Make static.
* python/py-newobjfileevent.c (create_new_objfile_event_object):
Make static.
* python/py-utils.c (unicode_to_target_python_string): Make
static.
* python/py-value.c: Include python.h.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:06:14 +0000 (21:06 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* inferior.c (delete_threads_of_inferior): Delete.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:05:31 +0000 (21:05 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

Import fallback definitions from glibc.

* gdb_proc_service.h [!HAVE_PROC_SERVICE_H] (struct
ps_prochandle): Forward declare.
(ps_err_e): Use glibc's comments.
[!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
(ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
(ps_lsetfpregs, ps_getpid, ps_get_thread_area, ps_pglobal_lookup)
(ps_pstop, ps_pcontinue, ps_lstop, ps_lcontinue, ps_lgetxregsize)
(ps_lgetxregs, ps_lsetxregs, ps_plog): Declare.
(struct ps_prochandle): Adjust comment.

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 21:03:15 +0000 (21:03 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

* ada-lang.c (ada_modulus_from_name): Delete.
* ada-lex.l (lexer_init): Make static.

12 years ago * gdb.base/hbreak2.exp: New test for "hbreak" and "thbreak".
Maciej W. Rozycki [Thu, 1 Mar 2012 21:01:11 +0000 (21:01 +0000)]
* gdb.base/hbreak2.exp: New test for "hbreak" and "thbreak".

12 years ago2012-03-01 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 1 Mar 2012 20:49:02 +0000 (20:49 +0000)]
2012-03-01  Pedro Alves  <palves@redhat.com>

PR gdb/13767

gdb/
* frame.c (read_frame_register_unsigned): New.
* frame.h (read_frame_register_unsigned): Declare.
* i387-tdep.c (print_i387_status_word): New parameter `status_p'.
Handle it.
(print_i387_control_word): New parameter `control_p'.  Handle it.
(i387_print_float_info): Handle unavailable float registers.

gdb/testsuite/
* gdb.trace/unavailable.exp (gdb_unavailable_floats): New.
(gdb_collect_globals_test): Call it.

12 years ago * gdb.cp/method2.exp: Output of overload menu is now
Keith Seitz [Thu, 1 Mar 2012 20:34:13 +0000 (20:34 +0000)]
* gdb.cp/method2.exp: Output of overload menu is now
alphabetized.  Update tests for "break A::method".
* gdb.cp/ovldbreak.exp: Use gdb_get_line_number instead
of hard-coding them.
Overload menu is alphabetized: rewrite to accommodate.
Unset variables LINE and TYPES which are used in other tests.
Compute the output of "info break".
Update the breakpoint table after all breakpoints are deleted.
(continue_to_bp_overloaded): Rename ACTUALS to ARGUMENT and
compute ACTUALS and the method body based on parameters.
Update expected output accordingly.
* gdb.cp/ovldbreak.cc (foo::overload1arg): Reformat and add
unique comments to allow the use of gdb_get_line_number.

* gdb.cp/method2.exp: Use prepare_for_testing and cleanup
some Tcl syntax.
* gdb.cp/ovldbreak.exp: Likewise.

12 years ago * linespec.c (decode_line_2): Sort the list of methods
Keith Seitz [Thu, 1 Mar 2012 20:33:09 +0000 (20:33 +0000)]
* linespec.c (decode_line_2): Sort the list of methods
alphabetically before presenting the user with a selection
menu.

12 years ago * gdb.base/help.exp (help show user): Update expected result
Keith Seitz [Thu, 1 Mar 2012 20:25:50 +0000 (20:25 +0000)]
* gdb.base/help.exp (help show user): Update expected result
for new doc string changes (add "non-python").

12 years ago * dwarf2read.c (dwarf2_cu): Remove unused members has_form_ref_addr,
Doug Evans [Thu, 1 Mar 2012 19:55:35 +0000 (19:55 +0000)]
* dwarf2read.c (dwarf2_cu): Remove unused members has_form_ref_addr,
has_namespace_info.
(dwarf2_read_abbrevs): Remove corresponding initialization.

12 years ago * NEWS: Mention new python command class gdb.COMMAND_USER.
Doug Evans [Thu, 1 Mar 2012 19:30:25 +0000 (19:30 +0000)]
* NEWS: Mention new python command class gdb.COMMAND_USER.
* cli/cli-cmds.c (show_user): Print error when used on a python
command.
(init_cli_cmds): Update documentation strings for "show user" and
"set/show max-user-call-depth" to clarify that it does not apply to
python commands.
* python/py-cmd.c (cmdpy_init): Treat class_user as a valid class in
error check.
(gdbpy_initialize_commands): Add COMMAND_USER as a constant in
gdb python api.
* top.c (execute_command): Only execute a user-defined command as a
legacy macro if c->user_commands is set.

doc/
* gdb.texinfo (Commands In Python): Put example python macro in
COMMAND_USER category rather than COMMAND_OBSCURE.
Document gdb.COMMAND_USER.
(User-defined Commands): Update documentation to clarify
"set/show max-user-call-depth" and "show user" don't apply to python
commands.  Update documentation to clarify "help user-defined" may
also include python commands defined as COMMAND_USER.

testsuite/
* gdb.python/py-cmd.exp: Add test to verify that python commands can
be put in the user-defined category and that the commands appear in
"help user-defined".

12 years ago * valprint.h (struct generic_val_print_decorations): New.
Tom Tromey [Thu, 1 Mar 2012 19:27:18 +0000 (19:27 +0000)]
* valprint.h (struct generic_val_print_decorations): New.
(generic_val_print): Declare.
* valprint.c (generic_val_print): New function.
* p-valprint.c (p_decorations): New global.
(pascal_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM,
TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_RANGE, TYPE_CODE_INT,
TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ERROR, TYPE_CODE_UNDEF,
TYPE_CODE_BOOL, TYPE_CODE_CHAR>: Call generic_val_print.
* m2-valprint.c (m2_decorations): New global.
(m2_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FUNC,
TYPE_CODE_BOOL, TYPE_CODE_RANGE, TYPE_CODE_INT, TYPE_CODE_CHAR,
TYPE_CODE_FLT, TYPE_CODE_METHOD, TYPE_CODE_VOID, TYPE_CODE_UNDEF,
TYPE_CODE_ERROR>: Call generic_val_print.
* f-valprint.c (f_decorations): New global.
(f_val_print): Use print_function_pointer_address.
<TYPE_CODE_REF, TYPE_CODE_FUNC, TYPE_CODE_CHAR, TYPE_CODE_FLAGS,
TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ENUM, TYPE_CODE_RANGE,
TYPE_CODE_BOOL, TYPE_CODE_COMPLEX, TYPE_CODE_UNDEF>: Call
generic_val_print.
* c-valprint.c (c_decorations): New global.
(c_val_print) <TYPE_CODE_MEMBERPTR, TYPE_CODE_REF, TYPE_CODE_ENUM,
TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_BOOL,
TYPE_CODE_RANGE, TYPE_CODE_CHAR, TYPE_CODE_FLT,
TYPE_CODE_DECFLOAT, TYPE_CODE_VOID, TYPE_CODE_ERROR,
TYPE_CODE_UNDEF, TYPE_CODE_COMPLEX>: Call generic_val_print.
* ada-valprint.c (ada_val_print_1) <TYPE_CODE_FLAGS>: Remove
case.

12 years ago * valprint.c (val_print): Update.
Tom Tromey [Thu, 1 Mar 2012 19:26:13 +0000 (19:26 +0000)]
* valprint.c (val_print): Update.
* p-valprint (pascal_val_print): Return void.
* p-lang.h (pascal_val_print): Return void.
* m2-valprint.c (m2_val_print): Return void.
* m2-lang.h (m2_val_print): Return void.
* language.h (struct language_defn) <la_val_print>: Return void.
* language.c (unk_lang_val_print): Return void.
* jv-valprint.c (java_val_print): Return void.
* jv-lang.h (java_val_print): Return void.
* f-valprint.c (f_val_print): Return void.
* f-lang.h (f_val_print): Return void.
* d-valprint.c (d_val_print): Return void.
(dynamic_array_type): Update.
* d-lang.h (d_val_print): Return void.
* c-valprint.c (c_val_print): Return void.
* c-lang.h (c_val_print): Return void.
* ada-valprint.c (ada_vada_val_print, ada_val_print_1): Return
void.
* ada-lang.h (ada_val_print): Return void.

12 years ago * value.h (val_print): Return void.
Tom Tromey [Thu, 1 Mar 2012 19:24:57 +0000 (19:24 +0000)]
* value.h (val_print): Return void.
* valprint.c (val_print): Return void.

12 years ago * value.h (common_val_print): Return void.
Tom Tromey [Thu, 1 Mar 2012 19:23:36 +0000 (19:23 +0000)]
* value.h (common_val_print): Return void.
* valprint.c (common_val_print): Return void.

12 years ago * value.h (value_print): Return void.
Tom Tromey [Thu, 1 Mar 2012 19:22:22 +0000 (19:22 +0000)]
* value.h (value_print): Return void.
* valprint.c (value_print): Return void.
* p-valprint.c (pascal_value_print): Return void.
* p-lang.h (pascal_value_print): Return void.
* language.h (struct language_defn) <la_value_print>: Return
void.
* language.c (unk_lang_value_print): Return void.
* jv-valprint.c (java_value_print): Return void.
* jv-lang.h (java_value_print): Return void.
* f-valprint.c (c_value_print): Don't declare.
Include c-lang.h.
* c-valprint.c (c_value_print): Return void.
* c-lang.h (c_value_print): Return void.
* ada-valprint.c (ada_value_print): Return void.
* ada-lang.h (ada_value_print): Return void.

12 years ago * value.c (value_primitive_field): Handle virtual base classes.
Tom Tromey [Thu, 1 Mar 2012 18:28:16 +0000 (18:28 +0000)]
* value.c (value_primitive_field): Handle virtual base classes.

12 years ago * gdbtypes.h (struct vbase): Remove.
Tom Tromey [Thu, 1 Mar 2012 18:26:13 +0000 (18:26 +0000)]
* gdbtypes.h (struct vbase): Remove.

12 years ago * c-valprint.c (print_function_pointer_address): Move...
Tom Tromey [Thu, 1 Mar 2012 18:25:19 +0000 (18:25 +0000)]
* c-valprint.c (print_function_pointer_address): Move...
* valprint.c: ... here.  Make non-static.
* m2-valprint.c (print_function_pointer_address): Remove.
* valprint.h (print_function_pointer_address): Declare.

12 years ago[NEWS] Document condition at end of catch exception/assert commands
Joel Brobecker [Thu, 1 Mar 2012 18:12:43 +0000 (18:12 +0000)]
[NEWS] Document condition at end of catch exception/assert commands

gdb/ChangeLog:

        * NEWS: Document the fact that one can provide a condition when
        creating an Ada exception catchpoint.

12 years ago * valprint.c (val_print_type_code_flags): Fix placement of
Tom Tromey [Thu, 1 Mar 2012 15:50:16 +0000 (15:50 +0000)]
* valprint.c (val_print_type_code_flags): Fix placement of
trailing brace.

12 years ago PR ld/13789
Hans-Peter Nilsson [Thu, 1 Mar 2012 08:24:10 +0000 (08:24 +0000)]
PR ld/13789
* ld-elf/zerosize1.d: Allow xyzzy to be either OBJECT or NOTYPE.

12 years ago * object.cc (need_decompressed_section): Add #ifdef ENABLE_THREADS.
Cary Coutant [Thu, 1 Mar 2012 07:27:38 +0000 (07:27 +0000)]
* object.cc (need_decompressed_section): Add #ifdef ENABLE_THREADS.

12 years agoDo not set MULTILINE_COMMENT_PREFIXES before calling update-copyright
Joel Brobecker [Thu, 1 Mar 2012 02:41:14 +0000 (02:41 +0000)]
Do not set MULTILINE_COMMENT_PREFIXES before calling update-copyright

This was a local hack to work around a limitation in update-copyright.
But the limitation is now OBE, because the copyright statements should
now always fit on a single line, thanks to the new policy of using
one single year range in the copyright notice.

gdb/ChangeLog:

        * copyright.py (MULTILINE_COMMENT_PREFIXES): Delete.
        (update_files): Do not set MULTILINE_COMMENT_PREFIXES
        environment variable before calling update-copyright.

12 years agoImport gnulib's latest update-copyright script...
Joel Brobecker [Thu, 1 Mar 2012 02:41:04 +0000 (02:41 +0000)]
Import gnulib's latest update-copyright script...

... and update our copyright.py script to set environment variable
UPDATE_COPYRIGHT_USE_INTERVALS to '2' instead of '1'.  This tells
the script to collapse all years into one single interval.

gdb/ChangeLog:

        * gnulib/extra/update-copyright: Update to the latest from
        gnulib's git repository.
        * copyright.py: Set UPDATE_COPYRIGHT_USE_INTERVALS environment
        variable to 2 instead of 1.

12 years agoremove dead code in varobj.c:c_value_of_variable
Joel Brobecker [Thu, 1 Mar 2012 01:59:22 +0000 (01:59 +0000)]
remove dead code in varobj.c:c_value_of_variable

gdb/ChangeLog:

        * varobj.c (c_value_of_variable): Remove dead code.

12 years ago * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
Alan Modra [Thu, 1 Mar 2012 01:55:11 +0000 (01:55 +0000)]
* elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.

12 years ago*** empty log message ***
gdbadmin [Thu, 1 Mar 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Wed, 29 Feb 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
Cary Coutant [Wed, 29 Feb 2012 21:22:29 +0000 (21:22 +0000)]
* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
Call Object::decompressed_section_contents.
* dwarf_reader.h (Sized_dwarf_line_info::~Sized_dwarf_line_info):
New dtor.
(Sized_dwarf_line_info::buffer_start_): New data member.
* merge.cc (Output_merge_data::do_add_input_section): Call
Object::decompressed_section_contents.
(Output_merge_string::do_add_input_section): Likewise.
* object.cc (need_decompressed_section): New function.
(build_compressed_section_map): Decompress sections needed later.
(Sized_relobj_file::do_decompressed_section_contents): New function.
(Sized_relobj_file::do_discard_decompressed_sections): New function.
* object.h (Object::decompressed_section_contents): New function.
(Object::discard_decompressed_sections): New function.
(Object::do_decompressed_section_contents): New function.
(Object::do_discard_decompressed_sections): New function.
(Compressed_section_info): New type.
(Compressed_section_map): Include decompressed section contents.
(Sized_relobj_file::do_decompressed_section_contents): New function.
(Sized_relobj_file::do_discard_decompressed_sections): New function.

12 years ago[Ada] processId: Do not modify already encoded IDs
Joel Brobecker [Wed, 29 Feb 2012 19:53:16 +0000 (19:53 +0000)]
[Ada] processId: Do not modify already encoded IDs

The processID function is supposed to take a symbol name, and process it
in a way that allows us to look that symbol up.  This patch is adding
a guard to make sure that we do not apply any transformation if we detect
that we are given an already-encoded symbol name.  For instance:

    gv___XR_pck__global_variable___XE

This happens in the case where we are trying to print the value of
a renaming. To do this, we simply parse and evaluate the XR symbol
name as an expression. Without this change, the expression parser
transforms gv___XR_pck__global_variable___XE into somethink like
gv___xr_pck__global_variable___xe, which then screws up the rest
of the renaming evaluation.

gdb/ChangeLog:

        * ada-lex.p (processId): Do not modify already encoded IDs.
        Update function documentation.

12 years agoada-lang.c:ada_find_renaming_symbol minor improvement.
Joel Brobecker [Wed, 29 Feb 2012 19:51:49 +0000 (19:51 +0000)]
ada-lang.c:ada_find_renaming_symbol minor improvement.

This is a minor improvement in ada_find_renaming_symbol: What we were
doing was going from a symbol, get its name, and then search for
renamings.  But if the original symbol was already itself a renaming,
then we'd look the symbol up again to return it.  Since we had the
symbol in the first place, we shouldn't need to look it up again.

This is what this patch does: Modify ada_find_renaming_symbol to
take a symbol instead of the symbol's (linkage) name, and then updates
the one caller.

gdb/ChangeLog:

        * ada-lang.h (ada_find_renaming_symbol): Replace parameter
        "name" with "struct symbol *name_sym".
        * ada-exp.y (write_var_or_type): Update call to
        ada_find_renaming_symbol.
        * ada-lang.c (ada_find_renaming_symbol): Replace parameter
        "name" with "struct symbol *name_sym". Adjust Implementation
        accordingly.  Adjust the function documentation.

12 years agoMinor cleanup to a couple of functions in ada-lang.c.
Joel Brobecker [Wed, 29 Feb 2012 19:50:22 +0000 (19:50 +0000)]
Minor cleanup to a couple of functions in ada-lang.c.

gdb/ChangeLog:

        * ada-lang.h (ada_find_any_symbol, ada_find_any_type): Delete.
        * ada-lang.c (ada_find_any_type): Add advance declaration.
        Make static.  Replace ada_find_any_symbol by
        ada_find_any_type_symbol.
        (ada_find_any_type_symbol): Renames ada_find_any_symbol.
        Improve function description.  Make static.
        (ada_find_renaming_symbol, find_old_style_renaming_symbol):
        Replace ada_find_any_symbol by ada_find_any_type_symbol.

12 years ago[Ada] avoid error message pollution with uninitialized tagged variable
Joel Brobecker [Wed, 29 Feb 2012 19:46:48 +0000 (19:46 +0000)]
[Ada] avoid error message pollution with uninitialized tagged variable

Consider the following function...

  3 procedure Foo is
  4    I : Integer := Ident (10);
  5    Obj : Base;
  6 begin
  7    Obj.X := I;
  8    Do_Nothing (Obj.X'Address);
  9 end Foo;

... where type "Base" is defined as a plain tagged record. If the user
stops execution before "Obj" gets initialized (for example, by inserting
a breakpoint "on" the function - or in other words, by inserting a
breakpoint using the function name as the location), one might get
the following of output if you try printing the value of obj:

    (gdb) p obj
    object size is larger than varsize-limit
    object size is larger than varsize-limit
    object size is larger than varsize-limit
    $1 = object size is larger than varsize-limit
    (x => 4204154)

Same thing with "info locals":

   (gdb) info locals
    i = 0
    obj = object size is larger than varsize-limit
    (x => 4204154)

We have also seen different error messages such as "Cannot read
memory at 0x...".

The error happens because we are trying to read the dispatch table
of a tagged type variable before it gets initialized.  So the errors
might legitimately occur, and are supposed to be be contained.
However, the way things are written in ada-lang.c:ada_tag_name,
although the exception is in fact contained, the error message still
gets to be printed out.

This patch prevents this from happening by eliminating the use of
catch_errors, and using a TRY_CATCH block instead.  Doing this removed
the need to use functions specifically fitted for catch_errors, and
thus some other simplifications could me made.  In the end, the code
got reorganized a bit to better show the logic behind it, as well as
the common patterns.

gdb/ChangeLog:

        * ada-lang.c (struct tag_args): Delete.
        (ada_get_tsd_type): Function body moved up in source file.
        (ada_tag_name_1, ada_tag_name_2): Delete.
        (ada_get_tsd_from_tag): New function.
        (ada_tag_name_from_tsd): New function.
        (ada_tag_name): Use a TRY_CATCH block instead of catch_errors
        to determine the tag name.

gdb/testsuite/ChangeLog:

        * gdb.ada/tagged_not_init: New testcase.

12 years ago[Ada] New functions to decode Ada types and values
Joel Brobecker [Wed, 29 Feb 2012 19:44:12 +0000 (19:44 +0000)]
[Ada] New functions to decode Ada types and values

This patch introduces two new functions that will be used to support
the implementation of the ada-varobj effort.  The function descriptions
should say it all...

gdb/ChangeLog:

        * ada-lang.h (ada_get_decoded_value, ada_get_decoded_type): Add
        declaration.
        * ada-lang.c (ada_get_decoded_value, ada_get_decoded_type): New
        function.

12 years ago[Ada] Fix comment in ada-lang.c:ada_is_ignored_field
Joel Brobecker [Wed, 29 Feb 2012 19:37:07 +0000 (19:37 +0000)]
[Ada] Fix comment in ada-lang.c:ada_is_ignored_field

Fix a comment that completly mistunderstood the code...

gdb/ChangeLog:

        * ada-lang.c (ada_is_ignored_field): Rewrite wrong comment.

12 years ago[Ada] Do not cache lookup result if not full_search
Joel Brobecker [Wed, 29 Feb 2012 19:35:37 +0000 (19:35 +0000)]
[Ada] Do not cache lookup result if not full_search

The ada_lookup_symbol_list function has recently been changed to accept
a "full_search" parameter. When null, this parameter instructs the
function to perform a partial search (global and static symbols are not
searched). When doing a partial search, the result should not be saved
into the lookup cache, as the result might be incomplete.

This manifested itself when trying to perform a function call on AVR
after having inserted a breakpoint inside that function:

    (gdb) b same
    Breakpoint 2 at 0x78: file r.adb, line 5.
    (gdb) call same(42)

    Breakpoint 2, r.same (i=42) at r.adb:5
    5             return I;
    The program being debugged stopped while in a function called from GDB.
    Evaluation of the expression containing the function
    (at 0x0x800068) will be abandoned.
    ^^^^^^^^^^^^^^^
    When the function is done executing, GDB will silently stop.

The expected output for the underlined portion is "(r.same)".

What happens is that the breakpoint command triggers 3 lookups of the
name "same":
  1. full search in LABEL_DOMAIN -> no match, cached;
  2. full search in VAR_DOMAIN -> 1 match, cached;
  3. partial search in VAR_DOMAIN -> no match, cached.

The third lookup therefore causes the results of the partial search
to be cached, thus overriding the result of the full search lookup.

During the following command, the reference to "same" triggers a lookup
of that symbol again. And since GDB CAN find the result of that lookup
in the cache, it returns just that, which is: No match. (wrong!)

As a result, we fallback on the symbol table to resolve the lookup.
And instead of pushing an OP_VAR_VALUE subexpression for symbol "same",
the parser ends up pushing an UNOP_MEMVAL subexpression using the value
of the minimal symbol. This is where being on AVR becomes important:
addresses on AVR are modular types, and if GDB thinks an address is
a data address, it converts it.

This is where one notices the fact that the breakpoint was inserted
at 0x78, and yet GDB says that the function we stopped at is at
0x0x800068...

This patch fixes the problem by making sure we only cache the result
of full searches.

gdb/ChangeLog:

        * ada-lang.c (ada_lookup_symbol_list): Only cache the result of
        full searches.

12 years ago[Ada] print packed arrays indexed by enumerated type
Joel Brobecker [Wed, 29 Feb 2012 19:34:40 +0000 (19:34 +0000)]
[Ada] print packed arrays indexed by enumerated type

Consider the following declarations (a packed array indexed by an
enumerated type):

    type Color is (Black, Red, Green, Blue, White);
    type Full_Table is array (Color) of Boolean;
    pragma Pack (Full_Table);
    Full : Full_Table := (False, True, False, True, False);

GDB is unable to print the index values correctly. It prints the
enumeration's underlying value instead of the enumeration name:

    (gdb) p full
    $1 = (0 => false, true, false, true, false)
    (gdb) p full'first
    $2 = 0

And yet, it is capable of printing the correct type description:

    (gdb) ptype full
    type = array (black .. white) of boolean <packed: 1-bit elements>

To get to the real index type, one has to follow the parallel XA type.
We already do this for normal arrays. We can do it for this packed
array as well.

gdb/ChangeLog:

        * ada-lang.c (constrained_packed_array_type): If there is a
        parallel XA type, use it to determine the array index type.

gdb/testsuite/ChangeLog:

        * gdb.ada/arrayidx.exp: Adjust expected output for p_one_two_three.
        * gdb.ada/enum_idx_packed: New testcase.

12 years ago[Ada] Handle reference to array descriptors
Joel Brobecker [Wed, 29 Feb 2012 19:33:02 +0000 (19:33 +0000)]
[Ada] Handle reference to array descriptors

This patch is to help handle aliased array variables, such as:

   type Bounded is array (Integer range <>) of Integer;
   function New_Bounded (Low, High : Integer) return Bounded;
   BT : aliased Bounded := New_Bounded (Low => 1, High => 3);

In that case, the compiler describes variable "BT" as a reference
to a thin pointer, and GDB is unable to print its value:

    (gdb) p bt
    $1 =

The problems starts when ada_value_print deconstructs the struct
value into contents and address in order to call val_print. It
turns out in this case that "bt" is not an lval. In the debug
information, this variable's location is described as:

        .uleb128 0xd    # (DIE (0xe0) DW_TAG_variable)
        .ascii "bt\0"   # DW_AT_name
        [...]
        .byte   0x6     # DW_AT_location
        .byte   0x91    # DW_OP_fbreg
        .sleb128 -56
        .byte   0x6     # DW_OP_deref
        .byte   0x23    # DW_OP_plus_uconst
        .uleb128 0x8
        .byte   0x9f    # DW_OP_stack_value

So, when ada_value_print passes the bt's (value) address, it passes
in effect a meaningless address. The problem continues shortly after
when ada_val_print_1 re-creates the value from the contents and address.
The value has become an lval_memory, with a null address.

As a result, we trigger a memory error later on, while trying to
read the array bounds in order to transform our value into a simple
array.

To avoid the problem entirely, the fix is to coerce references before
transforming array descriptors into simple arrays.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_1): If our value is a reference
        to an array descriptor, dereference it before converting it
        to a simple array.

gdb/testsuite/ChangeLog:

        * gdb.ada/aliased_array: New testcase.

12 years agoAda: ada_to_fixed_value should also unwrap_value
Joel Brobecker [Wed, 29 Feb 2012 19:30:53 +0000 (19:30 +0000)]
Ada: ada_to_fixed_value should also unwrap_value

We should always unwrap a value before trying to "fix" it. It is
therefore logical that ada_to_fixed_value would call unwrap_value
before creating the fixed value.

This simplifies the code in ada-lang.c a bit.

gdb/ChangeLog:

        * ada-lang.c (ada_to_fixed_value): Call unwrap_value before
        creating fixed value.
        (ada_value_ind, ada_coerce_ref, assign_component)
        (ada_evaluate_subexp): Remove call to unwrap_value before
        call to ada_to_fixed_value.

12 years ago[Ada] whatis not printing array type name for value from history
Joel Brobecker [Wed, 29 Feb 2012 19:29:12 +0000 (19:29 +0000)]
[Ada] whatis not printing array type name for value from history

Consider the following declaration:

   type Full_Table is array (Color) of Integer;
   Full : Full_Table := (144, 233, 377, 610, 987);

The debugger correctly prints the type name of variable "full":

        (gdb) whatis full
        type = pck.full_table

But is unable to do so when using the value history:

        (gdb) print full
        $1 = (144, 233, 377, 610, 987)
        (gdb) whatis $
 !!! -> type = array (black .. white) of integer

This is because the evaluation creates a "fixed" version of
the array type, and that "fixed" version is missing a type name.
As a result, whatis falls back to describing the type (a la ptype)
instead of printing the type name.

gdb/ChangeLog:

        * ada-lang.c (to_fixed_array_type): Set result's type name.

gdb/testsuite/ChangeLog:

        * gdb.ada/whatis_array_val: New testcase.

12 years agoAdd support for condition in Ada exception catchpoint commands
Joel Brobecker [Wed, 29 Feb 2012 19:09:47 +0000 (19:09 +0000)]
Add support for condition in Ada exception catchpoint commands

Previously, conditions could be associated to Ada exception catchpoints,
but not while creating the exception catchpoint:

    (gdb) catch exception first_exception if except_counter = 5
    Junk at end of expression

This patch improves the parsing of the command arguments to allow
an "if CONDITION" at the end.  All Ada exception catchpoint commands
have been enhanced to support this.

gdb/ChangeLog:

        * ada-lang.c (catch_ada_exception_command_split): Add new
        argument cond_string.  Add support for condition at end of
        "catch exception" commands.
        (ada_decode_exception_location): Add new argument cond_string.
        Update call to catch_ada_exception_command_split.
        (create_ada_exception_catchpoint): Add new argument cond_string.
        Set the breakpoint condition if needed.
        (catch_ada_exception_command): Update call to
        ada_decode_exception_location.
        (ada_decode_assert_location): Add function documentation.
        Add support for condition at end of "catch assert" command.
        (catch_assert_command): Update calls to ada_decode_assert_location
        and create_ada_exception_catchpoint.

12 years agogdb/
Jan Kratochvil [Wed, 29 Feb 2012 14:59:41 +0000 (14:59 +0000)]
gdb/
Fix disp-step-syscall.exp: fork: single step over fork.
* i386-linux-tdep.c (-i386_linux_get_syscall_number): Rename to ...
(i386_linux_get_syscall_number_from_regcache): ... here, new function
comment, change parameters gdbarch and ptid to regcache.  Remove
parameter regcache, initialize gdbarch from regcache here.
(i386_linux_get_syscall_number, i386_linux_displaced_step_copy_insn):
New functions.
(i386_linux_init_abi): Install i386_linux_displaced_step_copy_insn
instead.
* i386-tdep.c (i386_syscall_p): Check also for 'sysenter' and
'syscall'.  Make the 'int' check more strict.

gdb/testsuite/
Fix disp-step-syscall.exp: fork: single step over fork.
* gdb.base/disp-step-syscall.exp (syscall_insn): Anchor it by
whitespaces.
(single step over $syscall): Remove its check.
(single step over $syscall final pc): New check.

12 years agogdb/
Jan Kratochvil [Wed, 29 Feb 2012 14:56:55 +0000 (14:56 +0000)]
gdb/
Fix reverse mode for syscall on AMD CPUs in 32-bit mode.
* i386-linux-tdep.c (i386_linux_intx80_sysenter_record): Rename to ...
(i386_linux_intx80_sysenter_syscall_record): ... here.
(i386_linux_init_abi): Initialize also I386_SYSCALL_RECORD.
Use the renamed function name.

12 years agogdb/testsuite/
Jan Kratochvil [Wed, 29 Feb 2012 14:55:46 +0000 (14:55 +0000)]
gdb/testsuite/
Support processors without SSSE3.
* gdb.reverse/i386-sse-reverse.c (sse_test): Move pabsb, pabsw and
pabsd into ...
(ssse3_test): ... a new function.
(main): Call ssse3_test.
* gdb.reverse/i386-sse-reverse.exp: New variable end_ssse3_test.
Update expected values everywhere.
(reverse-step to pabsd, verify xmm0 after reverse pabsd)
(verify xmm1 after reverse pabsd, verify xmm2 after reverse pabsd)
(reverse-step to pabsw, verify xmm0 after reverse pabsw)
(verify xmm1 after reverse pabsw, verify xmm2 after reverse pabsw)
(reverse-step to pabsb, verify xmm0 after reverse pabsb)
(verify xmm1 after reverse pabsb, verify xmm2 after reverse pabsb):
Move these tests lower.
(set breakpoint at end of ssse3_test, continue to end of ssse3_test)
(verify xmm0 at end of ssse3_test, verify xmm1 at end of ssse3_test)
(verify xmm2 at end of ssse3_test, continue to end of ssse3_test #2):
New tests.

12 years agogdb/
Jan Kratochvil [Wed, 29 Feb 2012 14:52:44 +0000 (14:52 +0000)]
gdb/
* arm-linux-tdep.c (arm_linux_copy_svc): Reset stale FRAME.
* breakpoint.c (until_break_command): Likewise.
* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
* infcall.c (call_function_by_hand): Likewise.
* infcmd.c (finish_forward): Likewise.
* infrun.c (insert_exception_resume_breakpoint): Likewise.

12 years agogdb/gdbserver:
Yao Qi [Wed, 29 Feb 2012 13:59:41 +0000 (13:59 +0000)]
gdb/gdbserver:

2012-02-29  Yao Qi  <yao@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

* linux-low.c (linux_wait_1): Call unsuspend_all_lwps when
`step_over_finished' is true.

gdb/testsuite:

2012-02-29  Yao Qi  <yao@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

* gdb.trace/trace-mt.c: New
* gdb.trace/trace-mt.exp: New.

12 years ago * doc/binutils.texi (c++filt): Fix typos.
Nick Clifton [Wed, 29 Feb 2012 10:44:10 +0000 (10:44 +0000)]
* doc/binutils.texi (c++filt): Fix typos.

12 years ago*** empty log message ***
gdbadmin [Wed, 29 Feb 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Tue, 28 Feb 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years agogdb/testsuite/
Thomas Schwinge [Tue, 28 Feb 2012 22:40:48 +0000 (22:40 +0000)]
gdb/testsuite/
* gdb.base/annota1.exp: Use gdb_get_line_number for retrieving line
numbers instead of hardcoding them.
* gdb.base/annota1.c: Provide suitable markers.
* gdb.base/annota3.exp: Use gdb_get_line_number for retrieving line
numbers instead of hardcoding them.
* gdb.base/annota3.c: Provide suitable markers.

12 years agoFix ARI violation in ada_tasks_inferior_data_sniffer.
Joel Brobecker [Tue, 28 Feb 2012 16:30:42 +0000 (16:30 +0000)]
Fix ARI violation in ada_tasks_inferior_data_sniffer.

This patch removes some variable assignments inside condition
expressions.

gdb/ChangeLog:

        * ada-tasks.c (ada_tasks_inferior_data_sniffer): Rework code to
        avoid variable assignments inside condition.

12 years agogdb/testsuite/
Thomas Schwinge [Tue, 28 Feb 2012 10:24:15 +0000 (10:24 +0000)]
gdb/testsuite/
        * gdb.base/annota1.c [__sh__]: Remove any special-casing.
        * gdb.base/annota3.c: Likewise.
        * gdb.base/sigall.c: Likewise.
        * gdb.base/signals.c: Likewise.
        * gdb.reverse/sigall-reverse.c: Likewise.

12 years agogdb/
Jan Kratochvil [Tue, 28 Feb 2012 08:14:11 +0000 (08:14 +0000)]
gdb/
Fix static analysis issue found by cppcheck.
* microblaze-tdep.c (microblaze_extract_return_value): Fix
uninitialized BUF for size 2.

12 years ago*** empty log message ***
gdbadmin [Tue, 28 Feb 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago * mips-tdep.c (mips32_instruction_has_delay_slot): New function.
Maciej W. Rozycki [Mon, 27 Feb 2012 23:05:40 +0000 (23:05 +0000)]
* mips-tdep.c (mips32_instruction_has_delay_slot): New function.
(mips16_instruction_has_delay_slot): Likewise.
(mips_segment_boundary): Likewise.
(mips_adjust_breakpoint_address): Likewise.
(mips_gdbarch_init): Use mips_adjust_breakpoint_address.

12 years agodaily update
Alan Modra [Mon, 27 Feb 2012 23:00:04 +0000 (23:00 +0000)]
daily update

12 years ago * infrun.c (handle_inferior_event): Don't proceed through
Maciej W. Rozycki [Mon, 27 Feb 2012 21:36:47 +0000 (21:36 +0000)]
* infrun.c (handle_inferior_event): Don't proceed through
shared library trampolines if stepping at the machine
instruction level.

12 years ago * mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
Maciej W. Rozycki [Mon, 27 Feb 2012 21:27:46 +0000 (21:27 +0000)]
* mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
too.

12 years ago * gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_main
Maciej W. Rozycki [Mon, 27 Feb 2012 20:48:25 +0000 (20:48 +0000)]
* gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_main
failure return path.

12 years ago * sh-tdep.c (sh_make_stub_cache, sh_stub_this_id)
Thomas Schwinge [Mon, 27 Feb 2012 16:40:48 +0000 (16:40 +0000)]
* sh-tdep.c (sh_make_stub_cache, sh_stub_this_id)
(sh_stub_unwind_sniffer): New functions.
(sh_stub_unwind): New variable.
(sh_gdbarch_init): Wire everything.

12 years ago2012-02-27 Pedro Alves <palves@redhat.com>
Pedro Alves [Mon, 27 Feb 2012 16:22:16 +0000 (16:22 +0000)]
2012-02-27  Pedro Alves  <palves@redhat.com>

gdb/gdbserver/
* linux-low.c (pid_is_stopped): Delete, moved to common/.
(linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.

gdb/
* linux-nat.c (pid_is_stopped): Delete, moved to common/.
(linux_nat_post_attach_wait): Adjust to use
linux_proc_pid_is_stopped.

* common/linux-procfs.h (linux_proc_pid_is_stopped): Declare.
* common/linux-procfs.c (linux_proc_pid_is_stopped): New function,
based on pid_is_stopped from both linux-nat.c and
gdbserver/linux-low.c, and renamed.

12 years ago2012-02-27 Pedro Alves <palves@redhat.com>
Pedro Alves [Mon, 27 Feb 2012 16:19:19 +0000 (16:19 +0000)]
2012-02-27  Pedro Alves  <palves@redhat.com>

PR server/9684
* linux-low.c (pid_is_stopped): New.
(linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.

12 years ago2012-02-27 Luis Machado <lgustavo@codesourcery.com>
Luis Machado [Mon, 27 Feb 2012 13:22:59 +0000 (13:22 +0000)]
2012-02-27  Luis Machado  <lgustavo@codesourcery.com>

* gdb.base/save-bp.exp: Account for new condition evaluator output.

12 years ago * config/tc-crx.c (check_range): Correct uint32_t misconceptions.
Alan Modra [Mon, 27 Feb 2012 12:36:21 +0000 (12:36 +0000)]
* config/tc-crx.c (check_range): Correct uint32_t misconceptions.

12 years ago * chew.c (print_stack_level, main): Use %ld to print stack delta.
Alan Modra [Mon, 27 Feb 2012 07:03:00 +0000 (07:03 +0000)]
* chew.c (print_stack_level, main): Use %ld to print stack delta.

12 years agocpu/
Alan Modra [Mon, 27 Feb 2012 06:57:57 +0000 (06:57 +0000)]
cpu/
* mt.opc (print_dollarhex): Trim values to 32 bits.
opcodes/
* mt-dis.c: Regenerate.

12 years ago * v850-opc.c (extract_v8): Rearrange to make it obvious this
Alan Modra [Mon, 27 Feb 2012 06:55:39 +0000 (06:55 +0000)]
* v850-opc.c (extract_v8): Rearrange to make it obvious this
is the inverse of corresponding insert function.
(extract_d22, extract_u9, extract_r4): Likewise.
(extract_d9): Correct sign extension.
(extract_d16_15): Don't assume "long" is 32 bits, and don't
rely on implementation defined behaviour for shift right of
signed types.
(extract_d16_16, extract_d17_16, extract_i9): Likewise.
(extract_d23): Likewise, and correct mask.

12 years ago * config/tc-tic4x.c (tic4x_do_align): Remove ATTRIBUTE_UNUSED on
Alan Modra [Mon, 27 Feb 2012 06:52:20 +0000 (06:52 +0000)]
* config/tc-tic4x.c (tic4x_do_align): Remove ATTRIBUTE_UNUSED on
params.  Properly generate NOP pattern.  Comment reason for
subseg_text_p failure.

12 years ago * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
Alan Modra [Mon, 27 Feb 2012 06:48:10 +0000 (06:48 +0000)]
* elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
before calling elf specific function.
(sh_elf_osec_readonly_p): Test for error return from above.

12 years ago * config/tc-h8300.c (constant_fits_width_p): Trim constant to 32 bits
Alan Modra [Mon, 27 Feb 2012 06:40:42 +0000 (06:40 +0000)]
* config/tc-h8300.c (constant_fits_width_p): Trim constant to 32 bits
and sign extend before range tests.
(constant_fits_size_p): Similarly.
(get_specific): Trim X_add_number to 32 bits.
(fix_operand_size): Likewise, and use unsigned test for signed
ranges.

12 years agogas/
Alan Modra [Mon, 27 Feb 2012 06:37:40 +0000 (06:37 +0000)]
gas/
* config/tc-crx.c: Include bfd_stdint.h.
(getconstant): Remove irrelevant comment.  Don't fail due to
sign-extension of int mask.
(check_range): Rewrite using unsigned arithmetic throughout.
opcodes/
* crx-dis.c (print_arg): Mask constant to 32 bits.
* crx-opc.c (cst4_map): Use int array.
include/opcode/
* crx.h (cst4_map): Update declaration.

12 years ago * arc-dis.c (BITS): Don't use shifts to mask off bits.
Alan Modra [Mon, 27 Feb 2012 06:31:57 +0000 (06:31 +0000)]
* arc-dis.c (BITS): Don't use shifts to mask off bits.
(FIELDD): Sign extend with xor,sub.

12 years ago*** empty log message ***
gdbadmin [Mon, 27 Feb 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago * elf32-spu.c (build_stub): Fix malloc under-allocation.
Alan Modra [Sun, 26 Feb 2012 23:12:16 +0000 (23:12 +0000)]
* elf32-spu.c (build_stub): Fix malloc under-allocation.

12 years agodaily update
Alan Modra [Sun, 26 Feb 2012 23:00:04 +0000 (23:00 +0000)]
daily update

12 years ago*** empty log message ***
gdbadmin [Sun, 26 Feb 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

12 years agoFix regression from change
Walter Lee [Sat, 25 Feb 2012 22:40:48 +0000 (22:40 +0000)]
Fix regression from change
http://sourceware.org/ml/binutils-cvs/2012-01/msg00049.html .  The
code needs to check that the symbol is not a local symbol before
accessing a non-local-symbol field.

* tc-tilepro.c (emit_tilepro_instruction): Check if symbol is
non-local before checking sy_value.
* tc-tilegx.c (emit_tilegx_instruction): Ditto.

12 years agoImprove TLS support on TILE-Gx/TILEPro:
Walter Lee [Sat, 25 Feb 2012 22:24:21 +0000 (22:24 +0000)]
Improve TLS support on TILE-Gx/TILEPro:
- Add support for TLS LE references.
- Support linker optimization of TLS references.
- Delete relocations of GOT/tp relative offsets beyond 32-bits.

This brings binutils in line with the support expected in gcc 4.7, for
TILE-Gx/TILEPro.

bfd/
* reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
* elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
relocations.
(tilepro_reloc_map): Ditto.
(tilepro_info_to_howto_rela): Ditto.
(reloc_to_create_func): Ditto.
(tilepro_tls_translate_to_le): New.
(tilepro_tls_translate_to_ie): New.
(tilepro_elf_tls_transition): New.
(tilepro_elf_check_relocs): Handle new tls relocations.
(tilepro_elf_gc_sweep_hook): Ditto.
(allocate_dynrelocs): Ditto.
(tilepro_elf_relocate_section): Ditto.
(tilepro_replace_insn): New.
(insn_mask_X1): New.
(insn_mask_X0_no_dest_no_srca): New
(insn_mask_X1_no_dest_no_srca): New
(insn_mask_Y0_no_dest_no_srca): New
(insn_mask_Y1_no_dest_no_srca): New
(srca_mask_X0): New
(srca_mask_X1): New
(insn_tls_le_move_X1): New
(insn_tls_le_move_zero_X0X1): New
(insn_tls_ie_lw_X1): New
(insn_tls_ie_add_X0X1): New
(insn_tls_ie_add_Y0Y1): New
(insn_tls_gd_add_X0X1): New
(insn_tls_gd_add_Y0Y1): New
* elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
relocations.
(tilegx_reloc_map): Ditto.
(tilegx_info_to_howto_rela): Ditto.
(reloc_to_create_func): Ditto.
(tilegx_elf_link_hash_table): New field disable_le_transition.
(tilegx_tls_translate_to_le): New.
(tilegx_tls_translate_to_ie): New.
(tilegx_elf_tls_transition): New.
(tilegx_elf_check_relocs): Handle new tls relocations.
(tilegx_elf_gc_sweep_hook): Ditto.
(allocate_dynrelocs): Ditto.
(tilegx_elf_relocate_section): Ditto.
(tilegx_copy_bits): New.
(tilegx_replace_insn): New.
(insn_mask_X1): New.
(insn_mask_X0_no_dest_no_srca): New.
(insn_mask_X1_no_dest_no_srca): New.
(insn_mask_Y0_no_dest_no_srca): New.
(insn_mask_Y1_no_dest_no_srca): New.
(insn_mask_X0_no_operand): New.
(insn_mask_X1_no_operand): New.
(insn_mask_Y0_no_operand): New.
(insn_mask_Y1_no_operand): New.
(insn_tls_ie_ld_X1): New.
(insn_tls_ie_ld4s_X1): New.
(insn_tls_ie_add_X0X1): New.
(insn_tls_ie_add_Y0Y1): New.
(insn_tls_ie_addx_X0X1): New.
(insn_tls_ie_addx_Y0Y1): New.
(insn_tls_gd_add_X0X1): New.
(insn_tls_gd_add_Y0Y1): New.
(insn_move_X0X1): New.
(insn_move_Y0Y1): New.
(insn_add_X0X1): New.
(insn_add_Y0Y1): New.
(insn_addx_X0X1): New.
(insn_addx_Y0Y1): New.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.

gas/
* tc-tilepro.c (O_tls_le): Define operator.
(O_tls_le_lo16): Ditto.
(O_tls_le_hi16): Ditto.
(O_tls_le_ha16): Ditto.
(O_tls_gd_call): Ditto.
(O_tls_gd_add): Ditto.
(O_tls_ie_load): Ditto.
(md_begin): Delete old operators; handle new operators.
(emit_tilepro_instruction): Ditto.
(md_apply_fix): Ditto.
* tc-tilegx.c (O_hw1_got): Delete operator.
(O_hw2_got): Ditto.
(O_hw3_got): Ditto.
(O_hw2_last_got): Ditto.
(O_hw1_tls_gd): Ditto.
(O_hw2_tls_gd): Ditto.
(O_hw3_tls_gd): Ditto.
(O_hw2_last_tls_gd): Ditto.
(O_hw1_tls_ie): Ditto.
(O_hw2_tls_ie): Ditto.
(O_hw3_tls_ie): Ditto.
(O_hw2_last_tls_ie): Ditto.
(O_hw0_tls_le): Define operator.
(O_hw0_last_tls_le): Ditto.
(O_hw1_last_tls_le): Ditto.
(O_tls_gd_call): Ditto.
(O_tls_gd_add): Ditto.
(O_tls_ie_load): Ditto.
(O_tls_add): Ditto.
(md_begin): Delete old operators; handle new operators.
(emit_tilegx_instruction): Ditto.
(md_apply_fix): Ditto.
* doc/c-tilegx.texi: Delete old operators; document new operators.
* doc/c-tilepro.texi: Ditto.

include/elf/
* tilegx.h (R_TILEGX_IMM16_X0_HW1_GOT): Delete.
(R_TILEGX_IMM16_X1_HW1_GOT): Ditto.
(R_TILEGX_IMM16_X0_HW2_GOT): Ditto.
(R_TILEGX_IMM16_X1_HW2_GOT): Ditto.
(R_TILEGX_IMM16_X0_HW3_GOT): Ditto.
(R_TILEGX_IMM16_X1_HW3_GOT): Ditto.
(R_TILEGX_IMM16_X0_HW2_LAST_GOT): Ditto.
(R_TILEGX_IMM16_X1_HW2_LAST_GOT): Ditto.
(R_TILEGX_IMM16_X0_HW1_TLS_GD): Ditto.
(R_TILEGX_IMM16_X1_HW1_TLS_GD): Ditto.
(R_TILEGX_IMM16_X0_HW2_TLS_GD): Ditto.
(R_TILEGX_IMM16_X1_HW2_TLS_GD): Ditto.
(R_TILEGX_IMM16_X0_HW3_TLS_GD): Ditto.
(R_TILEGX_IMM16_X1_HW3_TLS_GD): Ditto.
(R_TILEGX_IMM16_X0_HW2_LAST_TLS_GD): Ditto.
(R_TILEGX_IMM16_X1_HW2_LAST_TLS_GD): Ditto.
(R_TILEGX_IMM16_X0_HW1_TLS_IE): Ditto.
(R_TILEGX_IMM16_X1_HW1_TLS_IE): Ditto.
(R_TILEGX_IMM16_X0_HW2_TLS_IE): Ditto.
(R_TILEGX_IMM16_X1_HW2_TLS_IE): Ditto.
(R_TILEGX_IMM16_X0_HW3_TLS_IE): Ditto.
(R_TILEGX_IMM16_X1_HW3_TLS_IE): Ditto.
(R_TILEGX_IMM16_X0_HW2_LAST_TLS_IE): Ditto.
(R_TILEGX_IMM16_X1_HW2_LAST_TLS_IE): Ditto.
(R_TILEGX_IMM16_X0_HW0_TLS_LE): New relocation.
(R_TILEGX_IMM16_X1_HW0_TLS_LE): Ditto.
(R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE): Ditto.
(R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE): Ditto.
(R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE): Ditto.
(R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE): Ditto.
(R_TILEGX_TLS_GD_CALL): Ditto.
(R_TILEGX_IMM8_X0_TLS_GD_ADD): Ditto.
(R_TILEGX_IMM8_X1_TLS_GD_ADD): Ditto.
(R_TILEGX_IMM8_Y0_TLS_GD_ADD): Ditto.
(R_TILEGX_IMM8_Y1_TLS_GD_ADD): Ditto.
(R_TILEGX_TLS_IE_LOAD): Ditto.
(R_TILEGX_IMM8_X0_TLS_ADD): Ditto.
(R_TILEGX_IMM8_X1_TLS_ADD): Ditto.
(R_TILEGX_IMM8_Y0_TLS_ADD): Ditto.
(R_TILEGX_IMM8_Y1_TLS_ADD): Ditto.
* tilepro.h (R_TILEPRO_TLS_GD_CALL): New relocation.
(R_TILEPRO_IMM8_X0_TLS_GD_ADD): Ditto.
(R_TILEPRO_IMM8_X1_TLS_GD_ADD): Ditto.
(R_TILEPRO_IMM8_Y0_TLS_GD_ADD): Ditto.
(R_TILEPRO_IMM8_Y1_TLS_GD_ADD): Ditto.
(R_TILEPRO_TLS_IE_LOAD): Ditto.
(R_TILEPRO_IMM16_X0_TLS_LE): Ditto.
(R_TILEPRO_IMM16_X1_TLS_LE): Ditto.
(R_TILEPRO_IMM16_X0_TLS_LE_LO): Ditto.
(R_TILEPRO_IMM16_X1_TLS_LE_LO): Ditto.
(R_TILEPRO_IMM16_X0_TLS_LE_HI): Ditto.
(R_TILEPRO_IMM16_X1_TLS_LE_HI): Ditto.
(R_TILEPRO_IMM16_X0_TLS_LE_HA): Ditto.
(R_TILEPRO_IMM16_X1_TLS_LE_HA): Ditto.

include/opcode/
* tilegx.h (tilegx_mnemonic): Add TILEGX_OPC_LD4S_TLS,
TILEGX_OPC_LD_TLS.
* tilepro.h (tilepro_mnemonic): Add TILEPRO_OPC_LW_TLS,
TILEPRO_OPC_LW_TLS_SN.

opcodes/
* tilegx-opc.c: Handle TILEGX_OPC_LD4S_TLS and TILEGX_OPC_LD_TLS.
* tilepro-opc.c: Handle TILEPRO_OPC_LW_TLS and
TILEPRO_OPC_LW_TLS_SN.

12 years agoDeletes some dead code in the TILE-Gx/TILEPro ports of gas.
Walter Lee [Sat, 25 Feb 2012 20:07:08 +0000 (20:07 +0000)]
Deletes some dead code in the TILE-Gx/TILEPro ports of gas.

* tc-tilepro.c (apply_special_operator): delete cases for
got and tls operators.
(md_apply_fix): Ditto.
* tc-tilegx.c: (apply_special_operator): delete cases for
got and tls operators.
(md_apply_fix): Ditto.

12 years ago2012-02-25 Luis Machado <lgustavo@codesourcery.com>
Luis Machado [Sat, 25 Feb 2012 19:54:50 +0000 (19:54 +0000)]
2012-02-25  Luis Machado  <lgustavo@codesourcery.com>

* mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
of conditions.

12 years agoAdd big-endian support for tilegx.
Walter Lee [Sat, 25 Feb 2012 19:51:34 +0000 (19:51 +0000)]
Add big-endian support for tilegx.

bfd/
* config.bfd (tilegx-*-*): rename little endian vector; add big
endian vector.
(tilegxbe-*-*): New case.
* configure.in (bfd_elf32_tilegx_vec): Rename...
(bfd_elf32_tilegx_le_vec): ... to this.
(bfd_elf32_tilegx_be_vec): New vector.
(bfd_elf64_tilegx_vec): Rename...
(bfd_elf64_tilegx_le_vec): ... to this.
(bfd_elf64_tilegx_be_vec): New vector.
* configure: Regenerate.
* elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
(TARGET_LITTLE_NAME): Ditto.
(TARGET_BIG_SYM): Define.
(TARGET_BIG_NAME): Define.
* elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
(TARGET_LITTLE_NAME): Ditto.
(TARGET_BIG_SYM): Define.
(TARGET_BIG_NAME): Define.
* targets.c (bfd_elf32_tilegx_vec): Rename...
(bfd_elf32_tilegx_le_vec): ... to this.
(bfd_elf32_tilegx_be_vec): Declare.
(bfd_elf64_tilegx_vec): Rename...
(bfd_elf64_tilegx_le_vec): ... to this.
(bfd_elf64_tilegx_be_vec): Declare.
(_bfd_target_vector): Add / rename above vectors.

binutils/testsuite/
* binutils-all/objdump.exp (cpus_expected): Add tilegx.

gas/
* tc-tilegx.c (tilegx_target_format): Handle big endian.
(OPTION_EB): Define.
(OPTION_EL): Define.
(md_longopts): Add entries for "EB" and "EL".
(md_parse_option): Handle OPTION_EB and OPTION_EL.
(md_show_usage): Add -EB and -EL.
(md_number_to_chars): New.
* tc-tilegx.h (TARGET_BYTES_BIG_ENDIAN): Guard definition with
ifndef.
(md_number_to_chars): Delete.
* configure.tgt (tilegx*be): Handle.
* doc/as.texinfo [TILE-Gx]: Document -EB and -EL.
* doc/c-tilegx.texi: Ditto.

ld/
* Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx_be.c.
(ALL_64_EMULATION_SOURCES): Add eelf64tilegx_be.c.
(eelf32tilegx_be.c): Add rule to build this file.
(eelf64tilegx_be.c): Ditto.
* Makefile.in: Regenerate.
* configure.tgt (tilegx-*-*): Support big endian.
(tilegxbe-*-*): New.
* emulparams/elf32tilegx.sh (OUTPUT_FORMAT): Rename.
(BIG_OUTPUT_FORMAT): Define.
(LITTLE_OUTPUT_FORMAT): Define.
* emulparams/elf32tilegx_be.sh: New.
* emulparams/elf64tilegx.sh (OUTPUT_FORMAT): Rename.
(BIG_OUTPUT_FORMAT): Define.
(LITTLE_OUTPUT_FORMAT): Define.
* emulparams/elf64tilegx_be.sh: New.

ld/testsuite/
* ld-tilegx/reloc-be.d: New.
* ld-tilegx/reloc-le.d: New.
* ld-tilegx/reloc.d: Delete.
* ld-tilegx/tilegx.exp: Test big and little endian.

12 years agoProperly create and use a bfd_arch_info_type for 32-bit tilegx.
Walter Lee [Sat, 25 Feb 2012 18:57:55 +0000 (18:57 +0000)]
Properly create and use a bfd_arch_info_type for 32-bit tilegx.

bfd/
* arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
* bfd-in2.h: Regenerate.
* cpu-tilegx.c (bfd_tilegx32_arch): define.
  (bfd_tilegx_arch): link to bfd_tilegx32_arch.

gas/
* tc-tilegx.c (md_begin): set architecture and machine.

12 years agogdb/doc/
Jan Kratochvil [Sat, 25 Feb 2012 13:54:25 +0000 (13:54 +0000)]
gdb/doc/
* gdb.texinfo (Startup): Add option -ex description to the option -x
description.

12 years ago*** empty log message ***
gdbadmin [Sat, 25 Feb 2012 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago * remote.c (remote_watchpoint_addr_within_range): New function.
Maciej W. Rozycki [Fri, 24 Feb 2012 23:48:37 +0000 (23:48 +0000)]
* remote.c (remote_watchpoint_addr_within_range): New function.
(init_remote_ops): Use it.

12 years ago * target.h (target_watchpoint_addr_within_range): Document macro.
Maciej W. Rozycki [Fri, 24 Feb 2012 23:46:48 +0000 (23:46 +0000)]
* target.h (target_watchpoint_addr_within_range): Document macro.

12 years agodaily update
Alan Modra [Fri, 24 Feb 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago * signals.c (_rl_block_sigwinch, _rl_release_sigwinch): Add
Pierre Muller [Fri, 24 Feb 2012 17:14:43 +0000 (17:14 +0000)]
* signals.c (_rl_block_sigwinch, _rl_release_sigwinch): Add
conditional SIGWINCH around functions.

12 years ago2012-02-24 Pedro Alves <palves@redhat.com>
Pedro Alves [Fri, 24 Feb 2012 16:47:56 +0000 (16:47 +0000)]
2012-02-24  Pedro Alves  <palves@redhat.com>

* stack.c (set_last_displayed_sal): Issue internal_error instead
of warning, and issue it after clearing the last displayed sal.

12 years ago2012-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Pedro Alves [Fri, 24 Feb 2012 16:26:36 +0000 (16:26 +0000)]
2012-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    Pedro Alves  <palves@redhat.com>

* breakpoint.c (until_break_command): Install breakpoints after
all frame manipulations.

12 years ago * linux-mips-low.c (mips_regmap): Correct the index of $f9.
Maciej W. Rozycki [Fri, 24 Feb 2012 16:16:02 +0000 (16:16 +0000)]
* linux-mips-low.c (mips_regmap): Correct the index of $f9.

12 years ago2012-02-24 Luis Machado <lgustavo@codesourcery.com>
Luis Machado [Fri, 24 Feb 2012 15:17:41 +0000 (15:17 +0000)]
2012-02-24  Luis Machado  <lgustavo@codesourcery.com>

* gdb.base/cond-eval-mode.exp: New file.

12 years ago2012-02-24 Luis Machado <lgustavo@codesourcery>
Luis Machado [Fri, 24 Feb 2012 15:15:56 +0000 (15:15 +0000)]
2012-02-24  Luis Machado  <lgustavo@codesourcery>

* server.c (handle_query): Advertise support for target-side
breakpoint condition evaluation.
(process_point_options): New function.
(process_serial_event): When inserting a breakpoint, check for
a target-side condition that should be evaluated.

* mem-break.c: Include regcache.h and ax.h.
(point_cond_list_t): New data structure.
(breakpoint) <cond_list>: New field.
(find_gdb_breakpoint_at): Make non-static.
(delete_gdb_breakpoint_at): Clear any target-side
conditions.
(clear_gdb_breakpoint_conditions): New function.
(add_condition_to_breakpoint): Likewise.
(add_breakpoint_condition): Likewise.
(gdb_condition_true_at_breakpoint): Likewise.
(gdb_breakpoint_here): Return result directly instead
of going through a local variable.

* mem-break.h (find_gdb_breakpoint_at): New prototype.
(clear_gdb_breakpoint_conditions): Likewise.
(add_breakpoint_condition): Likewise.
(gdb_condition_true_at_breakpoint): Likewise.

* linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
(need_step_over_p): Take target-side breakpoint condition into
consideration.