public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: pascal/2471: Wrong evaluation of functions with pascal calling convention
@ 2008-07-01  7:17 muller
  0 siblings, 0 replies; 3+ messages in thread
From: muller @ 2008-07-01  7:17 UTC (permalink / raw)
  To: _tom_, gdb-prs, muller, nobody

Synopsis: Wrong evaluation of functions with pascal calling convention

Responsible-Changed-From-To: unassigned->muller
Responsible-Changed-By: muller
Responsible-Changed-When: Tue Jul  1 07:17:07 2008
Responsible-Changed-Why:
    Pascal language specific problem.

http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2471


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

* Re: pascal/2471: Wrong evaluation of functions with pascal calling convention
@ 2008-07-01  7:38 Pierre Muller
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre Muller @ 2008-07-01  7:38 UTC (permalink / raw)
  To: muller; +Cc: gdb-prs

The following reply was made to PR pascal/2471; it has been noted by GNATS.

From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-gnats@sources.redhat.com>, <muller@ics.u-strasbg.fr>,
        <gdb-prs@sources.redhat.com>, <_tom_@centrum.cz>
Cc: <core@freepascal.org>
Subject: Re: pascal/2471: Wrong evaluation of functions with pascal calling convention
Date: Tue, 1 Jul 2008 09:33:46 +0200

 http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gd
 b&pr=2471
 
 
 I suspect that this is not a GDB problem but rather a
 debugging information generation problem.
 First, you did not tell us which complier you used to test.
 
 Is it were GNU pascal compiler (GPC) or Free Pascal compiler (FPC)
 or some other compiler?
 
 This is important because these two compiler do not use the same
 calling convention by default, and there is
 no setting of the calling convention in the testsuite.
 
  Second, if you are using Free Pascal, the default calling convention will
 also depend on the version.
   Version 1.X use 'free pascal' convention, which isn't 
 the official pascal convention either, whereas version 2.X
 use register convention for i386 cpus.
   I suspect that you are using FPC version 2.X,
 I tried to use it with both dwarf or stabs debugging information,
 with fpc 2.2.0,
 and in both cases, there are problems:
 
 1) with stabs, no stabs information about the register parameters is
 generated, which of course means that GDB will not know where to put 
 the function parameters.
   I think that this is an old known problem...
 
 2) with dwarf, I get an error:
 invalid dwarf2 offset 4239667
 
   I was part of the Free Pascal core team,
 but, due to lack of time, I stopped contributing
 a while ago and don't know the current internals 
 of the compiler.
 
   Are there any tests for the validity of
 the generated debugging information?
 
 
 Pierre Muller
 Pascal language support maintainer for GDB
 
 
 
 
 
 


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

* pascal/2471: Wrong evaluation of functions with pascal calling convention
@ 2008-06-23 13:18 _tom_
  0 siblings, 0 replies; 3+ messages in thread
From: _tom_ @ 2008-06-23 13:18 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2471
>Category:       pascal
>Synopsis:       Wrong evaluation of functions with pascal calling convention
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 23 13:18:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     _tom_@centrum.cz
>Release:        GNU gdb 6.6
>Organization:
>Environment:
Windows XP
"i686-pc-mingw32"
>Description:
GDB evaluates function with pascal calling convention (http://en.wikipedia.org/wiki/X86_calling_conventions#pascal) wrongly. I think the problem is in opposite stack filling order.
>How-To-Repeat:
Run gdb with integers program from gdb pascal test suite.
e.g. sum(1, 1) returns 8
e.g. sub(1, 1) returns 2
>Fix:

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


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

end of thread, other threads:[~2008-07-01  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01  7:17 pascal/2471: Wrong evaluation of functions with pascal calling convention muller
  -- strict thread matches above, loose matches on Subject: below --
2008-07-01  7:38 Pierre Muller
2008-06-23 13:18 _tom_

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).