aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-frame-regs.exp
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-11-28gdb/testsuite: remove use of then keyword from gdb.*/*.exp scriptsAndrew Burgess1-2/+2
The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. This commit removes all use of the 'then' keyword from the remaining gdb.*/*.exp scripts. Previous commits have done the bulk of this removal, this commit just handles the remaining directories that each contain a low number of instances. There should be no changes in what is tested after this commit.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-09-30[gdb/testsuite] Fix untested messages in gdb.mi/*.expTom de Vries1-1/+1
The effect of: ... untested "y.exp" ... in a gdb.x/y.exp is: ... UNTESTED: gdb.x/y.exp: y.exp ... which is a bit pointless. Replace these untested messages in gdb.mi/*.exp with the usual "failed to compile". Likewise for an: ... untested $testname ... where the variable is undefined. Tested on x86_64-linux.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-10-13Eliminate mi_run_to_main, introduce mi_clean_restartPedro Alves1-8/+6
Since we now have mi_runto_main which is like runto_main, eliminate mi_run_to_main, in favor of a new MI clean_restart counterpart -- mi_clean_restart -- and mi_runto_main. This makes MI testcases look a bit more like CLI testcases. gdb/testsuite/ChangeLog: * lib/mi-support.exp (mi_clean_restart): New. (mi_run_to_main): Delete. All callers adjust to use mi_clean_restart / mi_runto_main. Change-Id: I34920bab4fea1f23fb752928c2969c1f6ad714b6
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-21gdb: PR mi/20395: Fix -var-update for registers in frames 1 and upAndrew Burgess1-0/+186
This patch fixes a problem with using the MI -var-update command to access the values of registers in frames other than the current frame. The patch includes a test that demonstrates the problem: * run so there are several frames on the stack * create a fixed varobj for $pc in each frame, #'s 1 and above * step one instruction, to modify the value of $pc * call -var-update for each of the previously created varobjs to verify that they are not reported as having changed. Without the patch, the -var-update command reported that $pc for all frames 1 and above had changed to the value of $pc in frame 0. A varobj is created as either fixed, the expression is evaluated within the context of a specific frame, or floating, the expression is evaluated within the current frame, whatever that may be. When a varobj is created by -var-create we set two fields of the varobj to track the context in which the varobj was created, these two fields are varobj->root->frame and var->root->valid_block. If a varobj is of type fixed, then, when we subsequently try to reevaluate the expression associated with the varobj we must determine if the original frame (and block) is still available, if it is not then the varobj can no longer be evaluated. The problem is that for register expressions varobj->root->valid_block is not set correctly. This block tracking is done using the global 'innermost_block' which is set in the various parser files (for example c-exp.y). However, this is not set for register expressions. The fix then seems like it should be to just update the innermost block when parsing register expressions, however, that solution causes several test regressions. The problem is that in some cases we rely on the expression parsing code not updating the innermost block for registers, one example is when we parse the expression for a 'display' command. The display commands treats registers like floating varobjs, but symbols are treated like fixed varobjs. So 'display $reg_name' will always show the value of '$reg_name' even as the user moves from frame to frame, while 'display my_variable' will only show 'my_variable' while it is in the current frame and/or block, when the user moves to a new frame and/or block (even one with a different 'my_variable' in) then the display of 'my_variable' stops. For the case of 'display', without the option to force fixed or floating expressions, the current behaviour is probably the best choice. For the varobj system though, we can choose between floating and fixed, and we should try to make this work for registers. There's only one existing test case that needs to be updated, in that test a fixed varobj is created using a register, the MI output now include the thread-id in which the varobj should be evaluated, which I believe is correct behaviour. I also added a new floating test case into the same test script, however, right now this also includes the thread-id in the expected output, which I believe is an existing gdb bug, which I plan to fix next. Tested on x86_64 Linux native and native-gdbserver, no regressions. gdb/ChangeLog: PR mi/20395 * ada-exp.y (write_var_from_sym): Pass extra parameter when updating innermost block. * parse.c (innermost_block_tracker::update): Take extra type parameter, and check types match before updating innermost block. (write_dollar_variable): Update innermost block for registers. * parser-defs.h (enum innermost_block_tracker_type): New enum. (innermost_block_tracker::innermost_block_tracker): Initialise m_types member. (innermost_block_tracker::reset): Take type parameter. (innermost_block_tracker::update): Take type parameter, and pass type through as needed. (innermost_block_tracker::m_types): New member. * varobj.c (varobj_create): Pass type when reseting innermost block. gdb/testsuite/ChangeLog: * gdb.mi/basics.c: Add new global. * gdb.mi/mi-frame-regs.exp: New file. * gdb.mi/mi-var-create-rtti.exp: Update expected results, add new case.