Starting the GDB server (#adhd problems lol)

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Starting the GDB server (#adhd problems lol)

Post by Corbin »

Hey all,

I'm trying to set up GDB so I can follow stack traces, but I have completely forgotten how to do this :S

I have my engine set up to compile with -g so it can generate these. I'm using dc-tool IP GUI V2 to send the
ELF to dcload-IP 1.0.5. While it normally works fine, trying to set the option to start the GDB server in dctool-gui v2
doesn't actually seem to do anything.

Now, I know for a fact I got this working before, it's just been so long and my ADHD just makes me forget everything
I learn.

So, this is what my console output looks like right now:
Starting a GDB server on port 2159
Console enabled
Cdfs redirection enabled
Upload <C:\slave\edge.bin>
File format is raw binary, start address is 0x8c010000
transferred 2265236 bytes at 2647636.835816 bytes / sec
Executing at <0x8c010000>
Sending execute command (0x8c010000, console=1, cdfsredir=1)...executing

--
KallistiOS Git revision 96cfa4a: Mon, Mar 13, 2017 1:38:19 AM
Cor@CORALINE:/opt/toolchains/dc/kos
maple: active drivers:
Dreameye (Camera): Camera
Sound Input Peripheral: Microphone
PuruPuru (Vibration) Pack: JumpPack
VMU Driver: Clock, LCD, MemoryCard
Mouse Driver: Mouse
Keyboard Driver: Keyboard
Controller Driver: Controller
Lightgun: LightGun
DMA Buffer at ac413ae0
vid_set_mode: 640x480 NTSC
dc-load console support enabled
maple: attached devices:
A0: Dreamcast Controller (01000000: Controller)
A1: Visual Memory (0e000000: Clock, LCD, MemoryCard)
A2: Puru Puru Pack (00010000: JumpPack)

waiting for gdb client connection...
And it just hangs there. Dreamcast shows black screen. Shouldn't there be another window or something that
should be starting? Or do I need to use a different dc-tool IP GUI (I'm using v2)?

Thanks guys <3
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Starting the GDB server (#adhd problems lol)

Post by BlueCrab »

I'd assume that you need to start up GDB in a terminal to connect to localhost on port 2159 (at least in that example that you showed).

I've never used any GUIs for dc-tool, but that seems like it would hopefully be the logical next step.
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Re: Starting the GDB server (#adhd problems lol)

Post by Corbin »

Thanks, I got it all figured out!!

So now GDB works great, but I'm trying to install Insight. I've copied Insight to:

\opt\toolchains\dc\kos\utils\dc-chain\insight-6.8-1

Did a ./configure, worked great.

Attempting to Make it gave me these errors:

...
...
...
ar cru libintl.a bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o explodename.o dcigettext.o dcngettext.o dngettext.o ngettext.o plural.o plural-exp.o localcharset.o relocatable.o localename.o log.o osdep.o intl-compat.o
ranlib libintl.a
make[2]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/intl'
make[2]: Entering directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd'
Making info in doc
make[3]: Entering directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd/doc'
restore=: && backupdir=".am$$" && \
rm -rf $backupdir && mkdir $backupdir && \
if (makeinfo --split-size=5000000 --split-size=5000000 --version) >/dev/null 2>&1; then \
for f in bfd.info bfd.info-[0-9] bfd.info-[0-9][0-9] bfd.i[0-9] bfd.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
if makeinfo --split-size=5000000 --split-size=5000000 -I ../.././bfd/doc \
-o bfd.info `test -f 'bfd.texinfo' || echo '../.././bfd/doc/'`bfd.texinfo; \
then \
rc=0; \
else \
rc=$?; \
$restore $backupdir/* `echo "./bfd.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
./elf.texi:11: raising the section level of @subsubsection which is too low
make[3]: *** [Makefile:390: bfd.info] Error 1
make[3]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd/doc'
Making info in po
make[3]: Entering directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd/po'
( if test 'x../.././bfd/po' != 'x.'; then \
posrcprefix='../.././bfd/'; \
else \
posrcprefix="../"; \
fi; \
rm -f SRC-POTFILES-t SRC-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ $posrcprefix& \\\\@" < ../.././bfd/po/SRC-POTFILES.in \
| sed -e '$s/\\$//') > SRC-POTFILES-t \
&& chmod a-w SRC-POTFILES-t \
&& mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ ../& \\\\@" < ../.././bfd/po/BLD-POTFILES.in \
| sed -e '$s/\\$//') > BLD-POTFILES-t \
&& chmod a-w BLD-POTFILES-t \
&& mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
&& CONFIG_FILES=po/Makefile.in:po/Make-in \
CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[3]: Nothing to be done for 'info'.
make[3]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd/po'
make[3]: Entering directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd'
make[3]: Nothing to be done for 'info-am'.
make[3]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd'
make[2]: *** [Makefile:1090: info-recursive] Error 1
make[2]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1/bfd'
make[1]: *** [Makefile:3062: all-bfd] Error 2
make[1]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/insight-6.8-1'
make: *** [Makefile:703: all] Error 2
Any ideas? It doesn't seem too helpful in figuring out what went wrong here. . . Thanks!
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Starting the GDB server (#adhd problems lol)

Post by BlueCrab »

I've never messed around with Insight (never messed around with GDB for Dreamcast stuff period), but it looks like it's failing trying to build documentation for libbfd.

Unfortunately, I haven't messed with it to know what to do to fix it. My initial instinct would be to try to get it so it doesn't build the documentation, since I'm sure you don't actually need libbfd's documentation to run Insight. How you'd go about that, I don't know. Perhaps someone else could share their insight on the topic (hooray for bad puns?).
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Re: Starting the GDB server (#adhd problems lol)

Post by Corbin »

Okay, quick solution for anyone else running into trouble -- I went to:

opt\toolchains\dc\kos\utils\dc-chain\insight-6.8-1\bfd\doc\

Opened up elf.texi, and the line (should be 11):

@subsubsection @code(bdf_elf_find_section)

Just change that line to:

@subsection @code{bfd_elf_find_section}

Seems to run fine, but now I have that stupid bfd_set_cacheable problem, I seem to remember it being referenced somewhere on here... ^_^
Post Reply