Skip to content

Commit

Permalink
fix "info functions" output
Browse files Browse the repository at this point in the history
Fix #22
  • Loading branch information
tromey committed Apr 18, 2016
1 parent 017f559 commit 6eb070d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gdb/rust-lang.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ rust_print_type (struct type *type, const char *varstring,
if (TYPE_VARARGS (type))
goto c_printer;

fputs_filtered ("fn (", stream);
fputs_filtered ("fn ", stream);
if (varstring != NULL)
fputs_filtered (varstring, stream);
fputs_filtered ("(", stream);
for (i = 0; i < TYPE_NFIELDS (type); ++i)
{
QUIT;
Expand Down
5 changes: 5 additions & 0 deletions gdb/testsuite/gdb.rust/methods.exp
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ gdb_breakpoint ${srcfile}:$line
gdb_continue_to_breakpoint "second breakpoint"

gdb_test "print *self" " = 23"


gdb_test "info functions HasMethods::new" \
"fn methods::HasMethods::new\\(\\) -> methods::HasMethods;"

0 comments on commit 6eb070d

Please sign in to comment.