?? development.dbk
字號:
#define VOLATILE_REDOLOG_EXTENSION_LENGTH (strlen(VOLATILE_REDOLOG_EXTENSION))</screen>These constants are used when building redolog file names</para></section><section><title> undoable_image_t methods</title><para><emphasis>undoable_image_t(Bit64u size, const char* redolog_name);</emphasis>instanciates a new <emphasis>undoable_image_t</emphasis>object. This disk image logical length is <emphasis>size</emphasis> bytes andthe redolog filename is <emphasis>redolog_name</emphasis>. </para><para><emphasis>int open (const char* pathname);</emphasis>opens the flat disk image <emphasis>pathname</emphasis>,as an undoable disk image. The associated redolog willbe named <emphasis>pathname</emphasis> with a <emphasis>UNDOABLE_REDOLOG_EXTENSION</emphasis>suffix, unless set in the constructor.Returns 0 for OK or -1 if a problem occured.</para><para><emphasis>void close ();</emphasis>closes the flat image and its redolog.</para><para><emphasis>off_t lseek (off_t offset, int whence);</emphasis>seeks at logical data position <emphasis>offset</emphasis> inthe undoable disk image. Only SEEK_SET is supported for <emphasis>whence</emphasis>.Returns -1 if a problem occured, or the current logicaloffset in the undoable disk image.</para><para><emphasis>ssize_t read (void* buf, size_t count);</emphasis>reads <emphasis>count</emphasis> bytes of data from the undoable disk image, from current logical offset,and copies it into <emphasis>buf</emphasis>.<emphasis>count</emphasis> must be 512.Returns the number of bytes read.Data will be read from the redolog if it hasbeen previously written or from the flat imageotherwise.</para><para><emphasis>ssize_t write (const void* buf, size_t count);</emphasis>writes <emphasis>count</emphasis> bytes of data from <emphasis>buf</emphasis> to the undoable disk image, at current logical offset.<emphasis>count</emphasis> must be 512.Returns the number of bytes written.Data will always be written to the redolog.</para></section><section><title> volatile_image_t methods</title><para><emphasis>volatile_image_t(Bit64u size, const char* redolog_name);</emphasis>instanciates a new <emphasis>volatile_image_t</emphasis>object. This disk image logical length is <emphasis>size</emphasis> bytes andthe redolog filename is <emphasis>redolog_name</emphasis> plus a random suffix. </para><para><emphasis>int open (const char* pathname);</emphasis>opens the flat disk image <emphasis>pathname</emphasis>,as a volatile disk image. The associated redolog willbe named <emphasis>pathname</emphasis> with a random suffix, unless set in the constructor.Returns 0 for OK or -1 if a problem occured.</para><para><emphasis>void close ();</emphasis>closes the flat image and its redolog.The redolog is deleted/lost after close is called.</para><para><emphasis>off_t lseek (off_t offset, int whence);</emphasis>seeks at logical data position <emphasis>offset</emphasis> inthe volatile disk image. Only SEEK_SET is supported for <emphasis>whence</emphasis>.Returns -1 if a problem occured, or the current logical offset inthe volatile disk image.</para><para><emphasis>ssize_t read (void* buf, size_t count);</emphasis>reads <emphasis>count</emphasis> bytes of data from the volatile disk image, from current logical offset,and copies it into <emphasis>buf</emphasis>.<emphasis>count</emphasis> must be 512.Returns the number of bytes read.Data will be read from the redolog if it hasbeen previously written or from the flat imageotherwise.</para><para><emphasis>ssize_t write (const void* buf, size_t count);</emphasis>writes <emphasis>count</emphasis> bytes of data from <emphasis>buf</emphasis> to the volatile disk image, at current logical offset.<emphasis>count</emphasis> must be 512.Returns the number of bytes written.Data will always be written to the redolog.</para></section><section><title> growing_image_t methods</title><para><emphasis>growing_image_t(Bit64u size);</emphasis>instanciates a new <emphasis>growing_image_t</emphasis>object. This disk image logical length is <emphasis>size</emphasis> bytes.</para><para><emphasis>int open (const char* pathname);</emphasis>opens the growing disk image <emphasis>pathname</emphasis>,Returns 0 for OK or -1 if a problem occured.</para><para><emphasis>void close ();</emphasis>closes the growing disk image.</para><para><emphasis>off_t lseek (off_t offset, int whence);</emphasis>seeks at logical data position <emphasis>offset</emphasis> inthe growable disk image. Only SEEK_SET is supported for <emphasis>whence</emphasis>.Returns -1 if a problem occured, or the current logical offset inthe grwoing image.</para><para><emphasis>ssize_t read (void* buf, size_t count);</emphasis>reads <emphasis>count</emphasis> bytes of data from the growing disk image, from current logical offset,and copies it into <emphasis>buf</emphasis>.<emphasis>count</emphasis> must be 512.Returns the number of bytes read.The buffer will be filled with null bytes if datahas not been previously written to the growing image.</para><para><emphasis>ssize_t write (const void* buf, size_t count);</emphasis>writes <emphasis>count</emphasis> bytes of data from <emphasis>buf</emphasis> to the growing disk image, at current logical offset.<emphasis>count</emphasis> must be 512.Returns the number of bytes written.</para></section></section></section></chapter><chapter id="debugger"><title>Debugger</title> <section><title>compile with debugger support</title> <para> &FIXME; </para> </section> <section id="debugger-get-started"><title>get started in debugger</title> <para> &FIXME; </para> </section> <section id="debugger-commands"><title>command reference</title> <para> &FIXME; </para> </section> <section id="debugger-techniques"><title>techniques</title> <para> &FIXME; </para> </section></chapter><chapter id="coding"><title>Coding</title> <section><title>coding conventions</title> <para> &FIXME; </para> </section> <section id="patches"><title>patches:</title> <para> &FIXME; how to make, where to submit, what happens then? </para> </section><section id="cvs-release"><title>Building a Bochs release</title><section><title>Preparing source files and CVS</title><para>Update version number and strings in configure.in.<screen>VERSION="2.2.pre2"VER_STRING="2.2.pre2"REL_STRING="Build from CVS snapshot on March 25, 2005"</screen>In the README file you have to update version number and date. Add someinformation about new features if necessary.<screen>Bochs x86 Pentium+ EmulatorUpdated: Fri Mar 25 10:33:15 CET 2005Version: 2.2.pre2</screen>Check date, update/sumup info in CHANGES. Run autoconf to regenerate configure and check them in.Create a CVS tag to mark which revision of each file was used in the release.For prereleases I make a normal CVS tag like this:<screen> cvs tag REL_2_2_pre2_FINAL</screen>But for a real release, I make a CVS branch tag AND a normal tag.<screen> cvs tag REL_2_2_BASE cvs tag -b REL_2_2</screen>The base tag marks where the branch split off of the main trunk.This is very useful in maintaining the branch since you can do diffsagainst it.<screen> cvs diff -r REL_2_2_BASE -r HEAD cvs diff -r REL_2_2_BASE -r REL_2_0 cvs upd -j REL_2_2_BASE -j HEAD file etc.</screen>The release and all bugfix releases after it are on the REL_2_2 branch.When the release is actually finalized, you can do this:<screen> cvs tag REL_2_2_FINAL</screen>Now you can start building packages based on the created release tag.</para></section><section><title>Building the release on win32</title><para>These instructions require cygwin and MSVC++.</para><para>In Cygwin:<screen> sh .conf.win32-vcpp # runs configure make win32_snap # unzip workspace, make a win32 source ZIP</screen>Copy the source ZIP to a windows machine, if necessary.</para><para>Open up Visual C++ and load the workspace file Bochs.dsw. Checkthe Build:Set Active Project Configuration is set the way you want it.For releases I use "Win32 Release".</para><para>To create "bochsdbg.exe" with Bochs debugger support, manually change twolines in config.h to turn on the debugger.<screen>#define BX_DEBUGGER 1#define BX_DISASM 1</screen>VC++ will rebuild bochs with debugger and overwrite bochs.exe. To avoidtrashing the non-debug version, move it out of the way while the debuggerversion is being built. Then rename the debugger version to bochsdbg.exe.<screen>cd obj-releasemv bochs.exe bochs-normal.exe(build again with BX_DEBUGGER=1 this time)mv bochs.exe bochsdbg.exemv bochs-normal.exe bochs.exe</screen></para><para>To get the docbook installed, you need to do something like this:<itemizedlist><listitem> <para> make dl_docbook </para> </listitem><listitem> <para> copy up to date doc files </para> </listitem></itemizedlist>Then you can do<screen>cd doc/docbook; touch */*.html</screen>Do make install_win32 into /tmp or someplace:<screen>make install_win32 prefix=/tmp/bochs-2.2.pre2</screen>This copies all the files into /tmp/bochs-2.2.pre2 and then creates abinary ZIP at /tmp/bochs-2.2.pre2.zip. Rename that bochs-2.2.pre2.win32-bin.zip.</para><para>Now make the NSIS installer package (the current script is known to work with NSIS 2.03)<screen>cd build/win32/nsis</screen>Unzip the binary ZIP file into bochs-$VERSION (must match Makefile) and then run make.<screen>unzip ~/bochs-2.2.pre2.zipmake</screen>That gives an installer called <filename>Bochs-2.2.pre2.exe</filename>. Test and upload it.</para></section><section><title>Building the release on Linux</title><para>Do a clean checkout using anonymous cvs, so that the source tarballwill be all set up for anonymous cvs. First I'll create a cleandirectory called "clean-anon".<screen>cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bochs logincvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bochs \ checkout -d clean-anon bochs</screen>Start with clean-anon which tracks the CVS head. Change its sticky tagso that it sticks to the release tag.<screen>cp -a clean-anon bochs-2.2.pre2cd bochs-2.2.pre2cvs upd -P -r REL_2_2_pre2_FINALcd ..tar czvf bochs-2.2.pre2.tar.gz --exclude CVS --exclude .cvsignore bochs-2.2.pre2</screen>The source TAR file bochs-2.2.pre2.tar.gz is ready to upload.</para><para>The RPM will be building using the configuration in .conf.linux witha few parameters from build/redhat/make-rpm. Make any last minute changesto .conf.linux. Any changes will go into the source RPM.WARNING : do not build in /tmp/bochs-XXX...<screen>./build/redhat/make-rpm | tee ../build.txt</screen>This produces two rpm files in the current directory. Test and upload.</para></section><section><title>Uploading files and creating a file release on SF</title><para>When you are ready with creating release packages you have to upload them to SFusing anonymous FTP using this location:<screen>upload.sourceforge.net/incoming</screen>Note that you cannot modify or delete files after uploading them. If you don't doanything with the uploaded files, they will be deleted by SF after 24 hours.</para><para>To create or edit a file release you have to log in to the <command>Admin</command>section on the SF project page of Bochs. Then you have to go to the<command>File Releases</command> page and follow the instructions there.</para></section></section></chapter><chapter id="webmastering"><title>Webmastering</title> <section id="websites"><title>websites</title> <para> &FIXME; </para> </section> <section id="shell-access"><title>shell access to the website</title> <para> &FIXME; </para> </section> <section id="repository"><title>website html repository</title> <para> &FIXME; </para> </section> <section id="site-update"><title>automatic site update</title> <para> &FIXME; </para> </section> <section id="other-content"><title>other content</title> <para> &FIXME; sources, tmp </para> </section> <section id="available-tools"><title>available tools</title> <para> &FIXME; sources, tmp </para> </section></chapter></book>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -