This is the mail archive of the gdb-prs@sources.redhat.com 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]

gdb/847: GDB 5.x interprets unaligned access signal as SIGSEGV


>Number:         847
>Category:       gdb
>Synopsis:       GDB 5.x interprets unaligned access signal as SIGSEGV
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 22 11:28:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     xiaohan@coware.com
>Release:        GNU gdb 20021119
>Organization:
>Environment:
Solaris 2.7
>Description:
ncsim is a HDL simulator, because of the license problem, I can not attach a test case here
Bug In GDB 5.x That Causes Problems With NC-Sim On Solaris
There is a bug in GDB 5.x that causes the user to loose control of the debugger when running with NC-Sim on Solaris. This problem is not present with Verilog-XL or VCS. There is a workaround that enables the user to take advantage of the thread-specific breakpoint capability of GDB 5.0 on Solaris. The bug is that when an unaligned access signal is delivered from the kernal to GDB, GDB interprets the signal as a segmentation fault. The result of this problem looks like this: 

(gdb) c 
Continuing. 
ncsim> run 
ncsim: *internal* (rts_seghandler - SIGSEGV unexpected violation pc=0x00d1f9a8
addr=0x00001d68). 

Program exited with code 01. 
(gdb)
The workaround is to catch the SIGSEGV and resignal SIGBUS, which is what NC-Sim is depending on. For example: 

Breakpoint 1, main (argc=13, argv=0xffbef3cc) at ncsimTBV.cc:7 
7          ncmain(argc,argv); 
(gdb) handle SIGSEGV stop 
Signal        Stop      Print   Pass to program Description 
SIGSEGV       Yes       Yes     Yes             Segmentation fault 
(gdb) c 
Continuing. 
[New LWP    4        ] 
Welcome to TestBuilder Development Kit, Version: 1.2.44 
  Kit Created Thu Aug 16 06:29:58 PDT 2001 
  Installed   Tue Jul 10 13:35:10 PDT 2001 
ncsim> run 

Program received signal SIGSEGV, Segmentation fault. 
0x00d1f9a8 in ?? () 
(gdb) sig 10 
Continuing with signal SIGBUS.
This problem occurs only on Solaris. This problem does not appear with Wildebeest 2.1 on HPUX. 


>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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