Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

I have connected to the ARM target with USB cable /dev/ttyS9 (com 10) with :

$ gdb -v
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
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 "i686-pc-cygwin".

of latest cygwin distribution, I would like to read from gdb the output of :

Function: DBGPRINTF()

Description:
This function is used to output debugging information. Since
this function may be implemented in different ways on different
platforms, care must be taken with this function to get useful
results.

On the Windows SDK, this function's output shows up in the
"Output Window". Each call to DBGPRINTF generates at most 128 bytes
of output.

On Qualcomm chipset targets, DBGPRINTF() comes out the diag port (though
this may change). The length of each output string is constrained even
more than on the Windows SDK.

In general, DBGPRINTF()'s behaviour should be tested before being
relied upon to provide useful output.

such as I can read from VS debugger on pc simulator .......

any suggestions apart from somehow redirecting DPGPRINTF to a file on device ?

will2@william2 /cygdrive/c/temp/brew/050107/050107/test
$ gdb tamactor.elf
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
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 "i686-pc-cygwin"...
Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet: $Hc-1#09..
.Sending packet: $Hc-1#09...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet: $qC#b4...Sendi
ng packet: $qC#b4...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending packet: $q
Offsets#4b...Sending packet: $qOffsets#4b...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout
(gdb) target remote /dev/ttyS9
Remote debugging using /dev/ttyS9
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received: Text=0333e564;Data=0333e564;Bss=0333e564
Sending packet: $?#3f...Ack
Packet received: S05
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $p8#a8...Ack
Packet received:
Sending packet: $g#67...Ack
Packet received: 64e5330300000000040000002615ea00d001310360f43303680231030100000
0abab0000abab0000346b3e02abab000067697d01a86a3f024c6d310360f43303000000000000000
00000000000000000000000000000000000000000000000000000000013000020
0x0000abab in ?? ()
(gdb) s
Cannot find bounds of current function
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) n
Cannot find bounds of current function
(gdb) f
#0 0x0000abab in ?? ()
(gdb) info f
Stack level 0, frame at 0x33101d4:
Sending packet: $m33101d0,4#59...Ack
Packet received: 1c5f3103
eip = 0xabab; saved eip 0x3315f1c
called by frame at 0x33101d8
Arglist at 0x33101cc, args:
Locals at 0x33101cc, Previous frame's sp is 0x33101d4
Saved registers:
eip at 0x33101d0
(gdb) i registers
eax 0x333e564 53732708
ecx 0x0 0
edx 0x4 4
ebx 0xea1526 15340838
esp 0x33101d0 0x33101d0
ebp 0x333f460 0x333f460
esi 0x3310268 53543528
edi 0x1 1
eip 0xabab 0xabab
eflags 0xabab 43947
cs 0x23e6b34 37645108
ss 0xabab 43947
ds 0x17d6967 24996199
es 0x23f6aa8 37710504
fs 0x3316d4c 53570892
gs 0x333f460 53736544
(gdb) list
1 ../../../gcc-4.1.1/gcc/config/arm/lib1funcs.asm: No such file or directo
ry.
in ../../../gcc-4.1.1/gcc/config/arm/lib1funcs.asm
(gdb) disassemble
No function contains program counter for selected frame.

(gdb) add-symbol-file tamactor.elf
add symbol table from file "tamactor.elf" at
(y or n) y
Reading symbols from /cygdrive/c/temp/brew/050107/050107/test/tamactor.elf...don
e.
Sending packet: $qSymbol::#5b...Ack
Packet received:
Packet qSymbol (symbol-lookup) is NOT supported
(gdb) c
Continuing.
Sending packet: $vCont?#49...Ack
Packet received:
Packet vCont (verbose-resume) is NOT supported
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
Remote communication error: Permission denied.
(gdb)

thanks ..........

What causes the bdb debugger on the device to say:
Re-entrant
Undef Inst
* to reset
# for dload
I enclose a screenshot of debugger .....

What causes the bdb debugger on the device to say:
Re-entrant
Undef Inst
* to reset
# for dload
I enclose a screenshot of debugger .....

what does this message from BREW I found in Applogger output of DBGPRINTF mean ? :
01/11/07 00:44:23.180022 Null argument passed to function *tsmsgbox.c 19 3 1 0 61335
is there any way to get the BREW os or BDB debugger to report possible null pointers which never happen on simulator but perhaps happens only on the cellphone handset device.
Regards.

what does this message from BREW I found in Applogger output of DBGPRINTF mean ? :
01/11/07 00:44:23.180022 Null argument passed to function *tsmsgbox.c 19 3 1 0 61335
is there any way to get the BREW os or BDB debugger to report possible null pointers which never happen on simulator but perhaps happens only on the cellphone handset device.
Regards.

it'd have to be in the code as asserts or such, since theres no way to know without the programmer adding it as to whether a NULL pointer is valid or not.
you can wrap functions and add your own tests.
the other screenshot is just a generic crash

it'd have to be in the code as asserts or such, since theres no way to know without the programmer adding it as to whether a NULL pointer is valid or not.
you can wrap functions and add your own tests.
the other screenshot is just a generic crash

Shouldn't you be executing arm-elf-gdb instead of gdb?
Were you able to get the helloworld sample application to work?

Shouldn't you be executing arm-elf-gdb instead of gdb?
Were you able to get the helloworld sample application to work?

someone else's code was writing past the end of mallocd buffers, causing overall instability, is there anyway to check heap integrity/walk the heap ? what does DUMPHEAP macro do and how to see it's output ? does it DBGPRINTF only in case of corrupt heap ? does DUMPHEAP work only on the device or also in simulator ?

someone else's code was writing past the end of mallocd buffers, causing overall instability, is there anyway to check heap integrity/walk the heap ? what does DUMPHEAP macro do and how to see it's output ? does it DBGPRINTF only in case of corrupt heap ? does DUMPHEAP work only on the device or also in simulator ?

Hi,
I am trying to connect to device with BREW.I have installed BREW debugger mod,sig,mif on device by using Apploader.
But after loading these files,device got hanged.App is properly working before copying these files to devicee.
Please anyone have solution for this issue.

Hi,
I am trying to connect to device with BREW.I have installed BREW debugger mod,sig,mif on device by using Apploader.
But after loading these files,device got hanged.App is properly working before copying these files to devicee.
Please anyone have solution for this issue.

Does device support Brew debugger? You can check support in device pack.

Does device support Brew debugger? You can check support in device pack.