Author Topic: Mac Binaries  (Read 84140 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2776
Re: Mac Binaries
« Reply #105 on: May 18, 2006, 11:37:01 pm »
gdb 6.3 (apple gdb-434) gets the following errors. I've no idea what the errs mean.

As far as I can tell it says that you are missing support for PPC64 targets...

Of course I'm missing PPC64 support. I only have an imacg3.

But I think the problems happened before the PPC64 errors.
The gcc 3.3 compiler could not handle some code and got two parseing errors.

That's what I meant about "..cannot easily compile..". Looks like the compiler cannot handle the apple gdb source code.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac Binaries
« Reply #106 on: May 18, 2006, 11:43:05 pm »
Of course I'm missing PPC64 support. I only have an imacg3.

I meant that the OS (10.3) doesn't have PPC64, only PPC (32).
And you might be right about it requiring GCC 4.0 to compile...

The bottom line is that if C::B doesn't support GDB 5.3,
then it isn't going to work very well on Mac OS X 10.3

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Mac Binaries
« Reply #107 on: May 18, 2006, 11:59:10 pm »
Quote from: Pecan
Bad news. It appears that gdb 6.3 will not compile on Panther(10.3.9).
That means *no* integrated debugging with CodeBlocks.
That means I'm about to abandon the Panther ship. Buy some more memory and see If I can run Tiger on this imacg3.

Maybe it's a good time to see why gdb-5.x doesn't work with C::B?
Create a hello-world project, set a breakpoint somewhere and hit "Debug". Then send me (or post here) both the debugger's logs (i.e. "debugger's log" and "debugger's debug log").
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2776
Re: Mac Binaries
« Reply #108 on: May 19, 2006, 02:20:52 am »
Maybe it's a good time to see why gdb-5.x doesn't work with C::B?
Create a hello-world project, set a breakpoint somewhere and hit "Debug". Then send me (or post here) both the debugger's logs (i.e. "debugger's log" and "debugger's debug log").

Setting breakpoint shows (cf. image). When hitting the debug button, the gdb title shows in the debug window, but nothing else ever happens. You can hit any of the other buttons. No activity. All buttons are enabled.

The stop button works. The continue button show "continue in the debug window, but it does not in fact continue.

I don't know what else you may want/need. Just ask...
Be kind. I'm not an experienced mcUser. :?



Code
image
----------------------------------------------------------------
http://img487.imageshack.us/img487/1548/graphic518200680235pm9cm.png

Debugger window
------------------------------------------------------------------
Building to ensure sources are up-to-date
Build succeeded
Selecting target: default
Adding source dir: /Volumes/Seagate/MAC/temp/minimal/
Adding source dir: /Volumes/Seagate/MAC/temp/minimal/
Adding file: minimal
Starting debugger: done
Invalid debugger script: 'gdb_types.script'
Setting breakpoints
Debugger name and version: GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT 2004)
Continuing...
Continuing...
Continuing...
Continuing...

Code::Blocks Debug window
----------------------------------------------------------------------
[19:22:51.467]: Initialize EditColorSet .....
[19:22:51.669]: Loading lexer_rc.xml
[19:22:51.730]: Loading lexer_python.xml
[19:22:51.785]: Loading lexer_prg.xml
[19:22:51.825]: Loading lexer_nsis.xml
[19:22:51.887]: Loading lexer_matlab.xml
[19:22:51.947]: Loading lexer_masm.xml
[19:22:52.000]: Loading lexer_lua.xml
[19:22:52.040]: Loading lexer_hitasm.xml
[19:22:52.087]: Loading lexer_gm.xml
[19:22:52.130]: Loading lexer_glsl.xml
[19:22:52.189]: Loading lexer_f77.xml
[19:22:52.240]: Loading lexer_diff.xml
[19:22:52.276]: Loading lexer_d.xml
[19:22:52.320]: Loading lexer_css.xml
[19:22:52.370]: Loading lexer_cpp.xml
[19:22:52.425]: Loading lexer_cg.xml
[19:22:52.493]: Loading lexer_batch.xml
[19:22:52.537]: Loading lexer_angelscript.xml
[19:22:52.590]: Loading lexer_OgreMaterial.xml
[19:22:52.651]: Loading lexer_OgreCompositor.xml
[19:22:52.701]: Loading lexer_xml.xml
[19:22:52.889]: Initialize EditColorSet: done.
[19:22:54.168]: Loading toolbar...
[19:22:56.254]: AStylePlugin: loaded
[19:22:56.810]: Wizard: loaded
[19:22:57.597]: PluginWizard: loaded
[19:22:58.389]: FilesExtensionHandler: loaded
[19:22:59.665]: Debugger: loaded
[19:23:01.153]: Added compiler "GNU GCC Compiler"
[19:23:01.191]: Added compiler "Intel C/C++ Compiler"
[19:23:01.286]: Added compiler "SDCC Compiler"
[19:23:01.315]: Added compiler "GNU GDC Compiler"
[19:23:01.354]: Compiler: loaded
[19:23:02.353]: Concurrent threads for pool set to 1
[19:23:03.636]: CodeCompletion: loaded
[19:23:04.596]: ClassWizard: loaded
[19:23:05.938]: ToDoList: loaded
[19:23:06.073]: Files extension handler plugin loaded
[19:23:11.483]: Debugger plugin loaded
[19:23:13.279]: Compiler plugin loaded
[19:23:14.927]: Loading workspace "/Users/pecan/.codeblocks/default.workspace"
[19:23:14.979]: File does not exist.
[19:23:15.015]: Initializing plugins...
[19:23:31.054]: Loading project file...
[19:23:31.119]: Parsing project file...
[19:23:31.177]: Loading target default
[19:23:31.217]: Loading project files...
[19:23:31.283]: 1 files loaded
[19:23:31.325]: Done loading project in 271ms
[19:23:31.368]: Project's base path: /Volumes/Seagate/MAC/temp/minimal/
[19:23:31.413]: Project's common toplevel path: /Volumes/Seagate/MAC/temp/minimal/
[19:23:31.880]: project data set for /Volumes/Seagate/MAC/temp/minimal/minimal.cpp
[19:23:31.976]: Top Editor: /Volumes/Seagate/MAC/temp/minimal/minimal.cpp
[19:24:28.130]: Removed minimal from all deps
[19:24:33.897]: Loading project file...
[19:24:33.947]: Parsing project file...
[19:24:34.033]: Loading target default
[19:24:34.082]: Loading project files...
[19:24:34.134]: 1 files loaded
[19:24:34.183]: Done loading project in 286ms
[19:24:34.237]: Project's base path: /Volumes/Seagate/MAC/temp/minimal/
[19:24:34.292]: Project's common toplevel path: /Volumes/Seagate/MAC/temp/minimal/
[19:24:34.628]: project data set for /Volumes/Seagate/MAC/temp/minimal/minimal.cpp
[19:24:34.734]: Top Editor: /Volumes/Seagate/MAC/temp/minimal/minimal.cpp
[19:24:57.016]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:24:57.534]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:24:57.621]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:24:57.699]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:25:16.592]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:25:16.671]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:25:16.740]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:25:16.841]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:26:04.782]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:26:04.884]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:26:05.011]: Scanned 0 files for #includes, cache used 1, cache updated 0
[19:26:05.104]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:26:05.191]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:26:05.279]: Scanned 0 files for #includes, cache used 0, cache updated 0
[19:26:05.369]: Scanned 0 files for #includes, cache used 0, cache updated 0



command line gdb 5.3
---------------------------------------------------------------------------
iMacG3:~/devel/mac/temp/minimal pecan$ ls
minimal         minimal.cbp     minimal.cpp     minimal.depend  minimal.layout
iMacG3:~/devel/mac/temp/minimal pecan$ gdb minimal
GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT 2004)
Copyright 2003 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 "powerpc-apple-darwin".
Reading symbols for shared libraries .. done
(gdb) l
1       #include <iostream>
2
3       int main()
4       {
5           int i = 0;
6           if (i==0) printf("Hello world");
7               std::cout << "Hello world!" << std::endl;
8           system("pause");
9               return 0;
10      }
(gdb) b 7
Breakpoint 1 at 0x2d84: file minimal.cpp, line 7.
(gdb) run
Starting program: /Volumes/Seagate/MAC/temp/minimal/minimal
Reading symbols for shared libraries . done

Breakpoint 1, main () at minimal.cpp:7
7               std::cout << "Hello world!" << std::endl;
(gdb) n
Hello worldHello world!
8           system("pause");
(gdb) n
sh: line 1: pause: command not found
9               return 0;
(gdb) n
10      }
(gdb) n

Program exited normally.
(gdb)


command line compiled (hacked) gdb 6.3 (apple gdb 434)
---------------------------------------------------------------
iMacG3:~/devel/mac/proj/gdb-434/src/gdb pecan$ ./gdb /users/pecan/devel/mac/temp/minimal/minimal
GNU gdb 2004-03-03-cvs (Thu May 18 21:10:29 GMT 2006)
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 "--host=powerpc-apple-darwin7.9.0 --target="...Reading symbols for shared libraries .. done

Setting up the environment for debugging gdb.
Function "internal_error" not defined.
Function "info_command" not defined.
.gdbinit:8: Error in sourced command file:
No breakpoint number 0.
(gdb) l
1       #include <iostream>
2
3       int main()
4       {
5           int i = 0;
6           if (i==0) printf("Hello world");
7               std::cout << "Hello world!" << std::endl;
8           system("pause");
9               return 0;
10      }
(gdb) b 7
Breakpoint 1 at 0x2d84: file minimal.cpp, line 7.
(gdb) run
Starting program: /volumes/Seagate/MAC/temp/minimal/minimal

Breakpoint 1, main () at minimal.cpp:7
7               std::cout << "Hello world!" << std::endl;
(gdb) n
Hello worldHello world!
8           system("pause");
(gdb) n
sh: line 1: pause: command not found
9               return 0;
(gdb) n
10      }
(gdb) n

Program exited normally.
(gdb) q
« Last Edit: May 19, 2006, 02:47:30 am by Pecan »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Mac Binaries
« Reply #109 on: May 19, 2006, 06:12:37 pm »
Quote
I don't know what else you may want/need. Just ask...

As written above, I want the debugger's debug log. Enable it with "Settings->Compiler and debugger->Debugger->Display debugger's log".
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2776
Re: Mac Binaries
« Reply #110 on: May 19, 2006, 08:46:55 pm »

As written above, I want the debugger's debug log. Enable it with "Settings->Compiler and debugger->Debugger->Display debugger's log".

"As written above...". Is that some sort of nasty reply? If so, I don't believe I deserve it. I'm trying the best I know how.


GDB 5.3 is now working with CB OSX 10.3
The moment I saw the output from the debuggers debug display I understood the problem.

mcCodeBlocks GDB needs a "run" not a "start". I'll include this in the patches I'm working on.

Code
void GDB_driver::Start(bool breakOnEntry)
{
    ResetCursor();

    // under windows, 'start' segfaults with wx projects...
//-#ifdef __WXMSW__
#if defined(__WXMSW__) || defined(__WXMAC__)
    m_BreakOnEntry = false;
    m_ManualBreakOnEntry = false;
    // start the process
    QueueCommand(new DebuggerCmd(this, _T("run")));
#else
    m_BreakOnEntry = breakOnEntry;
    m_ManualBreakOnEntry = true;
    // start the process
    QueueCommand(new DebuggerCmd(this, _T("start")));
#endif
}

Code
Command-line: /usr/bin/gdb -nx -fullname  -args minimal
Working dir : /Volumes/Seagate/MAC/temp/minimal/
> set prompt >>>>>>cb_gdb:
GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT 2004)
Copyright 2003 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 "powerpc-apple-darwin".
Reading symbols for shared libraries .. done
(gdb) >>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
No symbol "breakpoint" in current context.
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set disassembly-flavor att
No symbol "disassembly" in current context.
>>>>>>cb_gdb:
> directory /Volumes/Seagate/MAC/temp/minimal/
>>>>>>cb_gdb:
> delete breakpoints
>>>>>>cb_gdb:
> break minimal.cpp:7
Breakpoint 1 at 0x2d80: file minimal.cpp, line 7.
>>>>>>cb_gdb:
> run
Reading symbols for shared libraries
. done
Breakpoint 1, main () at minimal.cpp:7
/Volumes/Seagate/MAC/temp/minimal/minimal.cpp:7:92:beg:0x2d80
>>>>>>cb_gdb:
> next
Hello world
Hello world!
/Volumes/Seagate/MAC/temp/minimal/minimal.cpp:8:135:beg:0x2da8
>>>>>>cb_gdb:
> next
sh: line 1: pause: command not found
/Volumes/Seagate/MAC/temp/minimal/minimal.cpp:9:157:beg:0x2db4
>>>>>>cb_gdb:
> next
/Volumes/Seagate/MAC/temp/minimal/minimal.cpp:10:169:beg:0x2db8
>>>>>>cb_gdb:
> cont
Program exited normally.
>>>>>>cb_gdb:
> quit

« Last Edit: May 19, 2006, 08:49:40 pm by Pecan »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Mac Binaries
« Reply #111 on: May 19, 2006, 09:24:53 pm »
Quote
"As written above...". Is that some sort of nasty reply? If so, I don't believe I deserve it. I'm trying the best I know how.

What's wrong with everyone these days? Why are you all so jumpy?  :?:  :|
I just pointed out that I asked for it. And I even told you where to enable it. I didn't imply anything more or less...

Be patient!
This bug will be fixed soon...

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac Binaries
« Reply #112 on: May 19, 2006, 10:18:46 pm »
GDB 5.3 is now working with CB OSX 10.3

mcCodeBlocks GDB needs a "run" not a "start". I'll include this in the patches I'm working on.

Oops, that explains why I couldn't see the problem with GDB (had it patched locally...)

Anyway, it sounds a whole lot better than having to drop Mac OS X 10.3 support ! :-)

sethjackson

  • Guest
Re: Mac Binaries
« Reply #113 on: May 19, 2006, 10:25:53 pm »
What's wrong with everyone these days? Why are you all so jumpy?  :?:  :|

OT: Yeah I have noticed this too...... What is the dea (maybe everyone is tired/has too much to do or something)l?  :?: I don't mean to offend anyone so please take my comments lightly........

Oh well looks like Pecan has fixed his problem (and got C::B to run on OS X 10.3). :D

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Mac Binaries
« Reply #114 on: May 20, 2006, 06:35:45 am »
Can't wait till Monday, when I get into work I will see if can get CB to compile on our new Intel iMac, the Core Duo is fast.  If everything turns out good, hopefully I can use it with/instead of xcode.

skyjunky

  • Guest
Re: Mac Binaries
« Reply #115 on: May 21, 2006, 10:55:11 pm »
I've been trying to get cb working on mac intel.
It built but crashes at startup after clicking OK on the compiler dialog.
bool wxPropertyGrid::SetFont ( const wxFont& font ) in propgrid.cpp did not compile, res was out of scope, but simple to fix.

version 2481.
I did try the with the source of the 1.0-rc2 but it would not build (configure failed).

error report attached.



[attachment deleted by admin]

skyjunky

  • Guest
Re: Mac Binaries
« Reply #116 on: May 23, 2006, 12:52:41 am »
It starts up if I disable the project wizard plugin.
The editor basically works. I did not try compiling or debugging.
I created a basic project and added a few files.

There are some problems.

Settings->environment causes a crash.
Expanding items in the management panel does not repaint if the panel already has focus. You have to resize or change focus to force a repaint. The scrollbars do not update unless you try to select an item on the edge of the panel.
Draging files into the main window causes a crash.
Cannot quit cb if a project is open.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2776
Re: Mac Binaries
« Reply #117 on: June 22, 2006, 03:13:24 am »
Has anyone been successful building wxMac2.6.3 on OS X 10.4 having installed XCode 2.x? And using the ./configure method?

I get error after compiler error. Is it my system or is it wxWidgets?

Amazingly XCode will build it, but not ./configure.

thanks
pecan

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2776
Re: Mac Binaries
« Reply #118 on: June 25, 2006, 05:38:42 pm »
I can nolonger compile svn codeblocks on OS X 10.3.

threadpool.cpp crashes compiler gcc 3.3. I've tried -O0 and -fno-fast-math.
These flags do not seem to avoid the crash when CB is compiling CB itself.

Has anyone got any ideas?

thanks
pecan


Code
g++ -Wall -g `wx-config --cflags` -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -DcbDEBUG -DCB_PRECOMP -D__WXMAC__ -O0 -fno-fast-math  -Isdk/wxscintilla/include -Isdk -Isdk/as/source -Isdk/as/include -Isdk/propgrid/include -Isdk/wxFlatNotebook -I/usr/include -Isdk -c sdk/cbthreadpool.cpp -o .objs/sdk/cbthreadpool.o
[address=45e533a4 pc=000e6b3c]
sdk/cbthreadpool.cpp: In member function `bool cbThreadPool::WaitingThread()':
sdk/cbthreadpool.cpp:151: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
Process terminated with status 1 (1 minutes, 19 seconds)
1 errors, 0 warnings
 

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2776
Re: Mac Binaries
« Reply #119 on: June 28, 2006, 01:24:00 am »
I can nolonger compile svn codeblocks on OS X 10.3.

threadpool.cpp crashes compiler gcc 3.3. I've tried -O0 and -fno-fast-math.
These flags do not seem to avoid the crash when CB is compiling CB itself.

Has anyone got any ideas?

Ceniza has generously spent the time to restructure the cbThreadPool.cpp/h code to enable us gcc 3.3 users to compile CodeBlocks without the segfaults
(svn 2617).

I've compiled and tested the code on OS X 10.3 with gcc3.3 with no problems.

Thank you Ceniza
pecan
« Last Edit: June 28, 2006, 01:25:38 am by Pecan »