public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: [Mingw-users] Re: _WIN32?
@ 2001-05-05 15:57 Danny Smith
  2001-05-05 18:54 ` Christopher Faylor
  2001-05-05 23:02 ` Eli Zaretskii
  0 siblings, 2 replies; 121+ messages in thread
From: Danny Smith @ 2001-05-05 15:57 UTC (permalink / raw)
  To: gdb

>> 
>> You don't necessarily have to test for anything.  We could just add
>> a TERMINAL_DOES_BLAH conditional which was set only when gdb was being
>> run under cygwin, or djgpp, or (don't worry we're working on it and
>> will have something in the next <<undeterminied>> timeframe, really
>> we will) Windows.  You don't actually have to write an autoconf test
>> for this.
>
>I agree with that approach, but Andrew was talking about Autoconf.

So was I.  You could still do this in configure.in.  The alternatives are
having something like:

  #if defined (__CYGWIN__) || defined (__DJGPP__)
  # define FILENAME_CASE_INSENSITIVE
  #endif

of something like (in configure.host):

  case "$host_cpu" in

  i[3456]86-*-cygwin*)
	  gdb_host=cygwin
	  FILENAME_CASE_INSENSITIVE=1
	  ;;

  i[3456]86-*-msdosdjgpp*)
	  gdb_host=go32
	  FILENAME_CASE_INSENSITIVE=1
	  ;;
  esac

  AC_SUBST(FILENAME_CASE_INSENSITIVE)

cgf


Please be patient.  I have very little experience with multiplatform
configurations, none with autoconfigury  I am one of these folk:

>>(don't worry we're working on it and
>> will have something in the next <<undeterminied>> timeframe, really
>> we will) Windows. 

 and I am getting a bit confused by some of this discussion, and what I should
do.  For me examples teach.

Here is an example of what I would like to add:

In event-loop.c, a clock is needed. Posix uses gettimeofday. Here is how I
would provide that clock for w32:

/*  winbase.h definitions */
typedef struct _FILETIME {
	unsigned long dwLowDateTime;
	unsigned long dwHighDateTime;
} FILETIME;
void __stdcall GetSystemTimeAsFileTime(FILETIME*);

/*time from 1 Jan 1601 to 1 Jan 1970 in 100ns units */
#define _W32_FT_OFFSET (116444736000000000LL) 

typedef union {
	long long ns100; /*time since 1 Jan 1601 in 100ns units */
	FILETIME ft;
	} w32_ftv;

void nt_gettimeofday(struct timeval* p, struct timezone* tz /* IGNORED */){
	w32_ftv _now; 
	GetSystemTimeAsFileTime( &(_now.ft) );
        p->tv_usec=(long)((_now.ns100 / 10LL) % 1000000LL );
	p->tv_sec= (long)((_now.ns100-_W32_FT_OFFSET)/10000000LL);
return;

 
Now, how would you like me to put this into event-loop.c.
An example please,  either on this list or privately

_____________________________________________________________________________
http://store.yahoo.com.au - Yahoo! Store
- It's time you had your business online!

^ permalink raw reply	[flat|nested] 121+ messages in thread
* Re: _WIN32?
@ 2001-04-30 10:15 Christopher Faylor
  2001-04-30 16:19 ` [Mingw-users] _WIN32? Danny Smith
  0 siblings, 1 reply; 121+ messages in thread
From: Christopher Faylor @ 2001-04-30 10:15 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: GDB Discussion, mingw-users

On Mon, Apr 30, 2001 at 01:05:17PM -0400, Andrew Cagney wrote:
>Christopher Faylor wrote:
>
>>         _WIN32          Pure WIN32 support 'gcc -mno-cygwin' --
>>                         don't know if it even builds.  _WIN32 is
>>                         now no longer defined by gcc.
>
>So, can I delete this one? :-)

I don't know.  Someone used to maintain a non-cygwin Windows version of
gdb.  I don't know if it even builds, like I said.  I'm not even sure
how to configure it.

Perhaps the people at mingw-users@lists.sourceforge.net know the answer
to this?  I've Cc'ed them.

cgf

^ permalink raw reply	[flat|nested] 121+ messages in thread
* RE: MACROS in gdb ???
@ 2001-03-21 15:59 Aditya Chugh
  2001-03-21 15:59 ` J.T. Conklin
                   ` (2 more replies)
  0 siblings, 3 replies; 121+ messages in thread
From: Aditya Chugh @ 2001-03-21 15:59 UTC (permalink / raw)
  To: jtc; +Cc: bug-gdb, gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2607 bytes --]

Title: RE: MACROS in gdb ???





Hello Jtc,
Many thanks for your help.
The target I'm using is a Linux machine 
running kernel version 2.2.16-22(Red Hat Linux release 7.0)
and the version of gdb is 5.0.


Also the gdb output looked like this....?
(gdb) p u2IncarnId
$2 = 0
(gdb) n
(gdb) p u2IncarnId
$3 = 1
(gdb) p &u2IncarnId
Address requested for identifier "u2IncarnId" which is in a register.
(gdb)


I found that one of the Makefiles I was using has
CCFLAGS  = -O2 -Wall.After removing the -O2 the problem seems to have been resolved.


But does this mean that if we complile using GNU CC with both `-g'  and `-O' options
GDB will give us wrong results ?? Moreover the same code when run in Visual Studio 6.0
prints correct values for u2IncarnId.Does this mean that the debugger in Visual Studio 6.0
is better than GDB for optimized code ? It comes as quite a sock to me ?
Any more thoughts ???
with sincere thanks,
Aditya




-----Original Message-----
From: jtc@redback.com [ mailto:jtc@redback.com ]
Sent: Tuesday, March 20, 2001 4:12 AM
To: Aditya Chugh
Cc: bug-gdb@prep.ai.mit.edu; gdb@sourceware.cygnus.com
Subject: Re: MACROS in gdb ???




>>>>> "Aditya" == Aditya Chugh <Aditya@in.huawei.com> writes:
Aditya> I am not sure this is the right forum for a question on gdb.


I have culled the 'cc' list to the most relevant mailing lists.


Aditya> I am a Newbie as far as gdb is concerned.  But I have been
Aditya> struggling with this for quite some time and would sincerely
Aditya> appreciate any help.


Aditya> But after processing this macro the value of u2IncarnId
Aditya> changes unexplicably ????


You don't mention what target you're using or what optimization level
was used when you compiled the files.  But the symptoms you describe
often occur when debugging optimized code.  


For example if a register is being used to hold a value and then that
value is no longer needed in the rest of the function, a compiler may
choose to use that register for an unrelated value.  This can make
debugging a bit of a challenge, but looking at a disassembly of the
function or recompiling the system with no optimization can be used to
help diagnose the problem.


It helps to have a somewhat "flexible" attitude when it comes to
debugging optimized code.  A rigid interpretation of results will
lead to frustration.


Aditya> If I am missing something obvious please forgive me. I have
Aditya> spent the whole day trying to figure out where I am going
Aditya> wrong.


I hope this helps.  


        --jtc


-- 
J.T. Conklin
RedBack Networks




^ permalink raw reply	[flat|nested] 121+ messages in thread

end of thread, other threads:[~2001-05-10  8:53 UTC | newest]

Thread overview: 121+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200105010009.RAA12115@tully.CS.Berkeley.EDU>
2001-05-03  1:24 ` [Mingw-users] Re: _WIN32? Paul Hilfinger
2001-05-03 13:41   ` Andrew Cagney
2001-05-03 14:15     ` Danny Smith
2001-05-03 15:24       ` Andrew Cagney
2001-05-03 15:54         ` Christopher Faylor
2001-05-03 16:11           ` Andrew Cagney
2001-05-04  2:17             ` Eli Zaretskii
2001-05-04  2:19         ` Eli Zaretskii
2001-05-04  8:45           ` Christopher Faylor
2001-05-04 10:18             ` Eli Zaretskii
2001-05-04 12:04               ` Christopher Faylor
2001-05-07  9:08         ` Eli Zaretskii
2001-05-08  4:38           ` DOS/Windows-specific code (was: _WIN32?) Eli Zaretskii
2001-05-08  4:40           ` DOS/Windows-specific code: cli-cmds.c Eli Zaretskii
2001-05-08  5:07             ` Registers are not available in Cygwin leonp
2001-05-08  7:16             ` DOS/Windows-specific code: cli-cmds.c Christopher Faylor
2001-05-08 17:51               ` Andrew Cagney
2001-05-08 17:53                 ` Christopher Faylor
2001-05-09  3:02                 ` Eli Zaretskii
2001-05-10  8:33                   ` Andrew Cagney
2001-05-08 17:56             ` Andrew Cagney
2001-05-09  3:03               ` Eli Zaretskii
2001-05-09  9:10                 ` Andrew Cagney
2001-05-08  4:42           ` DOS/Windows-specific code: exec.c and symfile.c Eli Zaretskii
2001-05-08  7:43             ` Elena Zannoni
2001-05-08 17:58             ` Andrew Cagney
2001-05-09  3:03               ` Eli Zaretskii
2001-05-09  7:07                 ` Christopher Faylor
2001-05-08  4:43           ` DOS/Windows-specific code: inflow.c Eli Zaretskii
2001-05-08  7:54             ` Christopher Faylor
2001-05-08 11:15               ` Eli Zaretskii
2001-05-09 13:10                 ` Christopher Faylor
2001-05-08  4:46           ` DOS/Windows-specific code: main.c Eli Zaretskii
2001-05-08  7:58             ` Christopher Faylor
2001-05-08  8:17               ` Keith Seitz
2001-05-08  8:19                 ` Christopher Faylor
2001-05-08  4:46           ` DOS/Windows-specific code: maint.c Eli Zaretskii
2001-05-08 23:40             ` Kevin Buettner
2001-05-09  3:22               ` Eli Zaretskii
2001-05-10  8:33             ` Andrew Cagney
2001-05-10  8:53               ` Eli Zaretskii
2001-05-08  4:47           ` DOS/Windows-specific code: source.c Eli Zaretskii
2001-05-08  9:30             ` DJ Delorie
2001-05-08 11:18               ` Christopher Faylor
2001-05-08 12:23                 ` Eli Zaretskii
2001-05-08 14:00                   ` DJ Delorie
2001-05-09  3:05                     ` Eli Zaretskii
2001-05-09  7:08                       ` Christopher Faylor
2001-05-08 11:14             ` Christopher Faylor
2001-05-08 12:25               ` Eli Zaretskii
2001-05-08 12:33                 ` Christopher Faylor
2001-05-09  3:05                   ` Eli Zaretskii
2001-05-08  4:48           ` DOS/Windows-specific code: sparcl-tdep.c Eli Zaretskii
2001-05-08 23:47             ` Kevin Buettner
2001-05-09  3:14               ` Eli Zaretskii
2001-05-10  8:33               ` Andrew Cagney
2001-05-08  4:48           ` DOS/Windows-specific code: terminal.h Eli Zaretskii
2001-05-08 11:18             ` Christopher Faylor
2001-05-08  4:50           ` DOS/Windows-specific code: top.c Eli Zaretskii
2001-05-08  7:46             ` Elena Zannoni
2001-05-08  4:51           ` DOS/Windows-specific code: utils.c Eli Zaretskii
2001-05-08 11:26             ` Christopher Faylor
2001-05-08  4:52           ` DOS/Windows-specific code: sh-tdep.c and sh3-rom.c Eli Zaretskii
2001-05-08  7:49             ` Elena Zannoni
2001-05-08 11:17               ` Eli Zaretskii
2001-05-08 11:40                 ` Elena Zannoni
2001-05-08 12:36                   ` Christopher Faylor
2001-05-08 12:35               ` Christopher Faylor
2001-05-08 18:17                 ` Andrew Cagney
2001-05-08 19:35                   ` Christopher Faylor
2001-05-08 23:55             ` Kevin Buettner
2001-05-09  3:20               ` Eli Zaretskii
2001-05-09  7:49                 ` Elena Zannoni
2001-05-08  4:52           ` DOS/Windows-specific code: ser-tcp.c Eli Zaretskii
2001-05-08  5:56             ` Russ Allbery
2001-05-08  6:01             ` Christopher Faylor
2001-05-08  8:09               ` Eli Zaretskii
2001-05-08  8:20                 ` Christopher Faylor
2001-05-08 10:30                   ` Eli Zaretskii
2001-05-08 11:03                     ` Christopher Faylor
2001-05-08 23:53             ` Kevin Buettner
2001-05-09  6:59               ` DOS/Windows-specific code: ser-tcp.c [need ruling from Andrew] Christopher Faylor
2001-05-09  9:29                 ` Andrew Cagney
2001-05-10  8:32             ` DOS/Windows-specific code: ser-tcp.c Andrew Cagney
2001-05-08  4:53           ` DOS/Windows-specific code: values.c Eli Zaretskii
2001-05-08 23:58             ` Kevin Buettner
2001-05-09  7:01               ` Christopher Faylor
2001-05-10  8:33               ` Andrew Cagney
2001-05-08  4:54           ` DOS/Windows-specific code in sim/ Eli Zaretskii
2001-05-08  9:30             ` DJ Delorie
2001-05-08 11:04               ` Eli Zaretskii
2001-05-10  8:33               ` Andrew Cagney
2001-05-08  4:55           ` DOS/Windows-specific code: all the rest Eli Zaretskii
2001-05-08  5:12             ` leonp
2001-05-08  7:59               ` Christopher Faylor
2001-05-08  9:45             ` DJ Delorie
2001-05-08 10:53               ` Eli Zaretskii
2001-05-08 12:08                 ` DJ Delorie
2001-05-07  9:09         ` [RFA] Remove OS-specific defines (was: _WIN32?) Eli Zaretskii
2001-05-07 10:39           ` Kevin Buettner
2001-05-07 11:23             ` Eli Zaretskii
2001-05-07 11:37               ` Andrew Cagney
2001-05-03 23:58     ` [Mingw-users] Re: _WIN32? Paul Hilfinger
2001-05-04  9:04       ` Andrew Cagney
2001-05-04  0:20     ` Eli Zaretskii
2001-05-05 15:57 Danny Smith
2001-05-05 18:54 ` Christopher Faylor
2001-05-05 23:03   ` Eli Zaretskii
2001-05-05 23:02 ` Eli Zaretskii
2001-05-06  1:52   ` Danny Smith
  -- strict thread matches above, loose matches on Subject: below --
2001-04-30 10:15 _WIN32? Christopher Faylor
2001-04-30 16:19 ` [Mingw-users] _WIN32? Danny Smith
2001-04-30 17:03   ` Christopher Faylor
2001-04-30 17:29     ` Danny Smith
2001-05-01  7:03     ` Kai Ruottu
2001-05-01  7:44       ` Christopher Faylor
2001-03-21 15:59 MACROS in gdb ??? Aditya Chugh
2001-03-21 15:59 ` J.T. Conklin
2001-03-21 15:59 ` Eli Zaretskii
     [not found]   ` <eliz@is.elta.co.il>
2001-03-21 15:59     ` Kevin Buettner
2001-03-21 15:59       ` Eli Zaretskii
2001-03-21 15:59 ` Daniel Berlin

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).