Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Stefano Frullani - NOSPAM"  <stefanoDOTfrullaniATfrumarDOTit@frumar.it>
To: gdb@sources.redhat.com
Subject: gdb procfs 64bit Solaris problem
Date: Thu, 21 Apr 2005 10:50:00 -0000	[thread overview]
Message-ID: <47322.192.168.1.130.1114080541.squirrel@webmail.frumar.it> (raw)


Hi all,
I am not able to debug a simple program :


{stefano}puma:/home/stefano/temp cat ste.c
#include <stdio.h>

int main()
{
printf("Hello world\n");
return(0);
}
{stefano}puma:/home/stefano/temp gcc -m64 -g -o ste ste.c

The environnement is Sun Sparc Solaris 2.8 (Latest patch cluster). Gcc is
3.2.3. Gdb is 6.3 built from tarball.


{stefano}puma:/home/stefano/temp gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.3/specs
Configured with: ../configure --disable-nls --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 3.2.3

{stefano}puma:/home/stefano/temp gdb -v
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparcv9-sun-solaris2".

When I start debugging process I get:


{stefano}puma:/home/stefano/temp truss -o /tmp/truss.out -fea -wall -rall
gdb ste
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparcv9-sun-solaris2"...
(gdb) run
Starting program: /home/stefano/temp/ste
procfs: target_wait (wait_for_stop) line 3953, /proc/16548: Value too
large for defined data type.
(gdb) quit
The program is running.  Exit anyway? (y or n) y


Taking a look on the trace generated via truss comand :

....
....
....
16497:  open("/proc/16548", O_RDWR)                     = 6
16497:  ioctl(6, PIOCSTATUS, 0x003124B8)                = 0
16497:  ioctl(6, PIOCGTRACE, 0x0029D938)                = 0
16497:  ioctl(6, PIOCGHOLD, 0x0029D928)                 = 0
16497:  ioctl(6, PIOCGFAULT, 0x0029D948)                = 0
16497:  ioctl(6, PIOCGENTRY, 0x0029D958)                = 0
16497:  ioctl(6, PIOCGEXIT, 0x0029D998)                 = 0
16497:  sysconfig(_CONFIG_SIGRT_MIN)                    = 38
....
....
....
16497:  ioctl(6, PIOCRUN, 0xFFBEDA70)                   = 0
16497:  ioctl(6, PIOCSTATUS, 0x003124B8)                = 0
16497:  ioctl(6, PIOCWSTOP, 0x003124B8)                 Err#79 EOVERFLOW
16497:  sigaction(SIGTTOU, 0xFFBED560, 0xFFBED5E0)      = 0
....
....
....


This is the code portion from procfs.c :


  3930        if (!(proc_flags (pi) & (PR_STOPPED | PR_ISTOP)) &&
  3931            !proc_wait_for_stop (pi))
  3932          {
  3933            /* wait_for_stop failed: has the child terminated? */
  3934            if (errno == ENOENT)
  3935              {
  3936                int wait_retval;
  3937
  3938                /* /proc file not found; presumably child has
terminated. */
  3939                wait_retval = wait (&wstat); /* "wait" for the
child's exit  */
  3940
  3941                if (wait_retval != PIDGET (inferior_ptid)) /* wrong
child? */
  3942                  error ("procfs: couldn't stop process %d: wait
returned %d\n",
  3943                         PIDGET (inferior_ptid), wait_retval);
  3944                /* FIXME: might I not just use waitpid?
  3945                   Or try find_procinfo to see if I know about this
child? */
  3946                retval = pid_to_ptid (wait_retval);
  3947              }
  3948            else if (errno == EINTR)
  3949              goto wait_again;
  3950            else
  3951              {
  3952                /* Unknown error from wait_for_stop. */
  3953                proc_error (pi, "target_wait (wait_for_stop)",
__LINE__);
  3954              }
  3955          }
  3956        else

It seems that process cannot be stopped.

Debugging 32bit compile works fine.

I have searched on mailing lists but I was not able to find a way to solve
this.

Any hint would be appreciated.



Stefano Frullani



.


             reply	other threads:[~2005-04-21 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21 10:50 Stefano Frullani - NOSPAM [this message]
2005-04-21 12:37 ` M.M. Kettenis
2005-04-21 14:31   ` Stefano Frullani
2005-04-21 14:35     ` Daniel Jacobowitz
2005-04-21 14:41       ` Stefano Frullani - NOSPAM
2005-04-21 18:38       ` Eli Zaretskii
2005-04-21 19:27       ` Mark Kettenis
2005-04-21 19:28         ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47322.192.168.1.130.1114080541.squirrel@webmail.frumar.it \
    --to=stefanodotfrullaniatfrumardotit@frumar.it \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox