Bug 149432 - Gdb can't do inferior function call with fc3 kernel
Gdb can't do inferior function call with fc3 kernel
Status: CLOSED DUPLICATE of bug 144805
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks: 116894
  Show dependency treegraph
 
Reported: 2005-02-22 18:04 EST by Jeff Johnston
Modified: 2015-01-04 17:17 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-22 19:01:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
testcase (10.24 KB, text/plain)
2005-02-22 18:05 EST, Jeff Johnston
no flags Details

  None (edit)
Description Jeff Johnston 2005-02-22 18:04:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1

Description of problem:
Running gdb under FC3 fails when doing inferior function calls.  This
involves gdb calling a known function in the application and
evaluating the result.

A SIGTRAP is being found by gdb at the entry point of the function the
2nd time we call the same function.  Gdb is not setting this
breakpoint and when it trips over the trap it is forced to issue a
message and stop evaluation of the result.

This same test and version of gdb runs fine under RHEL3 and RHEL4. 
The test also works fine under FC4 on ia64.

Version-Release number of selected component (if applicable):
kernel-2.6.10-1.760_FC3smp

How reproducible:
Always

Steps to Reproduce:
1.gcc -g callfuncs.c
2.gdb -nw callfuncs
3.b main
4.run
5.next
6.next
7.next
8.p t_char_values ('a', 'b')
9.p t_char_values ('a', 'b') <== this gets an extraneous trap
    

Actual Results:  (gdb) b main
Breakpoint 1 at 0x8048987: file
../../../gdb-6.3/gdb/testsuite/gdb.base/callfuncs.c, line 389.
(gdb) run
Starting program:
/usr/src/redhat/BUILD/gdb-6.3.0.0-build-i386-redhat-linux-gnu/gdb/testsuite/gdb.base/callfuncs


Breakpoint 1, main ()
    at ../../../gdb-6.3/gdb/testsuite/gdb.base/callfuncs.c:389
389	  malloc(1);
(gdb) next
390	  t_double_values(double_val1, double_val2);
(gdb) 
391	  t_structs_c(struct_val1);
(gdb) 
392	  return 0 ;
(gdb) p t_char_values ('a', 'b')
$1 = 1
(gdb) p t_char_values ('a', 'b')

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0804854f in t_char_values (char_arg1=-65 '�', char_arg2=-4 '�')
    at ../../../gdb-6.3/gdb/testsuite/gdb.base/callfuncs.c:217
217	{
The program being debugged was signaled while in a function called
from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (t_char_values)
will be abandoned.



Expected Results:  The second call to p t_char_values ('a', 'b')
should have succeeded and returned back the same return value as the
previous attempt.

Additional info:
Comment 1 Jeff Johnston 2005-02-22 18:05:12 EST
Created attachment 111313 [details]
testcase
Comment 2 Dave Jones 2005-02-22 18:25:05 EST
dupe of 144805 ?
Comment 3 Jeff Johnston 2005-02-22 19:01:36 EST
Yes.  It is a duplicate.  I will close it as such.

*** This bug has been marked as a duplicate of 144805 ***

Note You need to log in before you can comment on or make changes to this bug.