gdb: print:Junk after end of expression

在使用gdb的print命令时发现一个表达式错误提示:Junk after end of expression;

(gdb) p *(func_stub*)0x7f668d5d8c84)    
、、 这个表达式就会提示这个错误。仔细看我们就会发现其实在*号后面少了一个左括号;

这个错误的含义是:在表达式的末尾有无效字符(乌七八糟的东西)

也就是说gdb在解析这个表达式时,在最后一个括号之前,表达式都还正常。就是最后一个右括号比较多余。

/* Parse STRING as an expression, and complain if this fails to use up
   all of the contents of STRING.  TRACKER, if non-null, will be
   updated by the parser.  VOID_CONTEXT_P should be true to indicate
   that the expression may be expected to 

猜你喜欢

转载自blog.csdn.net/qq_36428903/article/details/125648878