Thierry | 2 Feb 14:44 2009
Picon

Problem to backtrace the stack on an ARM target

Hi,

I'm using GDB to debug an application on a remote ARM target, compiled in Thumb mode (16-bit).
When the size of the locals is too big (apparently something close to 512 bytes), GDB is unable to display the
call stack.

See sample code below:
void NoBugStack(void)
{
        char buf[508];

        buf[0] = 0;
}

void BugStack(void)
{
        char buf[509];

        buf[0] = 0;
}

When you set a breakpoint at line 5 (function "NoBugStack"), everything's fine. On the other hand, when you
set a breakpoint at line 12 (function "BugStack"), GDB is unable to display the call stack (the command
"bt" returns an error). The only difference between the 2 functions is
the size of the locals.

The file was compiled with GCC 3.4.3, with the following command line:
arm-elf-gcc.exe -g -c -Wall -Wcast-align -mthumb-interwork -mlittle-endian -msoft-float -pipe
-mcpu=arm920t -fomit-frame-pointer -fshort-enums -mstructure-size-boundary=8 -mthumb

(Continue reading)

Kristofer Krus | 2 Feb 21:01 2009
Picon

Removal from subscription lists

Hello.

This is the second time I write to you in order to be removed from the GDB subscription lists. I want to be removed from all mailing lists hosted by gnu.org that I am currently subscribed to. Last time I made this request mails still keept coming from you. Why wasn't I removed from the mailing lists, and can the problem be solved? I have no idea how to unscribe manually, and I would be very glad if you could help me with this.

Thank you in advance!

/Kristofer

Krama någon i vinter! Hitta kärleken här! MSN Dejting
Maciej Piechotka | 13 Feb 18:04 2009
Picon

Interfacing gdb

Is it possible to write a plugin to gdb (i.e. program which may examin
data provided by gdb - possibly from gdb)? Preferably in some sort of
scripting language.

Regards
--

-- 
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)

Charles Manning | 15 Feb 19:38 2009
Picon

Re: Interfacing gdb

On Saturday 14 February 2009 06:04:21 Maciej Piechotka wrote:
> Is it possible to write a plugin to gdb (i.e. program which may examin
> data provided by gdb - possibly from gdb)? Preferably in some sort of
> scripting language.

You don't really need a plug in.

gdb has a a very flexible built-in  macro language that allows you to write a 
lot of very useful scripts that can do all sorts of things.

Google for gdb macro and you will find such interesting things as:
http://www.ibm.com/developerworks/aix/library/au-gdb.html

Maciej Piechotka | 19 Feb 07:33 2009
Picon

Re: Interfacing gdb

Charles Manning <manningc2 <at> actrix.gen.nz> writes:

> On Saturday 14 February 2009 06:04:21 Maciej Piechotka wrote:
>> Is it possible to write a plugin to gdb (i.e. program which may examin
>> data provided by gdb - possibly from gdb)? Preferably in some sort of
>> scripting language.
>
> You don't really need a plug in.
>
> gdb has a a very flexible built-in  macro language that allows you to write a 
> lot of very useful scripts that can do all sorts of things.
>
> Google for gdb macro and you will find such interesting things as:
> http://www.ibm.com/developerworks/aix/library/au-gdb.html
>

Thanks. But I AFAIR the built-in macro language does not have bindings
to any GUI widget library...

Regards
--

-- 
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)

Sam Steingold | 20 Feb 18:06 2009
Picon

Re: Interfacing gdb

Charles Manning wrote:
> On Saturday 14 February 2009 06:04:21 Maciej Piechotka wrote:
>> Is it possible to write a plugin to gdb (i.e. program which may examin
>> data provided by gdb - possibly from gdb)? Preferably in some sort of
>> scripting language.
> 
> You don't really need a plug in.
> 
> gdb has a a very flexible built-in  macro language that allows you to write a 
> lot of very useful scripts that can do all sorts of things.

"flexible"?!
gdb is a great debugger, but to say that the macro system is lacking is to make 
a gross understatement.

e.g., http://article.gmane.org/gmane.comp.gdb.general/445:

the following:

define break_foo_bar
   break foo
   commands
     print x
   end
   break bar
   commands
     print y
   end
end

does not work because, apparently, the first "end" closes both
"commands" and "define" and there is no file loaded at this time, so I
get this error:
.gdbinit:97: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.

Is there a way around this problem?

Charles Manning | 22 Feb 22:35 2009
Picon

Re: Interfacing gdb

On Saturday 21 February 2009 06:06:56 Sam Steingold wrote:
> Charles Manning wrote:
> > On Saturday 14 February 2009 06:04:21 Maciej Piechotka wrote:
> >> Is it possible to write a plugin to gdb (i.e. program which may examin
> >> data provided by gdb - possibly from gdb)? Preferably in some sort of
> >> scripting language.
> >
> > You don't really need a plug in.
> >
> > gdb has a a very flexible built-in  macro language that allows you to
> > write a lot of very useful scripts that can do all sorts of things.
>
> "flexible"?!
> gdb is a great debugger, but to say that the macro system is lacking is to
> make a gross understatement.
>
> e.g., http://article.gmane.org/gmane.comp.gdb.general/445:
>
> the following:
>
> define break_foo_bar
>    break foo
>    commands
>      print x
>    end
>    break bar
>    commands
>      print y
>    end
> end
>
> does not work because, apparently, the first "end" closes both
> "commands" and "define" and there is no file loaded at this time, so I
> get this error:
> .gdbinit:97: Error in sourced command file:
> No symbol table is loaded.  Use the "file" command.
>
> Is there a way around this problem?

There are some ugly things like this.

How about this...

Instead of creating a break_foo_bar macro you instead make a break_foo_bar 
command file (let's say break_foo_bar.cmd) containing:
    break foo
    commands
      print x
    end
    break bar
    commands
      print y
    end

When you want to run this, you type

source break_foo_bar.cmd

If you want, you should be able to maco-ize that:

define break_foo_bar
  source break_foo_bar.cmd
end

and then have a macro

thejes | 24 Feb 17:03 2009
Picon

Problem with gdb hook command


Hi all,

I have gdb version 6.8 connected to openOCD for jtag ARM target . It is
working fine for ARM executables. When i am using , hook-stop in a script
and so executing number of commands for every steps, I have noticed that ,
for each step commands  debugging becomes slower and slower.When i went
through gdbserver code,i found that the memory accessing packet request from
gdb to gdbserver increasing each time, according to the number of commands
in the script (under hook-stop). After few steps the delay  is significant!,
(have to wait more than 8 seconds after  a step to reach the control back to
user). 

Did anybody notice this? Can anybody help me to solve this issue?

Thanks in advance
Thejus

--

-- 
View this message in context: http://www.nabble.com/Problem-with-gdb-hook-command-tp22182062p22182062.html
Sent from the Gnu - gdb - General mailing list archive at Nabble.com.


Gmane