All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't enable reverse debugging
@ 2016-12-08 19:50 Bryan Evenson
  2016-12-09 16:43 ` Bryan Evenson
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Evenson @ 2016-12-08 19:50 UTC (permalink / raw)
  To: yocto

I'm on poky/dizzy and I'm getting a segementation fault in my application that I think may be related to a buffer overflow.  I'm using the Eclipse plug-in (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying to enable reverse debugging but I have not had any success and I'm looking for some help.

My target processor is an SAM9G25 (ARM926EJ-S core).  I have been able to debug through Eclipse on the target hardware without issue.  I tried enabling Reverse Debugging by going to Window->Customize Perspective...->Command Groups Availability and selecting "Reverse Debugging".  Now there is a "Reverse Toggle" button on my toolbar, but it is always grayed out whether I have a debug session running or not.  I have also tried entering the command "record" from the GDB console after my program breaks at main.  When I run the program, I get the error message "Process record: failed to record execution log".

Is there something that I'm missing from my build steps or some Eclipse plugin that I may be missing that is causing issues for reverse debugging?  Or is there some hardware requirement that my system may not meet?

Thanks,
Bryan


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

* Re: Can't enable reverse debugging
  2016-12-08 19:50 Can't enable reverse debugging Bryan Evenson
@ 2016-12-09 16:43 ` Bryan Evenson
  2016-12-10 21:25   ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Evenson @ 2016-12-09 16:43 UTC (permalink / raw)
  To: Bryan Evenson, yocto

I tried a few other things, see below.

> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
> Sent: Thursday, December 08, 2016 2:50 PM
> To: yocto@yoctoproject.org
> Subject: [yocto] Can't enable reverse debugging
> 
> I'm on poky/dizzy and I'm getting a segementation fault in my application
> that I think may be related to a buffer overflow.  I'm using the Eclipse plug-in
> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying to enable
> reverse debugging but I have not had any success and I'm looking for some
> help.
> 
> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been able to
> debug through Eclipse on the target hardware without issue.  I tried enabling
> Reverse Debugging by going to Window->Customize Perspective...-
> >Command Groups Availability and selecting "Reverse Debugging".  Now
> there is a "Reverse Toggle" button on my toolbar, but it is always grayed out
> whether I have a debug session running or not.  I have also tried entering the
> command "record" from the GDB console after my program breaks at main.
> When I run the program, I get the error message "Process record: failed to
> record execution log".

I tried first running my application, pausing the debugger and then sending the "record" command.  When I continued debugging, I got the following GDB error:

....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0/gdb-7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

I did some looking around and I couldn't see any reasonable answer to why this would happen.  I also just noticed that for the Debug Configurations under Eclipse, the debugger settings tab doesn't have "Enable Reverse Debugging at startup" option listed for the C/C++ Remote Application debugging type.  Is this option just not available to me with my environment?

Thanks,
Bryan

> 
> Is there something that I'm missing from my build steps or some Eclipse
> plugin that I may be missing that is causing issues for reverse debugging?  Or
> is there some hardware requirement that my system may not meet?
> 
> Thanks,
> Bryan
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

* Re: Can't enable reverse debugging
  2016-12-09 16:43 ` Bryan Evenson
@ 2016-12-10 21:25   ` Khem Raj
  2016-12-12 14:59     ` Bryan Evenson
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2016-12-10 21:25 UTC (permalink / raw)
  To: Bryan Evenson; +Cc: yocto

On Fri, Dec 9, 2016 at 8:43 AM, Bryan Evenson <bevenson@melinkcorp.com> wrote:
> I tried a few other things, see below.
>
>> -----Original Message-----
>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
>> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
>> Sent: Thursday, December 08, 2016 2:50 PM
>> To: yocto@yoctoproject.org
>> Subject: [yocto] Can't enable reverse debugging
>>
>> I'm on poky/dizzy and I'm getting a segementation fault in my application
>> that I think may be related to a buffer overflow.  I'm using the Eclipse plug-in
>> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying to enable
>> reverse debugging but I have not had any success and I'm looking for some
>> help.
>>
>> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been able to
>> debug through Eclipse on the target hardware without issue.  I tried enabling
>> Reverse Debugging by going to Window->Customize Perspective...-
>> >Command Groups Availability and selecting "Reverse Debugging".  Now
>> there is a "Reverse Toggle" button on my toolbar, but it is always grayed out
>> whether I have a debug session running or not.  I have also tried entering the
>> command "record" from the GDB console after my program breaks at main.
>> When I run the program, I get the error message "Process record: failed to
>> record execution log".
>
> I tried first running my application, pausing the debugger and then sending the "record" command.  When I continued debugging, I got the following GDB error:
>
> ....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0/gdb-7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
>
> I did some looking around and I couldn't see any reasonable answer to why this would happen.  I also just noticed that for the Debug Configurations under Eclipse, the debugger settings tab doesn't have "Enable Reverse Debugging at startup" option listed for the C/C++ Remote Application debugging type.  Is this option just not available to me with my environment?

This could mean many things but one area I know is troublesome is
python support. Sometimes there are issues between
fundamental types, can you check if the error happens when gdb is
running some pythonic stuff.


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

* Re: Can't enable reverse debugging
  2016-12-10 21:25   ` Khem Raj
@ 2016-12-12 14:59     ` Bryan Evenson
  2016-12-12 17:47       ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Evenson @ 2016-12-12 14:59 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

Khem,

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Saturday, December 10, 2016 4:26 PM
> To: Bryan Evenson <bevenson@melinkcorp.com>
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Can't enable reverse debugging
> 
> On Fri, Dec 9, 2016 at 8:43 AM, Bryan Evenson <bevenson@melinkcorp.com>
> wrote:
> > I tried a few other things, see below.
> >
> >> -----Original Message-----
> >> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> >> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
> >> Sent: Thursday, December 08, 2016 2:50 PM
> >> To: yocto@yoctoproject.org
> >> Subject: [yocto] Can't enable reverse debugging
> >>
> >> I'm on poky/dizzy and I'm getting a segementation fault in my application
> >> that I think may be related to a buffer overflow.  I'm using the Eclipse
> plug-in
> >> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying to
> enable
> >> reverse debugging but I have not had any success and I'm looking for
> some
> >> help.
> >>
> >> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been able
> to
> >> debug through Eclipse on the target hardware without issue.  I tried
> enabling
> >> Reverse Debugging by going to Window->Customize Perspective...-
> >> >Command Groups Availability and selecting "Reverse Debugging".  Now
> >> there is a "Reverse Toggle" button on my toolbar, but it is always grayed
> out
> >> whether I have a debug session running or not.  I have also tried entering
> the
> >> command "record" from the GDB console after my program breaks at
> main.
> >> When I run the program, I get the error message "Process record: failed
> to
> >> record execution log".
> >
> > I tried first running my application, pausing the debugger and then sending
> the "record" command.  When I continued debugging, I got the following
> GDB error:
> >
> > ....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0/gdb-
> 7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
> > A problem internal to GDB has been detected,
> > further debugging may prove unreliable.
> >
> > I did some looking around and I couldn't see any reasonable answer to why
> this would happen.  I also just noticed that for the Debug Configurations
> under Eclipse, the debugger settings tab doesn't have "Enable Reverse
> Debugging at startup" option listed for the C/C++ Remote Application
> debugging type.  Is this option just not available to me with my environment?
> 
> This could mean many things but one area I know is troublesome is
> python support. Sometimes there are issues between
> fundamental types, can you check if the error happens when gdb is
> running some pythonic stuff.

Could you explain how to do this?  I don't use Python so I'm not sure if I'm doing a valid test.  I tried to debug a Python script with GDB through Eclipse and I wasn't successful.  I then went through the command line and was able to remotely run a simple Python script (print "Hello, Python" once per second) through GDB.  If I issued a "record" command through GDB first, then when I tried to debug the Python script I'd immediately get a segmentation fault.

Is there something specific you'd like me to try?  If you think the Python support may be the issue, is there something I should be verifying is present or is at a certain version?

Thanks,
Bryan

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

* Re: Can't enable reverse debugging
  2016-12-12 14:59     ` Bryan Evenson
@ 2016-12-12 17:47       ` Khem Raj
  2016-12-12 19:12         ` Bryan Evenson
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2016-12-12 17:47 UTC (permalink / raw)
  To: Bryan Evenson; +Cc: yocto


> On Dec 12, 2016, at 6:59 AM, Bryan Evenson <bevenson@melinkcorp.com> wrote:
> 
> Khem,
> 
>> -----Original Message-----
>> From: Khem Raj [mailto:raj.khem@gmail.com]
>> Sent: Saturday, December 10, 2016 4:26 PM
>> To: Bryan Evenson <bevenson@melinkcorp.com>
>> Cc: yocto@yoctoproject.org
>> Subject: Re: [yocto] Can't enable reverse debugging
>> 
>> On Fri, Dec 9, 2016 at 8:43 AM, Bryan Evenson <bevenson@melinkcorp.com>
>> wrote:
>>> I tried a few other things, see below.
>>> 
>>>> -----Original Message-----
>>>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
>>>> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
>>>> Sent: Thursday, December 08, 2016 2:50 PM
>>>> To: yocto@yoctoproject.org
>>>> Subject: [yocto] Can't enable reverse debugging
>>>> 
>>>> I'm on poky/dizzy and I'm getting a segementation fault in my application
>>>> that I think may be related to a buffer overflow.  I'm using the Eclipse
>> plug-in
>>>> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying to
>> enable
>>>> reverse debugging but I have not had any success and I'm looking for
>> some
>>>> help.
>>>> 
>>>> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been able
>> to
>>>> debug through Eclipse on the target hardware without issue.  I tried
>> enabling
>>>> Reverse Debugging by going to Window->Customize Perspective...-
>>>>> Command Groups Availability and selecting "Reverse Debugging".  Now
>>>> there is a "Reverse Toggle" button on my toolbar, but it is always grayed
>> out
>>>> whether I have a debug session running or not.  I have also tried entering
>> the
>>>> command "record" from the GDB console after my program breaks at
>> main.
>>>> When I run the program, I get the error message "Process record: failed
>> to
>>>> record execution log".
>>> 
>>> I tried first running my application, pausing the debugger and then sending
>> the "record" command.  When I continued debugging, I got the following
>> GDB error:
>>> 
>>> ....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0/gdb-
>> 7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
>>> A problem internal to GDB has been detected,
>>> further debugging may prove unreliable.
>>> 
>>> I did some looking around and I couldn't see any reasonable answer to why
>> this would happen.  I also just noticed that for the Debug Configurations
>> under Eclipse, the debugger settings tab doesn't have "Enable Reverse
>> Debugging at startup" option listed for the C/C++ Remote Application
>> debugging type.  Is this option just not available to me with my environment?
>> 
>> This could mean many things but one area I know is troublesome is
>> python support. Sometimes there are issues between
>> fundamental types, can you check if the error happens when gdb is
>> running some pythonic stuff.
> 
> Could you explain how to do this?  I don't use Python so I'm not sure if I'm doing a valid test.  I tried to debug a Python script with GDB through Eclipse and I wasn't successful.  I then went through the command line and was able to remotely run a simple Python script (print "Hello, Python" once per second) through GDB.  If I issued a "record" command through GDB first, then when I tried to debug the Python script I'd immediately get a segmentation fault.
> 
> Is there something specific you'd like me to try?  If you think the Python support may be the issue, is there something I should be verifying is present or is at a certain version?
> 

Disable python support in gdb and compile it e.g.

> Thanks,
> Bryan



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

* Re: Can't enable reverse debugging
  2016-12-12 17:47       ` Khem Raj
@ 2016-12-12 19:12         ` Bryan Evenson
  2016-12-12 19:54           ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Evenson @ 2016-12-12 19:12 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

Khem,

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Monday, December 12, 2016 12:48 PM
> To: Bryan Evenson <bevenson@melinkcorp.com>
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Can't enable reverse debugging
> 
> 
> > On Dec 12, 2016, at 6:59 AM, Bryan Evenson <bevenson@melinkcorp.com>
> wrote:
> >
> > Khem,
> >
> >> -----Original Message-----
> >> From: Khem Raj [mailto:raj.khem@gmail.com]
> >> Sent: Saturday, December 10, 2016 4:26 PM
> >> To: Bryan Evenson <bevenson@melinkcorp.com>
> >> Cc: yocto@yoctoproject.org
> >> Subject: Re: [yocto] Can't enable reverse debugging
> >>
> >> On Fri, Dec 9, 2016 at 8:43 AM, Bryan Evenson
> >> <bevenson@melinkcorp.com>
> >> wrote:
> >>> I tried a few other things, see below.
> >>>
> >>>> -----Original Message-----
> >>>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> >>>> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
> >>>> Sent: Thursday, December 08, 2016 2:50 PM
> >>>> To: yocto@yoctoproject.org
> >>>> Subject: [yocto] Can't enable reverse debugging
> >>>>
> >>>> I'm on poky/dizzy and I'm getting a segementation fault in my
> >>>> application that I think may be related to a buffer overflow.  I'm
> >>>> using the Eclipse
> >> plug-in
> >>>> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying
> >>>> to
> >> enable
> >>>> reverse debugging but I have not had any success and I'm looking
> >>>> for
> >> some
> >>>> help.
> >>>>
> >>>> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been
> >>>> able
> >> to
> >>>> debug through Eclipse on the target hardware without issue.  I
> >>>> tried
> >> enabling
> >>>> Reverse Debugging by going to Window->Customize Perspective...-
> >>>>> Command Groups Availability and selecting "Reverse Debugging".
> >>>>> Now
> >>>> there is a "Reverse Toggle" button on my toolbar, but it is always
> >>>> grayed
> >> out
> >>>> whether I have a debug session running or not.  I have also tried
> >>>> entering
> >> the
> >>>> command "record" from the GDB console after my program breaks at
> >> main.
> >>>> When I run the program, I get the error message "Process record:
> >>>> failed
> >> to
> >>>> record execution log".
> >>>
> >>> I tried first running my application, pausing the debugger and then
> >>> sending
> >> the "record" command.  When I continued debugging, I got the
> >> following GDB error:
> >>>
> >>> ....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0/g
> >>> db-
> >> 7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
> >>> A problem internal to GDB has been detected, further debugging may
> >>> prove unreliable.
> >>>
> >>> I did some looking around and I couldn't see any reasonable answer
> >>> to why
> >> this would happen.  I also just noticed that for the Debug
> >> Configurations under Eclipse, the debugger settings tab doesn't have
> >> "Enable Reverse Debugging at startup" option listed for the C/C++
> >> Remote Application debugging type.  Is this option just not available to me
> with my environment?
> >>
> >> This could mean many things but one area I know is troublesome is
> >> python support. Sometimes there are issues between fundamental
> types,
> >> can you check if the error happens when gdb is running some pythonic
> >> stuff.
> >
> > Could you explain how to do this?  I don't use Python so I'm not sure if I'm
> doing a valid test.  I tried to debug a Python script with GDB through Eclipse
> and I wasn't successful.  I then went through the command line and was able
> to remotely run a simple Python script (print "Hello, Python" once per
> second) through GDB.  If I issued a "record" command through GDB first,
> then when I tried to debug the Python script I'd immediately get a
> segmentation fault.
> >
> > Is there something specific you'd like me to try?  If you think the Python
> support may be the issue, is there something I should be verifying is present
> or is at a certain version?
> >
> 
> Disable python support in gdb and compile it e.g.

I rebuilt gdb.  I used the --configure option to verify that my previous gdb did have the "--with-python" option present and that my newly built gdb did not have that option anymore.  I no longer can produce the " internal-error: virtual memory exhausted" error, but whenever I try to record I still get the "Process record: failed to record execution log" when I run the application.  If it helps, here's the configuration output from GDB:

This GDB was configured as follows:
   configure --host=x86_64-linux --target=arm-poky-linux-gnueabi
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=~/poky/poky-build/tmp/sysroots/x86_64-linux/usr/share/gdb-arm926ejste-poky-linux-gnueabi/gdb (relocatable)
             --with-jit-reader-dir=~/poky/poky-build/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/gdb (relocatable)
             --without-libunwind-ia64
             --without-lzma
             --with-separate-debug-dir=~/poky/poky-build/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/debug (relocatable)
             --with-zlib
             --without-babeltrace

Any additional suggestions would be appreciated.

Thanks,
Bryan

> 
> > Thanks,
> > Bryan



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

* Re: Can't enable reverse debugging
  2016-12-12 19:12         ` Bryan Evenson
@ 2016-12-12 19:54           ` Khem Raj
  2016-12-12 21:48             ` Bryan Evenson
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2016-12-12 19:54 UTC (permalink / raw)
  To: Bryan Evenson; +Cc: yocto


> On Dec 12, 2016, at 11:12 AM, Bryan Evenson <bevenson@melinkcorp.com> wrote:
> 
> Khem,
> 
>> -----Original Message-----
>> From: Khem Raj [mailto:raj.khem@gmail.com]
>> Sent: Monday, December 12, 2016 12:48 PM
>> To: Bryan Evenson <bevenson@melinkcorp.com>
>> Cc: yocto@yoctoproject.org
>> Subject: Re: [yocto] Can't enable reverse debugging
>> 
>> 
>>> On Dec 12, 2016, at 6:59 AM, Bryan Evenson <bevenson@melinkcorp.com>
>> wrote:
>>> 
>>> Khem,
>>> 
>>>> -----Original Message-----
>>>> From: Khem Raj [mailto:raj.khem@gmail.com]
>>>> Sent: Saturday, December 10, 2016 4:26 PM
>>>> To: Bryan Evenson <bevenson@melinkcorp.com>
>>>> Cc: yocto@yoctoproject.org
>>>> Subject: Re: [yocto] Can't enable reverse debugging
>>>> 
>>>> On Fri, Dec 9, 2016 at 8:43 AM, Bryan Evenson
>>>> <bevenson@melinkcorp.com>
>>>> wrote:
>>>>> I tried a few other things, see below.
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
>>>>>> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
>>>>>> Sent: Thursday, December 08, 2016 2:50 PM
>>>>>> To: yocto@yoctoproject.org
>>>>>> Subject: [yocto] Can't enable reverse debugging
>>>>>> 
>>>>>> I'm on poky/dizzy and I'm getting a segementation fault in my
>>>>>> application that I think may be related to a buffer overflow.  I'm
>>>>>> using the Eclipse
>>>> plug-in
>>>>>> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm trying
>>>>>> to
>>>> enable
>>>>>> reverse debugging but I have not had any success and I'm looking
>>>>>> for
>>>> some
>>>>>> help.
>>>>>> 
>>>>>> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been
>>>>>> able
>>>> to
>>>>>> debug through Eclipse on the target hardware without issue.  I
>>>>>> tried
>>>> enabling
>>>>>> Reverse Debugging by going to Window->Customize Perspective...-
>>>>>>> Command Groups Availability and selecting "Reverse Debugging".
>>>>>>> Now
>>>>>> there is a "Reverse Toggle" button on my toolbar, but it is always
>>>>>> grayed
>>>> out
>>>>>> whether I have a debug session running or not.  I have also tried
>>>>>> entering
>>>> the
>>>>>> command "record" from the GDB console after my program breaks at
>>>> main.
>>>>>> When I run the program, I get the error message "Process record:
>>>>>> failed
>>>> to
>>>>>> record execution log".
>>>>> 
>>>>> I tried first running my application, pausing the debugger and then
>>>>> sending
>>>> the "record" command.  When I continued debugging, I got the
>>>> following GDB error:
>>>>> 
>>>>> ....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0/g
>>>>> db-
>>>> 7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
>>>>> A problem internal to GDB has been detected, further debugging may
>>>>> prove unreliable.
>>>>> 
>>>>> I did some looking around and I couldn't see any reasonable answer
>>>>> to why
>>>> this would happen.  I also just noticed that for the Debug
>>>> Configurations under Eclipse, the debugger settings tab doesn't have
>>>> "Enable Reverse Debugging at startup" option listed for the C/C++
>>>> Remote Application debugging type.  Is this option just not available to me
>> with my environment?
>>>> 
>>>> This could mean many things but one area I know is troublesome is
>>>> python support. Sometimes there are issues between fundamental
>> types,
>>>> can you check if the error happens when gdb is running some pythonic
>>>> stuff.
>>> 
>>> Could you explain how to do this?  I don't use Python so I'm not sure if I'm
>> doing a valid test.  I tried to debug a Python script with GDB through Eclipse
>> and I wasn't successful.  I then went through the command line and was able
>> to remotely run a simple Python script (print "Hello, Python" once per
>> second) through GDB.  If I issued a "record" command through GDB first,
>> then when I tried to debug the Python script I'd immediately get a
>> segmentation fault.
>>> 
>>> Is there something specific you'd like me to try?  If you think the Python
>> support may be the issue, is there something I should be verifying is present
>> or is at a certain version?
>>> 
>> 
>> Disable python support in gdb and compile it e.g.
> 
> I rebuilt gdb.  I used the --configure option to verify that my previous gdb did have the "--with-python" option present and that my newly built gdb did not have that option anymore.  I no longer can produce the " internal-error: virtual memory exhausted" error, but whenever I try to record I still get the "Process record: failed to record execution log" when I run the application.  If it helps, here's the configuration output from GDB:
> 
> This GDB was configured as follows:
>   configure --host=x86_64-linux --target=arm-poky-linux-gnueabi
>             --with-auto-load-dir=$debugdir:$datadir/auto-load
>             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
>             --with-expat
>             --with-gdb-datadir=~/poky/poky-build/tmp/sysroots/x86_64-linux/usr/share/gdb-arm926ejste-poky-linux-gnueabi/gdb (relocatable)
>             --with-jit-reader-dir=~/poky/poky-build/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/gdb (relocatable)
>             --without-libunwind-ia64
>             --without-lzma
>             --with-separate-debug-dir=~/poky/poky-build/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/debug (relocatable)
>             --with-zlib
>             --without-babeltrace
> 
> Any additional suggestions would be appreciated.

Can you build an application with out splitting the debug info. May be have toolchain on target and then compile a program natively and see if that works

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

* Re: Can't enable reverse debugging
  2016-12-12 19:54           ` Khem Raj
@ 2016-12-12 21:48             ` Bryan Evenson
  0 siblings, 0 replies; 8+ messages in thread
From: Bryan Evenson @ 2016-12-12 21:48 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto



> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Monday, December 12, 2016 2:54 PM
> To: Bryan Evenson <bevenson@melinkcorp.com>
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Can't enable reverse debugging
> 
> 
> > On Dec 12, 2016, at 11:12 AM, Bryan Evenson
> <bevenson@melinkcorp.com> wrote:
> >
> > Khem,
> >
> >> -----Original Message-----
> >> From: Khem Raj [mailto:raj.khem@gmail.com]
> >> Sent: Monday, December 12, 2016 12:48 PM
> >> To: Bryan Evenson <bevenson@melinkcorp.com>
> >> Cc: yocto@yoctoproject.org
> >> Subject: Re: [yocto] Can't enable reverse debugging
> >>
> >>
> >>> On Dec 12, 2016, at 6:59 AM, Bryan Evenson
> <bevenson@melinkcorp.com>
> >> wrote:
> >>>
> >>> Khem,
> >>>
> >>>> -----Original Message-----
> >>>> From: Khem Raj [mailto:raj.khem@gmail.com]
> >>>> Sent: Saturday, December 10, 2016 4:26 PM
> >>>> To: Bryan Evenson <bevenson@melinkcorp.com>
> >>>> Cc: yocto@yoctoproject.org
> >>>> Subject: Re: [yocto] Can't enable reverse debugging
> >>>>
> >>>> On Fri, Dec 9, 2016 at 8:43 AM, Bryan Evenson
> >>>> <bevenson@melinkcorp.com>
> >>>> wrote:
> >>>>> I tried a few other things, see below.
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> >>>>>> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
> >>>>>> Sent: Thursday, December 08, 2016 2:50 PM
> >>>>>> To: yocto@yoctoproject.org
> >>>>>> Subject: [yocto] Can't enable reverse debugging
> >>>>>>
> >>>>>> I'm on poky/dizzy and I'm getting a segementation fault in my
> >>>>>> application that I think may be related to a buffer overflow.
> >>>>>> I'm using the Eclipse
> >>>> plug-in
> >>>>>> (on Eclipse Kepler) to debug on the hardware with GDB.  I'm
> >>>>>> trying to
> >>>> enable
> >>>>>> reverse debugging but I have not had any success and I'm looking
> >>>>>> for
> >>>> some
> >>>>>> help.
> >>>>>>
> >>>>>> My target processor is an SAM9G25 (ARM926EJ-S core).  I have been
> >>>>>> able
> >>>> to
> >>>>>> debug through Eclipse on the target hardware without issue.  I
> >>>>>> tried
> >>>> enabling
> >>>>>> Reverse Debugging by going to Window->Customize Perspective...-
> >>>>>>> Command Groups Availability and selecting "Reverse Debugging".
> >>>>>>> Now
> >>>>>> there is a "Reverse Toggle" button on my toolbar, but it is
> >>>>>> always grayed
> >>>> out
> >>>>>> whether I have a debug session running or not.  I have also tried
> >>>>>> entering
> >>>> the
> >>>>>> command "record" from the GDB console after my program breaks
> at
> >>>> main.
> >>>>>> When I run the program, I get the error message "Process record:
> >>>>>> failed
> >>>> to
> >>>>>> record execution log".
> >>>>>
> >>>>> I tried first running my application, pausing the debugger and
> >>>>> then sending
> >>>> the "record" command.  When I continued debugging, I got the
> >>>> following GDB error:
> >>>>>
> >>>>> ....x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/7.7.1-r0
> >>>>> /g
> >>>>> db-
> >>>> 7.7.1/gdb/utils.c:1073: internal-error: virtual memory exhausted.
> >>>>> A problem internal to GDB has been detected, further debugging may
> >>>>> prove unreliable.
> >>>>>
> >>>>> I did some looking around and I couldn't see any reasonable answer
> >>>>> to why
> >>>> this would happen.  I also just noticed that for the Debug
> >>>> Configurations under Eclipse, the debugger settings tab doesn't
> >>>> have "Enable Reverse Debugging at startup" option listed for the
> >>>> C/C++ Remote Application debugging type.  Is this option just not
> >>>> available to me
> >> with my environment?
> >>>>
> >>>> This could mean many things but one area I know is troublesome is
> >>>> python support. Sometimes there are issues between fundamental
> >> types,
> >>>> can you check if the error happens when gdb is running some
> >>>> pythonic stuff.
> >>>
> >>> Could you explain how to do this?  I don't use Python so I'm not
> >>> sure if I'm
> >> doing a valid test.  I tried to debug a Python script with GDB
> >> through Eclipse and I wasn't successful.  I then went through the
> >> command line and was able to remotely run a simple Python script
> >> (print "Hello, Python" once per
> >> second) through GDB.  If I issued a "record" command through GDB
> >> first, then when I tried to debug the Python script I'd immediately
> >> get a segmentation fault.
> >>>
> >>> Is there something specific you'd like me to try?  If you think the
> >>> Python
> >> support may be the issue, is there something I should be verifying is
> >> present or is at a certain version?
> >>>
> >>
> >> Disable python support in gdb and compile it e.g.
> >
> > I rebuilt gdb.  I used the --configure option to verify that my previous gdb
> did have the "--with-python" option present and that my newly built gdb did
> not have that option anymore.  I no longer can produce the " internal-error:
> virtual memory exhausted" error, but whenever I try to record I still get the
> "Process record: failed to record execution log" when I run the application.  If
> it helps, here's the configuration output from GDB:
> >
> > This GDB was configured as follows:
> >   configure --host=x86_64-linux --target=arm-poky-linux-gnueabi
> >             --with-auto-load-dir=$debugdir:$datadir/auto-load
> >             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
> >             --with-expat
> >             --with-gdb-datadir=~/poky/poky-build/tmp/sysroots/x86_64-
> linux/usr/share/gdb-arm926ejste-poky-linux-gnueabi/gdb (relocatable)
> >             --with-jit-reader-dir=~/poky/poky-build/tmp/sysroots/x86_64-
> linux/usr/lib/arm-poky-linux-gnueabi/gdb (relocatable)
> >             --without-libunwind-ia64
> >             --without-lzma
> >             --with-separate-debug-dir=~/poky/poky-
> build/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/debug
> (relocatable)
> >             --with-zlib
> >             --without-babeltrace
> >
> > Any additional suggestions would be appreciated.
> 
> Can you build an application with out splitting the debug info. May be have
> toolchain on target and then compile a program natively and see if that works

For the application I am debugging through Eclipse I am using a self-built SDK to build the application.  I verified that the debugging info has not been split out from the executable that I'm using for testing.  The target I'm using only has 256MB of flash and 128MB of RAM, so I'm not sure if I'd be able to build the application natively.

Bryan


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

end of thread, other threads:[~2016-12-12 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 19:50 Can't enable reverse debugging Bryan Evenson
2016-12-09 16:43 ` Bryan Evenson
2016-12-10 21:25   ` Khem Raj
2016-12-12 14:59     ` Bryan Evenson
2016-12-12 17:47       ` Khem Raj
2016-12-12 19:12         ` Bryan Evenson
2016-12-12 19:54           ` Khem Raj
2016-12-12 21:48             ` Bryan Evenson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.