Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* exec
@ 2005-01-02  3:40 Russell Shaw
  2005-01-02  3:47 ` exec Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Russell Shaw @ 2005-01-02  3:40 UTC (permalink / raw)
  To: gdb

Hi,
When i step into:

   (*func) (program, argv);

gdb exits.

func is execv, and program is "/usr/local/libexec/gcc/avr/3.4.3/cc1"

How do i get into cc1 so i can set breakpoints there?


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

* Re: exec
  2005-01-02  3:40 exec Russell Shaw
@ 2005-01-02  3:47 ` Daniel Jacobowitz
  2005-01-02  7:12   ` exec Russell Shaw
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2005-01-02  3:47 UTC (permalink / raw)
  To: Russell Shaw; +Cc: gdb

On Sun, Jan 02, 2005 at 02:44:55PM +1100, Russell Shaw wrote:
> Hi,
> When i step into:
> 
>   (*func) (program, argv);
> 
> gdb exits.
> 
> func is execv, and program is "/usr/local/libexec/gcc/avr/3.4.3/cc1"
> 
> How do i get into cc1 so i can set breakpoints there?

Run it by hand - gcc -v will show you the command line.  GDB has very
limited support for debugging across exec, depending on your platform.

-- 
Daniel Jacobowitz


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

* Re: exec
  2005-01-02  3:47 ` exec Daniel Jacobowitz
@ 2005-01-02  7:12   ` Russell Shaw
  2005-01-02  9:16     ` exec Russell Shaw
  0 siblings, 1 reply; 4+ messages in thread
From: Russell Shaw @ 2005-01-02  7:12 UTC (permalink / raw)
  Cc: gdb

Daniel Jacobowitz wrote:
> On Sun, Jan 02, 2005 at 02:44:55PM +1100, Russell Shaw wrote:
> 
>>Hi,
>>When i step into:
>>
>>  (*func) (program, argv);
>>
>>gdb exits.
>>
>>func is execv, and program is "/usr/local/libexec/gcc/avr/3.4.3/cc1"
>>
>>How do i get into cc1 so i can set breakpoints there?
> 
> Run it by hand - gcc -v will show you the command line.  GDB has very
> limited support for debugging across exec, depending on your platform.

Hi,
Cc1 runs ok at the command line:

   /usr/local/libexec/gcc/avr/3.4.3/cc1 -quiet -v main.c -quiet -dumpbase main.c -dP -mmcu=atmega16 
-auxbase main -g -O0 -Wall -Wno-unused -version -o /tmp/cccVrfqY.s

When i try to run the same thing in gdb, it crashes:

   Program received signal SIGSEGV, Segmentation fault.
   0x080f3cd1 in init_emit () at ../../gcc-3.4.3/gcc/emit-rtl.c:5354
   /home/russell/SRC/gcc-3.4.3/gcc/emit-rtl.c:5354:138102:beg:0x80f3cd1
   (gdb)

It crashes in emit-rtl.c here:

   /* Indicate that the virtual registers and stack locations are
      all pointers.  */
   REG_POINTER (stack_pointer_rtx) = 1;


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

* Re: exec
  2005-01-02  7:12   ` exec Russell Shaw
@ 2005-01-02  9:16     ` Russell Shaw
  0 siblings, 0 replies; 4+ messages in thread
From: Russell Shaw @ 2005-01-02  9:16 UTC (permalink / raw)
  Cc: gdb

Russell Shaw wrote:
> Daniel Jacobowitz wrote:
> 
>> On Sun, Jan 02, 2005 at 02:44:55PM +1100, Russell Shaw wrote:
...
> 
> It crashes in emit-rtl.c here:
> 
>   /* Indicate that the virtual registers and stack locations are
>      all pointers.  */
>   REG_POINTER (stack_pointer_rtx) = 1;
> 

oops never mind, i had a spurious '=' sign in the command line
i passed in .gdbinit


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

end of thread, other threads:[~2005-01-02  9:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-02  3:40 exec Russell Shaw
2005-01-02  3:47 ` exec Daniel Jacobowitz
2005-01-02  7:12   ` exec Russell Shaw
2005-01-02  9:16     ` exec Russell Shaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox