public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB internal error in pc_in_thread_step_range
@ 2018-07-28  9:48 Eli Zaretskii
  2018-08-20 15:08 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2018-07-28  9:48 UTC (permalink / raw)
  To: gdb

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GDB internal error in pc_in_thread_step_range
  2018-07-28  9:48 GDB internal error in pc_in_thread_step_range Eli Zaretskii
@ 2018-08-20 15:08 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2018-08-20 15:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-20 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-28  9:48 GDB internal error in pc_in_thread_step_range Eli Zaretskii
2018-08-20 15:08 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).