aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-framefilter.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index e915b98..fd2757d 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -414,12 +414,14 @@ static enum ext_lang_bt_status
enumerate_args (PyObject *iter,
struct ui_out *out,
enum ext_lang_frame_args args_type,
+ bool raw_frame_args,
int print_args_field,
frame_info_ptr frame)
{
struct value_print_options opts;
get_user_print_options (&opts);
+ opts.raw = raw_frame_args;
if (args_type == CLI_SCALAR_VALUES)
{
@@ -634,7 +636,8 @@ static enum ext_lang_bt_status
py_mi_print_variables (PyObject *filter, struct ui_out *out,
struct value_print_options *opts,
enum ext_lang_frame_args args_type,
- frame_info_ptr frame)
+ frame_info_ptr frame,
+ bool raw_frame_args_p)
{
gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args"));
if (args_iter == NULL)
@@ -647,8 +650,8 @@ py_mi_print_variables (PyObject *filter, struct ui_out *out,
ui_out_emit_list list_emitter (out, "variables");
if (args_iter != Py_None
- && (enumerate_args (args_iter.get (), out, args_type, 1, frame)
- == EXT_LANG_BT_ERROR))
+ && (enumerate_args (args_iter.get (), out, args_type, raw_frame_args_p,
+ 1, frame) == EXT_LANG_BT_ERROR))
return EXT_LANG_BT_ERROR;
if (locals_iter != Py_None
@@ -693,6 +696,7 @@ static enum ext_lang_bt_status
py_print_args (PyObject *filter,
struct ui_out *out,
enum ext_lang_frame_args args_type,
+ bool raw_frame_args,
frame_info_ptr frame)
{
gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args"));
@@ -718,7 +722,8 @@ py_print_args (PyObject *filter,
}
}
else if (args_iter != Py_None
- && (enumerate_args (args_iter.get (), out, args_type, 0, frame)
+ && (enumerate_args (args_iter.get (), out, args_type,
+ raw_frame_args, 0, frame)
== EXT_LANG_BT_ERROR))
return EXT_LANG_BT_ERROR;
@@ -802,8 +807,9 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
/* stack-list-variables. */
if (print_locals && print_args && ! print_frame_info)
{
- if (py_mi_print_variables (filter, out, &opts,
- args_type, frame) == EXT_LANG_BT_ERROR)
+ bool raw_frame_args = (flags & PRINT_RAW_FRAME_ARGUMENTS) != 0;
+ if (py_mi_print_variables (filter, out, &opts, args_type, frame,
+ raw_frame_args) == EXT_LANG_BT_ERROR)
return EXT_LANG_BT_ERROR;
return EXT_LANG_BT_OK;
}
@@ -949,7 +955,9 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
wrong. */
if (print_args && (location_print || out->is_mi_like_p ()))
{
- if (py_print_args (filter, out, args_type, frame) == EXT_LANG_BT_ERROR)
+ bool raw_frame_args = (flags & PRINT_RAW_FRAME_ARGUMENTS) != 0;
+ if (py_print_args (filter, out, args_type, raw_frame_args, frame)
+ == EXT_LANG_BT_ERROR)
return EXT_LANG_BT_ERROR;
}