Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


wait this is a quote not edit snipe!

noooooooooooooooooo

Adbot
ADBOT LOVES YOU

skimothy milkerson
Nov 19, 2006

chasing down bugs like a moron keeps me employed, op

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
you shouldn’t really need an unoptimized executable for debugging, obviously a lot of things about debug info will degrade under optimization but you can generally still piece together what‘s happening, and being able to step and inspect memory is a lifesaver. the mgmt is right, there’s no excuse for not having a debugserver implementation on your device

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


admittedly i have only tried step-debugging a release build on hardware once, but it didn't go well either

maybe if I get some spare time I'll try again and get that worked out :shrug:

hifi
Jul 25, 2012

i feel like i had a breakthrough the other day, instead of looping through a code structure that segfaults, you can just let it fail and then reverse until it's back in the code you wrote.

The Management
Jan 2, 2010

sup, bitch?

Ciaphas posted:

realpost: tldr, but suffice to say MTP is seemingly impossible to get working, Hardware took the UART out of the "newest" revision, whatever module provides ActiveSync doesn't work reliably for debugging via IP, and even if by some miracle it DOES all work, the machine is too gutless to run a debug executable at anything other than unreasonable treacle-like speeds. we're on vs2005 for that so when it does work it at least works well, but yeesh what a fuckin farce to get there and god help me if what i need to test is buried behind slow-running actions

it's pretty crap but at least it's being greenfielded away to unix boxes in the next year (to Golang [ :| ] )

right, activesync not mtp. it’s been a long time since I’ve winced. my experience with it has been pretty good debugging-wise, but I suppose it depends on the BSP.

golang? enjoy your giant binaries.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i;m drunk and thinking about debugging, op

suffix
Jul 27, 2013

Wheeee!
the race condition doesn't happen anymore when you attach a debugger

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


suffix posted:

the race condition doesn't happen anymore when you attach a debugger

these are the worst. someone in the TP thread told me about intel inspector and that thing is really drat slick at finding these and memory problems

Ciaphas fucked around with this message at 17:43 on Oct 20, 2019

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


The Management posted:

right, activesync not mtp. it’s been a long time since I’ve winced. my experience with it has been pretty good debugging-wise, but I suppose it depends on the BSP.

golang? enjoy your giant binaries.
i don't think they've rebuilt the winCE OS image in ten years rofl. it's probably literally a Lost Art at this point

i've been warned lots about golang but tbh it looks overall a lot less foot-shooty than C++ has been in my career so I'm all for it (no generics is a fuckin' grumble tho)

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


also it's not printf it's NKDbgPrintfW, god :rolleye:

The Management
Jan 2, 2010

sup, bitch?

hifi posted:

i feel like i had a breakthrough the other day, instead of looping through a code structure that segfaults, you can just let it fail and then reverse until it's back in the code you wrote.

using a debugger is like solving a maze by starting from the end. break when an error happens, figure out how you got there instead of figuring out all of the possible ways to get there

The Management
Jan 2, 2010

sup, bitch?

suffix posted:

the race condition doesn't happen anymore when you attach a debugger

debuggers are fairly innocuous for things like that. you generally add some breakpoints at the start and then run. printfs, on the other hand, can have massive implications on timing as well as changing code generation to hide some bugs.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
also prints to the same log often literally synchronize threads

that doesn’t actually eliminate races, but it does make them much harder to find because they don’t reproduce unless specific segments between logging statements are concurrent as opposed to the much longer sequences between the actual useful synchronization points

3D Megadoodoo
Nov 25, 2010

jimmyjams posted:

what is code

code is like a program only useless

Zlodo
Nov 25, 2006
I use the debugger as much as I can but there are a lot of situations where the debugger isn't practical at all

like if a bug is caused by the interactions of several clients in a multiplayer game your only way to figure it out is logs and perhaps a frame by frame replay of a video capture of the bug (possibly with debug prints/draw enabled)

refleks
Nov 21, 2006



i learned to use print() in my intro to python course on datacamp, are you telling me datacamp dont know what theyre talking about?

git apologist
Jun 4, 2003

Boiled Water posted:

current employer doesn't want us writing log files. "Everything must go through AWS CloudWatch, so says the SOP!"

cloudwatch has yet to be configured and probably won't be for some time as the team responsible for anything aws is on fire

you can do both

also cloud watch is pretty clunky

ANAmal.net
Mar 2, 2002


100% digital native web developer

Boiled Water posted:

current employer doesn't want us writing log files. "Everything must go through AWS CloudWatch, so says the SOP!"

cloudwatch has yet to be configured and probably won't be for some time as the team responsible for anything aws is on fire

if it makes you feel any better, cloudwatch probably won't be helpful even when it is configured

Zlodo
Nov 25, 2006
you can use either / or \ as path separators

// and \\ are escape sequences that let you include a / or a \ in a filename or directory name

josh2112
Jul 25, 2007
Is that a meteor? That's a cool meteor.
current debugging environment: DOS 2.1 DEBUG.COM on a 128-KB IBM PCjr :q:

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
one of the last teapot threads before he was permabanned was where he asserted that needing to use a debugger on your code was a sign of weakness and being a bad programmer.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
something like "You should know what your code is doing, you wrote it. You should not need a debugger if you've done your job"

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i saw teapot irl on BART once. I herded my children behind me, they were so young, I didn't want them trolled.

hifi
Jul 25, 2012

rotor posted:

one of the last teapot threads before he was permabanned was where he asserted that needing to use a debugger on your code was a sign of weakness and being a bad programmer.

makes sense.

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


rotor posted:

one of the last teapot threads before he was permabanned was where he asserted that needing to use a debugger on your code was a sign of weakness and being a bad programmer.

technically correct; all programs and programmers are bad

TheToxicEuphoria
Feb 26, 2008
printf("%i",printf(size_of(int)));
am I doing this right

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
so what if i want to print things other than 'f' though? what am i supposed to do then? that's why javascript is better, you can just console.log any kind of character or string.

WilWheaton
Oct 11, 2006

It'd be hard to get bored on this ship!

rotor posted:

so what if i want to print things other than 'f' though? what am i supposed to do then? that's why javascript is better, you can just console.log any kind of character or string.

thats why i moved to node.js , to be closer to the metal

The Management
Jan 2, 2010

sup, bitch?
printf(“%s:%u\n”, __FUNCTION__, __LINE__);

repeated a thousand times in your file

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

ANAmal.net posted:

if it makes you feel any better, cloudwatch probably won't be helpful even when it is configured

it's amazingly bad. We have it set up for logging output of choice select ECS jobs but you can't actually find the logs if you close the tab or an hour passes and you're forced to re-auth.

Zlodo
Nov 25, 2006

Zlodo posted:

you can use either / or \ as path separators

// and \\ are escape sequences that let you include a / or a \ in a filename or directory name

i meant to post this in the yosos thread btw, it isn't my secret printf based debugging techinque

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Zlodo posted:

i meant to post this in the yosos thread btw, it isn't my secret printf based debugging techinque

jeez, post much?

Stick Insect
Oct 24, 2010

My enemies are many.

My equals are none.

josh2112 posted:

current debugging environment: DOS 2.1 DEBUG.COM on a 128-KB IBM PCjr :q:

I remember using debug.com to create small executables by copying hexadecimal numbers from a book :3:

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Ciaphas posted:

technically correct; all programs and programmers are bad

:hmmyes:

akadajet
Sep 14, 2003

Ciaphas posted:

technically correct; all programs and programmers are bad

mine are all good, don't know what you're talking about.

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

akadajet posted:

mine are all good, don't know what you're talking about.

ah, a non-programmer

jimmyjams
Jan 10, 2001


King Kong of Megadongs
Gobblin' them mega schlongs
Makin' sure they mega long
Stroke' 'em if they mega strong
what is a program

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

jimmyjams posted:

what is a program

no much, what's program with you?

Adbot
ADBOT LOVES YOU

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
hahahahaha

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply