public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* no callstack after assert
@ 2014-11-25 23:03 Mick Charles Beaver
  0 siblings, 0 replies; only message in thread
From: Mick Charles Beaver @ 2014-11-25 23:03 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Hello,

I was poking around with gcc and gdb and found that when I hit an
assert, I did not have a valid callstack/backtrace. Is this expected?

A little info:
* I am using Windows 7 and 8, 64-bit.
* I used the latest gcc (4.8.3) and gdb (7.8) that a fresh cygwin installed.
* uname -a reports:
  CYGWIN_NT-6.1 C-MICKB 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64 Cygwin
* I compiled my program like so:  gcc -g test_asserts.c
* I get a valid backtrace before the assert hits.

Thanks for any pointers,
Mick

[-- Attachment #2: test_asserts.c --]
[-- Type: text/x-csrc, Size: 294 bytes --]

#include <assert.h>
#include <stdio.h>

void
print_positive_int(int value)
{
	assert(value > 0);
	printf("Your positive int is %d\n", value);
}

int
main(int argc, char *argv[])
{

	print_positive_int(3);
	print_positive_int(2);
	print_positive_int(1);
	print_positive_int(0);

	return (0);
}


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-25 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-25 23:03 no callstack after assert Mick Charles Beaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).