This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Fix for gdb.parameter('architecture') returning empty string


Hello,

Currently, gdb.parameter ('architecture') and gdb.parameter ('endian')
return an empty string.  Attached is a patch which fixes this.  I am
not very sure if this is the cleanest fix, but I could not come up
with a better one.

2012-10-13  Siva Chandra Reddy  <sivachandra@google.com>

        * arch-utils.c: Rename variables 'set_endian_string' and
        'set_architecture_string' to 'endian_string' and
        'architecture_string' respectively.
        (show_endian): Use 'endian_string' instead of evaluating the
        endian string value from the current architecture.
        (show_architecture): Use 'architecture_string' instead of
        evaluating the architecture name from the current architecture.
        (set_endiani, _initialize_gdbarch_utils): Use the new
        'endian_string' variable.
        (selected_architecture_name, set_architecture): Use the new
        'architecture_string' variable.
        (set_endian_string): New convenience function to set
        'endian_string'.
        (on_architecture_change): Callback for the architecture change
        event.
        (initialize_current_architecture): Initialize
        'architecture_string' and 'endian_string'. Attach the callback
        on_architecture_change to the architecture change observer.

testsuite/

2012-10-13  Siva Chandra Reddy  <sivachandra@google.com>

        gdb.python/py-parameter.exp: Add a new test to test
        gdb.parameter ('endian').

Thanks,
Siva Chandra

Attachment: param_patch_v1.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]