This is the mail archive of the gdb@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]

Re: GDB internal error in pc_in_thread_step_range


On 2018-07-28 05:48, Eli Zaretskii wrote:
I see this in every version of MinGW GDB since 7.8.1 (didn't try
earlier versions) when debugging a C program: if I step outside the
'main' function, i.e. past its closing brace after the 'return'
statement, I get an internal GDB error.

Here is the session with a simple "hello, world" program:

  D:\usr\eli\data>gdb ./hello_dbg.exe
  GNU gdb (GDB) 8.1
  Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "i686-pc-mingw32".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from ./hello_dbg.exe...done.
  (gdb) start
  Temporary breakpoint 1 at 0x40144e: file hello.c, line 8.
  Starting program: D:\usr\eli\data\hello_dbg.exe
  [New Thread 7896.0x1ba8]

  Temporary breakpoint 1, main () at hello.c:8
  8         printf("hello, world!");
  (gdb) n
  hello, world!9    return 0;
  (gdb)
  10      }
  (gdb)
  0x0040126d in __register_frame_info ()
  (gdb)
  Single stepping until exit from function __register_frame_info,
  which has no line number information.
  infrun.c:2728: internal-error: void resume_1(gdb_signal): Assertion
`pc_in_thread_step_range (pc, tp)' failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  Quit this debugging session? (y or n)

Is it a known problem?

Not that I know of.

Simon


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