Osflexphpempty
phpempty 时间:2021-05-23 阅读:(
)
SlideUsingSCO-ProvidedDevelopmentandProgrammingToolsRonRecordJohnWolferr@sco.
comjlw@sco.
comSlideAgendaOverviewofSCOprovidedDevelopmentSystemsSuggestedopensourcetoolsBuildingopensourceapplicationsGettingsource,configurationandbuildissuesDebuggingtechniquestruss,debug,dynamicmemorydebuggingFUR–functionreorganizerPackagingtoolscustomandpkgaddSlideReviewOpenServer6.
0.
0DevelopmentSystemSlideHowOpenServer6isStructuredOSRSystemLibs/osr5/usr/lib/SVR5/UDKSystemLibs/usr/lib/OpenServer6devtools/usr/ccs/bin/OpenServer6devtools/osr5/usr/ccs/bin/OneOpenServer6KernelOSR5syscallsSVR5syscallsOSRABISVR5/UDKABIOneOpenServer6UserExperienceInstall,desktop,sysadmin,commandsLegacyAppsModernAppsSlideApplicationBinaryInterface–WhatisthatWhatanapplookslikeatthebinarylevelcontentandlayoutofinformationthatitpresentstosystemloadersandlinkers(objectfileformat)Howdifferentmodulesofanappcommunicatefunctioncallconventionssizeandlayoutofbasicdatatypessizeandlayoutofcompounddatatypes-structures,unions,bit-fieldsHowanappcommunicateswiththeOSpathnames,syscallnumbers,errno's,ioctl'ssizeandlayoutofbasicandaggregatesystemdatatypesSlideOpenServer6–SVR5ABI-defaultOpenServer6DevsysforSVR5(UDK)ABIOpenServer6Devsysusing-Kudkoptionor-/usr/bin/ccwhichdefaultsto–KudkuseforsinglecertificationonUnixWare7andOpenServer6useformodernizingexistingOSR5appsusefordevicedriverdevelopment(IHVs)usedtorelinktheOpenServer6.
0.
xSVR5kernelprovidesaccessto"NEW"featuresthreadsandLFS(>2Gbytefiles)SlideOpenServer6–OSRABIOpenServer6DevsysforOSRABIOpenServer6Devsysusing-Kosroptionor/osr5/usr/bin/ccwhichdefaultsto–KosrsetPATHenvironmentvariablewith/osr5/usr/binbefore/bin,/usr/binor/usr/ccs/binuseforbinarycompatibilitytolegacyOSR5appsprovidesmoremodernCandC++compilersStandardsConformance(almost)CandC++samelevelofcodegenerationandoptimizationasintheSVR5/UDKcompilers64-bit"longlong"NOTavailable-threadsorlargefiles(>2Gbytes)SlideMixingOSRandUDKABIObjectFilesNosafewaytolinkOSR5ABIandSVR5/UDKABIrelocatableorsharedobjects(.
o/.
a/.
so)nowaytointerceptdifferentsystemdatatypesnowaytointerceptdifferentbit-fieldlayoutsandfunctioncallingconventionsnowaytointerceptsystemcallsfromobjectsLinkerwillrejectmixtureofobjects,bydefaultForcelinkmodeprovided-"IknowwhatI'mdoing"butyouprobablydon'tnotrecommendedSlideBuildingLegacyOpenServer5AppsWhenisOSRABIneededwhenlinkingwithexistingOSR5.
o/.
a/.
soobjectsUseOSRABIcompilerssameasUDKbutwith-KosrforOSRABImodern,reliable,standard,optimizing64-bit"longlong"integeravailableLFS,threadsandEFTnotavailablecanacceptOSR5COFFobjectsasinputtolinkerbutcannotgenerateCOFFcanlinkwithexistingOSR5C.
o/.
a/.
soobjectsbutcannotlinkwithexistingOSR5C++objectsuseCC-XotocompileveryoldOSR5C++sourcesSlideWantnewfeaturesbutneedcompatibilitywitholdOSR5libraryIfyourown,recompileIffromanotherISV,getvendortoprovidenew,SVR5ABI-builtlibrariesIfneitherispossible.
.
.
makeappinto2processesoneprocesscallsoldlibcompile-Kosroneprocessusesnewfeaturescompile-Kudkusesocket,pipe,IPC,etc.
tocommunicatebetweenprocessesSlideGuidanceonmodernizingexistingapps:ThreadsMustmodifytousethreadspthreadsAPImorestandardthanSVR4/UIthreadsuse-Kudktorecompileapplicationuse-KpthreadwhencompilingthreadedcodefixessomethingslikeglobalerrnoautomaticallyExistingOSR5sourcemaynotbethread-safe!
mayusenon-reentrantfunctionssuchasstrtok()use_r()replacementswhenavailablemaystoreapplicationdatagloballymayreturnpointerstostaticdatamuststudyyourcodeSlideGuidanceonmodernizingexistingapps:LargefilesGoforwardwithLargeFileSummit(LFS)APIsuse-Kudktorecompileapplicationcreatefilesuptooneterabyteinsizecanusesize-specificinterfacesfopen64,lseek64,etc.
or,canuseregularfopen,lseek,etc.
cc-D_FILE_OFFSET_BITS=64off_t,etc.
become64bitsmustusevxfsfilesystemandcreatefilesystemwithlargefilesflagmkfsorfsadm_vxfstoturnon/offulimitmustbesettounlimitedSlideGuidanceonmodernizingexistingapps:FundamentalsystemtypesBecarefulwithexpandedfundamentalsystemtypes(EFT)SizechangebetweenOSR5andOSR6inUDKmode:mode_t,dev_t,uid_t,gid_t,nlink_t,pid_t,ino_t,sigset_ttypicallysizegoesfrom16bitsto32bitssystemorappstruct'scontainingthemalsochangesizee.
g.
,structstatcontainsbothdev_tandino_tdev_talsochangeshowmajor,minornumberspackedallconsequencesofSVR5infusionintoOpenServer6kernelChangeshouldbetransparentunlessyourcodehasassumptionsaboutsizeSlideGuidanceonmodernizingexistingapps:C++ExistingOSR5DevSysC++compilerisold!
AT&TCfront-based,c.
1992,buggypredates1998ISOlanguage/librarystandardslarge-scalechangesinlanguagesincethenIfyoursourcesweredevelopedwithit…expecttheywillnotcompilecleanlynowsourcefix-upsareusuallystraightforwardyou'redoingyourcodeafavor!
forbadcasestrytheCC-XooptionoldlibraryclasseswillallstillbethereSlideGuidanceonmodernizingexistingapps:C++ABIissuesC++ABIsareuniqueforeachcompilerExceptionhandlingimplementationClassobjectlayoutVirtualfunctiontablepointerpositionBaseclasssub-objectorderVirtualfunctioncallmechanismVirtualfunctiontableformatUseof"thunks"NamemanglingconventionsCannotmixC++compilerobjectsSCO(USLC)C++≠CfrontC++≠GNUg++SlideFeaturesoftheOpenServer6DevSysCCompilationSystemC++CompilationSystemC/C++DebuggermemtoolfurExceptwherenoted,featuresapplytoDevSysusedforbothSVR5/UDKandOSRABIsandtoUDKonUW7Amajorupgradecomparedtoexisting(andoutdated)OSR5DevelopmentSystemproduct!
!
SlideTheOpenServer6-KmodeswitchCompilers/usr/ccs/bin/ccdefaultsto-Kudk/osr5/usr/ccs/bin/ccdefaultsto-Kosr"cross-ABI"compilesareallowed/usr/ccs/bin/cc-Kosr.
.
.
/osr5/usr/ccs/bin/cc-Kudk…dittoCCforC++compiles–as&ldalsoUseccorCCtodolinking–linksagainstcorrectABIstartuproutines.
OtherDevSyscommandshave-Kosr|udkoptionifnecessary(e.
g.
lint)don'thaveoptionifirrelevant(e.
g.
lexandyacc)SlideOpenServer6CCompilerRobustcompiler,excellentIA-32codegenerationStandards-conforminglibrariesandheadersProfiledversionsoflibrariesprof,lprofinbothABIsfprof[SVR5/UDKABIonly]Standardsetofcommandlinetools,fullyinternationalizedConformancechecking(-Xc)isagainstC90standardSupportforJavanativemethods[SVR5/UDKABIonly]AlmostallofC99-ISO/IEC9899:1999inline,restrict,variableargumentmacrofunctions,&60otherfeaturesOnlythingsmissing:variable-lengtharrayscomplexandimaginarynumbersminorvariancesinsnprintf(3S)[somenewC99libraryfunctionsandheadersmaybeSVR5/UDKABIonly]Option–XbwilldisableinlineandrestrictkeywordsSlideOpenServer6C++CompilerAccurate,robustimplementationAlmostalloftheC++standard-ISO/IEC14882:1998exceptrarely-used:exportkeyword,placementdelete,function-try-blocks,two-phasetemplatenamebinding,multi-bytecharactersinsourcecode,partialspecializationofaclassmembertemplateCompleteC++StdLibrarySTL,iostreams,string,locale,numerics,etc.
fastandthread-safeExcellentIA-32codegenerationExceptionHandling-highperformanceDevicedriversupportThreadsafety[SVR5/UDKABIonly]SupportforJavanativemethods[SVR5/UDKABIonly]SlideBasic-Suggested-OptionalOpenSourceToolsSlideBasicOpen-SourceToolsStartersetgmakeautoconf(2.
13and2.
59)automake-synchedwithautoconfGNUm4Probablywillneed(atsometime)bisongawkflexSlideHighlySuggestedOpen-SourceToolsDependingonpersonalpreferences,projectbuildorchangesubmissionrequirements…GNUdiffGNUpatchCVS–ConcurrentVersionSystemGNUtarSlideOptionalOpen-SourceToolsGNUbinutils(gasandld)OSR6assemblerdoesnothaveWillametteSIMDinstructionsMinordifferencesinSIMDmnemonicsGNUGCCSIMDinstructionsareinGCC"asm"statementsAvoidg++especiallyforgraphicsC++ABIissuesRPMSlideAcquiringOpen-SourceToolsOpenServer5.
0.
7GNUDevelopmentToolsAfterchsysinfoosr5InstallGNUm4,bison,flex,diff,patch,awk,make,CVSandconfigurationcreationtoolsDONOTINSTALL!
!
!
!
GCC–notdualABIaware-GeneratesOSR5ABIcodeLooksin/usr/includeforOSR5systemheadersLooksin/usr/lib&/usr/ccs/libforlinklibrariesGDB-NotSVR5kernelawareSlideAcquiringOpen-SourceTools-cont.
UDK7.
1.
4OSToolssetInstallindividualpackages–notthesetchsysinfouw7pkgadd-dGNUm4GNUautomkGNUautocfGNUmakeGNUawkGNUbisonOsflexGCC2.
95.
3andGDBareconfiguredforSVR5SVR5/usr/gnu/lib/libstdc++.
so.
2.
10.
0SlideAcquiringOpen-SourceTools-cont.
AdditionaltoolsorruntimerequiredtobuildaprojectCheckforavailabilityonSkunkwareMaybepartofprojectsourcePartofthenormalbuildsequenceMayneedtobebuiltasafirststepMaymovetothefrontofyourprojectlistMaybeoptionalinterface(s)Defer/omitnowBuildlaterandrebuildcompleteproject.
SlideBuildingOpenSourceApplicationsGettingProjectSourceSlideGettingtheSource-FromWhereSCOFTPsiteftp://ftp.
sco.
com/pub/openserver6/600/opensrcftp://ftp.
sco.
com/pub/unixware7/714/opensrcftp://ftp.
sco.
com/pub/openserver5/507/opensrc/sourceSCOSkunkwarehttp://www.
sco.
com/skunkwareftp://ftp2.
sco.
com/pub/skunkware/src/ftp://ftp2.
sco.
com/pub/skunkware/osr6/src/patches/ftp://ftp2.
sco.
com/pub/skunkware/uw7/src/patches/SlideGettingtheSource-FromWherecont.
Freshmeatwebsitehttp://freshmeat.
netFileWatcherwebsitehttp://filewatcher.
orgFreeSoftwareFoundationFTPftp://ftp.
gnu.
org/gnuSUSESourceRPMsFTPsiteftp://ftp.
suse.
com/pub/suse/i386/update//rpm/src/SourceForgewebsitehttp://sourceforge.
netSlideSourceFormatsVaryingSourcereleaseformats–choiceofprojectmaintainerstarorcpiofilearchivesOftencompressed–GNUgziporziparchivefilescvsrepositoryonprojecthostedsiteLinuxsourceRPMsGoodsourceforrecentpatchesSpecfilecanprovideconfigurationguidanceStartwithpatchesfromthelastreleaseSlideManagingSource&BuildChangesImportanttotrackALLchangesAvoidreinventingthewheelProbablyneedmost,ifnotall,changesinnextreleaseHelpothersintheSCOcommunitytocustomizetotheirneedsUltimatelytocontributesource,buildandconfig.
changesbacktotheopen-sourcecommunityOtherscanreproduceproblemsandprovidesolutionsorwork-aroundsSlideSourceChanges-cont:PreservetheoriginalsourcefileDonotover-writepreviouslysavedoriginalsmv[file][file].
orig#preserveorigfiledatecp[file].
orig[file]#modifiedfile–today'sdatechmoduw+w[file]Createempty"original"forevery"new"filetouch[file].
origSlideSourceChanges-cont:Usecontextorunifieddifftocapturechangescd[TOP_OF_SRC_TREE]foriin`find.
–name'*.
orig'`;doecho$idiff[-c|-u]$i${i%.
orig}done>[project]_cumulative_patch.
[date]Contextorunifieddiffnotapplicabletonon-textfiles.
jar,compresseddata,binaries,.
jpeg,.
pdf,etc.
Copy/replaceentirelySlideSourceChanges-BuildAfreshSomeopen-sourceprojectsareconfigurableforseparatesourceandobjectdirectoriesMakefiledesign/implementationBlowawaytheobjectdirectoryandmakeagainReconstructprojectsourceUnwindsourceinto"clean"directorycd[TOP_OF_SRC_TREE]gzcat[compressed_tar_archive]|tar-xf-Reapplycumulativepatchespatch-b–p0&1|teelog.
patchSlideSourceChanges-UsingPreviousPatchesPrev.
releasepatchesmaynotapplycleanlySourcecodechangesinareaofyourpatchSomechangesbought-backintoprojectsourceProjectsourcerestructureUnappliedpatcheswrittento[file].
rejReviewrejections–reworkasneededfind.
-name'*.
rej'SlideBuildingOpenSourceApplicationsConfigurationIssuesSlideconfig.
guess2001submittedUW7changestoFSFtostandardizeSVR5tripletHandledOpenUNIX8i86:*:5:[78]*YoumayneedtoupdateforOSR6.
0.
0i86:*:5:[678]*Producestripleti86-unknown-sysv5SlideConfigureScriptstripletoverridepresetHOST/TARGET/BUILDSVR5ABIi586-sco-sysv5OSR5ABIi586-sco-sco3.
2v5.
0.
7add-KosrtoCFLAGS,CXXFLAGS,LDFLAGSorsetPATHforOSR5ABIpreferenceSlideConfigureScriptsOverridedefaultuseofgcc,ifinstalledCC="cc"CPP="$CC–E"CXX="CC"RANLIB=trueUseccorCCtodothelinkingAvoiduseofcompilationorlinkingoptionsthatspecifydefaultheaderorlibrarypathsAvoid-I/usr/include–I/usr/include/sysAvoid-L/usrlib-L/usr/ccs/libSlideAbsenceofconfig.
guessconfigureandconfigure.
indirectlyuseunameSCO_SVtypicallyconfiguresforOpenServer5CorrectifusingOSR5ABIUnabletohandleLFSfilesResolution–recognizeSCO_SVandrelease5asOpenServer6.
0.
0andforceselectionofSVR5HandedittheconfigurescriptorModifyautoconf/aclocal.
m4RerunautoconftoregenerateanupdatedconfigurescriptSlidescoutilsftp://ftp2.
sco.
com/pub/skunkware/osr6/vols/scoutils-1.
3Sc-VOLS.
cpioShellscriptfrontendsConfigure&buildopen-source/usr/bin/Configure,/usr/bin/Build&/usr/bin/PrepProjectsourceat:/usr/src/sco//-.
tar.
bz2Projectpatchat:/usr/src/sco/patches/--osr6.
patchcd/usr/src/sco/BuildSlidescoutils-cont.
BuildExtractssourceAppliespatchRun-/Configure-OSR6,ifitexists/usr/bin/Configure,otherwiseThenrun-/Build-OSR6,ifitexistsGNUmake,otherwiseSlideBuildingOpenSourceApplicationsGCC-ismsSlideNeedinformationaboutgccextensionsCheckthegccinformationprovidedinearlierportsOSTools–UW7.
1.
4GNUToolChain–OSR5.
0.
7/usr/gnu/bin/infogccSelect"Cextensions"SlideGCC-isms:VarArgMacroFunctionsGCCprovidedearlyVarArgMacroFunctions#defineeprintf(format,args…)fprintf(stderr,format,##args)SupportedISO/IEC9899Standardfeature#defineeprintf(format,fprintf(stderr,format,__VA_ARGS__)Conditionthechange#ifdef__USLC__…ISOformat#else…GNUformat#endifSlideGCC-isms:returnGCCaccepts:voidbar(){return;}voidfoo(){returnbar();}TobeISOcompliant,changeto:voidfoo(){bar();return;}SlideGCC-isms:inlineCfunctionsGCCsupported"inline"CfunctionsTreatfunctionasstatementexpressionatpointofcallISO/IEC9899added"inline"CfuntionsSupportedonOSR6.
0.
0andUW7.
1.
4DesignedtoworkwithC++"inline"incommonheadersRequires1andonly1externaldefinitiongeneratedIfinmodulesourcefile,probablynotanissuePotentialPROBLEMifinaheaderfileSuppress"inline"keywordduringconfigurationCC="cc–Xb"SlideGCC-isms:statementexpressionsCompoundstatementinparenthesesProbablyencounteredin#define#definemaxint(a,b)int_a=(a),_b=(b);_a>_b_a:_b;})Ifinaheaderfile,conditionallyreplacewithCstaticfunctionstaticintmaxint(a,b)return(a>ba:b);}SlideGCC-isms:__attribute__Functions–specifyside-effectsVariables–packed,aligned,section,weakTypes–packed,alignedFormat–indeclarationsordefinitions__attribute__(([()]))Changeneeded:ConditionallyremoveattributemodifierUse,asappropriate:#pragmapack()#pragmaweak[=]SlideGCC-isms:EnhancedAsmsFeatureisgenerally"unique"toeachcompilerUsedfor:Betterorspecializedoptimization/performanceAccesstohardwareregisters/instructionsnottypicallyutilizedbytheC/C++codegeneratorWithexceptiontoWillametteSIMDinstr.
RecodetoSCOEnhancedASMFunctionPrototypedasfunctionCalledasafunctionFollowi386callingconventionPreserveuserandstackregisters–edi,esi,ebx,ebp,espReturnvaluesineax(edx)orfp0SlideGCC-isms:EnhancedAsms-cont.
OSR6.
0.
0DocumentationSoftwareDevelopmentProgramminginCandC++EnhancedASMfacilityasm[type]identifier([param-list]){[storage-mode-spec-lineasm-body]+}storage-mode-spec-line:%[storage-mode[identifier[,identifier]*];]+SlideGCC-isms:EnhancedAsmscont.
EnableoptimizationoffunctioncallingASMfunctionby:#pragmapartial_optimizationIfandonlyif:FollowedcallingandregisterconventionsRegister%ebphasnotbeenmodifiedRegister%espnotmodifiedwithmovlNobranchintooroutofASMfunctionautoorparamonlymodifiedifaddressofvariableispassedtoASMfunctionAutoorparamaccessedifpassedbynameoraddresstoASMfunctionSlideGCC-isms:noequivalents(atpresent)ExtendedASMswithWillametteSIMDUseGCCorseparateassemblysourcecompiledwithGNUassemblerVariableLengthArraysLocalcanberecodedusingalloca()atfunctionentryUseGCCSlideBuildingOpenSourceApplicationsC++IssuesSlideTemplateInstantiationDifferentbehaviorGNUg++andSCOC++CanpresentproblemsincompilationorlinkingGNUg++InstantiatesallpossiblyneededtemplatesineachobjectfileSeparatelynamed.
textsectionsGNUcollect2/ldeliminates"duplicates"whenlinkingSlideTemplateInstantiation-cont.
SCO(USLC)–"implicitinstantiation"C++compilerdetermineswhere/whentemplatesareinstantiatedAt"link"timeWhencollectedinto.
so,a.
outor.
aUseCCcommandtodothelinkingImplementationTemplatedeclarationinxxxx.
hTemplatedefinitioninxxxx.
c–samedirectoryasxxxx.
hAuxiliaryfiles–createdbycompilersource.
ti&source.
ii(where.
ocreated)InfotorecompileTemplatesvisibleandtobeinstantiatedinthat.
oC++compilerimplicitlyincludesxxxx.
cforneededtemplateinxxxx.
hSlideTemplateInstantiation-cont.
Non"implicit"sourceconstructionDeclarationanddefinitioninheaderfileSimilarlynamed.
cfilevisibleProbablyrelatedinfunctionalitysincesamenameContainsnon-templateclass/functiondefinitionsIf.
cfileisimplicitlyincludedinmultiple.
oMultiply-definederrorsatlinktimeHeaderalsocontainsnon-templateclass/functiondefinitionsMultipledefinitionsifheadersusedbymorethansingle.
oSolution:usepreprocessordefinestocontrolvisibilityofnon-templatedefinitionsSlideTemplateInstantiation-cont.
C++templates&archivesObjectfileisnowdisassociatedfrom.
ti&.
iiCannotrecompiletoget"needed"instantiationERROR:-undefinedtemplatefunctionlaterinthebuild"needed"templatesmustberesolvedpriortoaddingtoarchiveCC–Tprelink_objects$(OBJS)ar$(OBJS)SlideFriendNameInjectionChangeSlightscopingchangeinthe1998C++StandardPreviously"friend"namewasinjectedintheenclosingscopeIffilescope,becamefriendtoeveryonePre-GCC3.
xcodemayrunintothisMosthasprobablybeenupdatedoverthelast4yearsSlideDebuggingtrussSlideTruss–tracesystemcalls&signalsOneormanyprocessesOptionallyfollowforkedprocess(es)OptionallyindicateLWPidofthreadedprocessAssertscontrol(monitors)processthrough/procfilesystemSupportsbothSVR5andOSR5ABIprocessesSelectivelydisplayorsuppress:SystemcallsSignalsI/ObyfiledescriptorMachinefaultsDisplaysystemcallargumentsSlideTruss–commandformattruss[-flcaein][-[tvx][!
]syscalls[!
]signalm[!
]faultrw][!
]fdooutfile]command|-ppidDefaults-tall-v!
all-sall-mall-m!
fltpage-r!
all-w!
allSlideDebuggingwithdebugSlideOpenServer6Debugger-debugGraphicaluserinterfaceUserconfigurablescreenlayoutsCommandlineinterfacepowerful,shell-likecommandlanguagecommandhistory,commandaliasesStrongCandC++symbolicdebuggingStepthroughinlinefunctions,headercode,exceptionsControlsmulti-process,multi-threadedappsfollowforksinbothparentandchildrenprocessesUnderstandsELF/COFF,DWARFI/IIexecutablesSlidedebug-Howtogetstarteddebug–manpagehelpcommandinthedebuggerhelp–listsavailablecommandsandtopicshelp-formatanddetailsaboutcommandortopicUsetheon-line/locallyinstalleddebuggerdoc.
"DebuggingandanalyzingC&C++Programs"CommandlineandGUITutorials,explanations,andtipsSlidedebug-CommandFormatdebug[com_opts][[-p][-fall|none|procs][-r]lstart_loc]cmd_line]debug[com_opts][-fall|none|procs]lload_file]process.
.
.
debug[com_opts][-p][-mpath]-ccore_file[object]debug[com_opts][-p][-mpath]core_filecom_opts:[-V][-ic|x][-Xopt][-ddefaults]spath][-Ya,dir]Slidedebug-CommandLineInterfaceCreatingadebugsessioncreategrabProcessExecutionrun[-bfr][ulocation]step[-io][-ccount]nextpredefinedaliasfor"step-o"releasehaltSlidedebug-StopEventsBreakpoints–function,statement,instructionaddressWatchpoint–valueinmemorychangesExpression–logicalexpressionistrueCreatewith:stop[-pproc_list][-ccount]stop_expr[command]AliasedasbManagestopeventswith:deletedisable/enablechangestopSlidedebug-OtherEventsSignals–default:monitorseverysignalsignal-d[-i][signal,.
.
.
]signal[-pproclist][-iq][signal,.
.
.
[command]]cancel-removesspecifiedsignal(s)frompendingsignalskill-sendspecifiedsignal(s)C++exceptionsexception-d[-i]{throw|catch}exception[-pproclist][-iq]{throw|catchtype][command]Slidedebug-OtherEventsSystemcalltracingsyscall[-pproclist][[-eqx][-ccount]call.
.
.
[command]]OnStop–defineactionforanystoponstop[-pproclist][command]Managingalleventsevents-listevent(s)andassociateinfoenable,disable,deleteSlidedebug-DisplayingData&ProcessInformationstack-displayfunctioncallbacktracelist-listsourcestatementsprint-printvariablesandexpressionsDefaultsto"type"ofvariableOptionalprintf()styleformatstringdump-hexadecimal/characterdumpdis-disassemblyofcoderegs–general,control,FP&MMXregistersmap–listprocessmemorymapwhatis–infoonvariable,functionortypeidentify–identifyalocationinmemorySlidedebug-PersonalConfigurationaliascommanddefinealternate/abbreviatedcommandsusetoestablishdbx-likeorgdb-likecommandsbuildcomplex,repetitive,conditionalcommandsequences$HOME/.
debugrcstartupdebugcommandscriptestablishmy_former_debugger-likeconfigurationdebug…–d…usesspecificalternatestartupscriptinsteadofdefaultSlidedebug-logon/logoff/scriptlogonlogsdebugcommandsenteredandoutputtoafilegeneratedoutputappearsascommentscapturecompletehistorycapturerepetitivecommandsequencelogoffTerminateloggingscriptreadsdebugcommandsfromSlidedebug-FordbxorgdbusersdbxusersSection3ofthePortingGuide"AGuidetodebugfordbxUsers"gdbuserscommandcomparisonsfromMay/June2000SCOWorldarticleSummaryisintheon-linehandoutSlideDebug–GUIdefaultlayoutSlideDebugging:DynamicMemorymemtoolSlidememtool-CatchingDynamicMemoryErrors[SVR5/UDKABIonly]Diagnosedynamicmemoryallocationerrorswritingbeyondablockofmemoryusingdeallocatedblocksmemory"leaks"badargumentspassedtoCmalloc()orC++new()DoesnotcatchgeneralpointermisusesorwritingoutsidelocalorglobalarraysRunstheapplicationunderthehiddencontrolofthedebuggerandthedynamicClibrarymallocruntimecheckingSlidememtool–Underthecoversdiagnosticoutputinternal(two-way)command-linecommunicationdebugmemtoolprocesscontrolapplicationprocessdynamicClibrarybasicdiagnosticinformationuserinteractionSlidememtool(cont'd)Diagnosticsincludeonetothreestacktraceswhendetectedwhen(de)allocatedprevioususe(forrealloc()orfree())ErroneouslymodifiedblockdiagnosticsincludeanannotatedmemorydumpsnapshotfortheblockEachdiagnosticcomeswithanexplanation–short,medium,orlong(userselectable)Applicationneednotberebuiltorrelinkeddebugging(-gflag)providesmuchbetterinfoSlideDebugging:DynamicMemorySVR5-MALLOC_CHECKSSlideMALLOC_CHECKS-SVR5EnvironmentvariableactivatedmemorycheckingintheSVR5CruntimeNorecompilationneeded-dynamiclibc.
so.
1MALLOC_CHECKS=1=basic-fillmode3=safe-copymode-duplicatearenablockheaders5=added-spacemode–allocationpaddedmallinfo()-checkarenaintegrity2,4,6=abovewitharenacheckonallmalloccalls-1,-5=highmemoryedgewithelectricfence-3,-7=lowmemoryedgewithelectricfenceSlideDebugging:DynamicMemoryOSR5-duma/dmallocSlideOSR5ABIsupportCOMINGSOON!
!
toaSkunkwareWeb-siteNearYouSlideFURFUnctionReorganizerSlidefur-FUnctionReorganizationInstrumentsandreorderscodeinrelocatableobjects-atcodeblocklevelchangesfunctionorder-localityofreferencereordercodeblockswithinfunctions-improvesbranchpredictionmove"low-usage"codetopseudofunctionsProfileguidedoptimizationwithoutrecompilationActualusesHasbeenusedtooptimizeSCOkernelsandlibrariesOEMsusedfurtogain15%improvementinOracleDBserver-TPCCbenchmarksUsedforJ2SEandsoonforFirefoxbrowserSlidefur–Blockprofiling[1]CompileandpartiallylinkasrelocatableobjectforC++,mustprelinkbeforelinking:-Tprelink_objectsld-r–oxxxx.
reltolink–noruntimelibrariessaveacopyofthexxxx.
relUsefurtoinstrumenteverybasicblockofthexxxx.
relfur–b[all|flow]–Kc"mkblocklog–p/block.
xxxx"xxxx.
relinstrumentsxxxx.
relandgeneratesloggingcodeCompletethelinkproducinganinstrumenteda.
outcc/CC…xxxx.
rel….
.
log.
xxxx.
oRunrepresentativeworkloadsmultiplerunscreatesconsecutiveblock.
xxxx.
Slidefur–Blockprofiling[2]Analyzeallthelogfiles,creatingoptimalreorderingfilecopysavedxxxx.
reltoxxxx.
relfur–r–o-k\-f/block.
xxxx.
01,/block.
xxxx.
02,…-mxxxx.
relApplythereorderingfileagainstthexxxx.
relandcompletetheFINALlinkfur–o-kxxxx.
relcc/CC……xxxx.
rel……Onceisobtainedandpreserved,onlysteps#1and#6needbedoneonsubsequentrebuildsIffunctionshapechanges,furwillNOTreorderthatfunctionHeavysourcechanges–repeatallstepstoproduce"current"SlidePackagingMetapkgandCDMTforOpenServerSlideCreatingcustominstallablepackagesforOpenServerwithMetapkgDownloadandinstallmetapkgfromftp://ftp2.
sco.
com/pub/skunkware/osr6/metapkg/Installmetapkgandremanbinariesanywhereinroot'sexecutionPATHCreateasymboliclinkformkcdmt(andmkpkgaddifpkgaddinstallablepackagesaredesired)ln-s/usr/bin/metapkg/usr/bin/mkcdmtln-s/usr/bin/metapkg/usr/bin/mkpkgaddDocumentationindocsubdirectoryftp://ftp2.
sco.
com/pub/skunkware/osr6/metapkg/doc/Examplesinexamplessubdirectoryftp://ftp2.
sco.
com/pub/skunkware/osr6/metapkg/examples/SlidePreparingthePackagingHierarchyCreateinputdirectoryandpopulatedistdirectoryCreatedist/cntl/scripts,ifanyCreate.
mkcdmtcontrolfileSpecifynon-defaultpermissionsandownershipSymboliclinksspecifiedasadditionalexportsDependenciesandupdatedversionslistedhereRunmkcdmt.
Forexample:mkcdmt-f-h-d`pwd`-Pgimp\-D"GNUImageManipulationProgram"\-V2.
2.
7Sb-p`pwd`/gimp.
mkcdmtRunmakeSlideSampleMetapkgControlFileprepare("Checkingandpreparingdistribution"){auto_compress_texinfo();auto_format_mansource();auto_strip(TRUE,TRUE);}packageMETAPKG_DESCRIPTION}","QT3"){file("/usr/lib/qt3/mkspecs/unixware-cc/qmake.
conf"){access(SERVER);}file("/usr/lib/qt3/lib/libqt-mt.
so.
3.
3.
8"){addexport("/usr/lib/qt3/lib/libqt-mt.
so",normal);}}component("qt3","${METAPKG_VERSION}","${METAPKG_DESCRIPTION}"){dependency("SCO:gwxlibs");upgrades("^3.
3.
5*");}SlideCustomControlScripts(OpenServer)ReviewCDMTdocumentationathttp://osr600doc.
sco.
com/en/manCDMT/CONTENTS.
htmlUsecqsscriptforpre-installationsystemprep–forexample,creationofnewusers/groupsUseccsscriptforinstall/removalconfigduringphasesAdding/removingentriesinSCOHelpdocsystemSettingsystemspecificconfigurationparametersEnabling/disablingautomaticstartupofservice(s)Initializingproductconfiguration(e.
g.
Setupcache)MostlyusedduringPRE_INSTALL,POST_INSTALL,PRE_REMOVE,andPOST_REMOVEphasesIfdesired,createusr/share/meta/doc/.
.
.
entriesforSCOHelpSlideExampleCCSScript(Part1)#!
/bin/shscriptname="$0"step="$1"keywords="$2"Pkglist="$3".
ccsSetup.
shdoPostExport(x/usr/bin/doctoolusr/bin/doctool--add$DOC/SDK_qt3.
desktop}}SlideExampleCCSScript(Part2)doPreUnExport(x/usr/bin/doctoolusr/bin/doctool–remove$DOC/SDK_qt3.
desktop}}DOC=DevSysDoc/SDKhome/SDKgroup/SDK_qt3ccs_return_value=0case"$step"inPOST_EXPORT)doPostExportPRE_UNEXPORT)doPreUnExport;;esacexit$ccs_return_valueSlidePackagingSVR4PackageDatastreamSlidePrepareDistributionHierarchyPopulatedistributiontreeCorrectpermissions/ownership/groupSetdefaultconfigurationparametersCreate"admin"and"pkginfo"filesattopoftreePKG="MyProd"NAME="MyProd"VERSION="1.
0.
1"CATEGORY="application"CLASSES="MyProd"ARCH="i386"BASEDIR=/SlidePrepareDistributionHierarchy(continued)SimpleadminfileBasedir=askCreateinstallationscriptsifnecessarypreinstall/postinstallpreremove/postremoveCreateprototypefileEntriesforadmin/pkginfo/installscriptsiadmin=adminipkginfo=pkginfofind-print|pkgproto>>prototypeSlideCreatethePackageEditprototypefilechanginganyrelativesymboliclinkstoabsolutesymboliclinksRunpkgmkpkgmk-o-c-d`pwd`-r`pwd`Runpkgtrans,ifdesired,tocreateapkgadddatastreampkgtrans-s`pwd``pwd`/MyProd.
pkgMyProdInstallandtestnewlycreatedpackagepkgadd-d`pwd`/MyProd.
pkgallSlideCreatingPackagesUsingSkunkware'smkpkgDownloadandinstallthemkpkgpackageftp://ftp2.
sco.
com/pub/skunkware/uw7/Packages/mkpkg-1.
1.
pkgExtractdistributiontreeintoemptydirectorySetcorrectpermissions/ownershipRunmkpkgCreateinstallationscriptsifnecessaryIfnecessary,editprototypefileandrun.
/MakePKGInstallandtestnewlycreatedpackagepkgadd-d`pwd`/MyProd.
pkgallSlideGuidance/AssistanceSlideOpenServer6SupportResourcesPortingGuide:http://www.
sco.
com/support/docs/openserver/600/porting/osr6portingTOC.
htmlUpgradeGuide:http://www.
sco.
com/support/docs/openserver/600/upgrade/index.
htmlOnlineDocumentationandLateNewshttp://www.
sco.
com/support/docs/openserver/SlideOpenServer6SupportResourcesSupportDownloadPageforOpenServer6:http://www.
sco.
com/support/update/download/product.
phppfid=12&prid=20SCO"Legend"MailingList:PublicLegend-subscribe@list.
sco.
comlegend@sco.
comPorting/MigrationAlias:osr5to6@sco.
comKnowledgebase:http://wdb1.
sco.
com/kb/search
hostkvm怎么样?hostkvm是一家国内老牌主机商家,商家主要销售KVM架构的VPS,目前有美国、日本、韩国、中国香港等地的服务,站长目前还持有他家香港CN2线路的套餐,已经用了一年多了,除了前段时间香港被整段攻击以外,一直非常稳定,是做站的不二选择,目前商家针对香港云地和韩国机房的套餐进行7折优惠,其他套餐为8折,商家支持paypal和支付宝付款。点击进入:hostkvm官方网站地址hos...
近日华纳云发布了最新的618返场优惠活动,主要针对旗下的免备案香港云服务器、香港独立服务器、香港高防御服务器等产品,月付6折优惠起,高防御服务器可提供20G DDOS防御,采用E5处理器V4CPU性能,10Mbps独享CN2 GIA高速优质带宽,有需要免备案香港服务器、香港云服务器、香港独立服务器、香港高防御服务器、香港物理服务器的朋友可以尝试一下。华纳云好不好?华纳云怎么样?华纳云服务器怎么样?...
企鹅小屋怎么样?企鹅小屋最近针对自己的美国cn2 gia套餐推出了2个优惠码:月付7折和年付6折,独享CPU,100%性能,三网回程CN2 GIA网络,100Mbps峰值带宽,用完优惠码1G内存套餐是年付240元,线路方面三网回程CN2 GIA。如果新购IP不能正常使用,请在开通时间60分钟内工单VPS技术部门更换正常IP;特价主机不支持退款。点击进入:企鹅小屋官网地址企鹅小屋优惠码:年付6折优惠...
phpempty为你推荐
政协晋城市委员会主办followgoogleloadedios支持ipadIOJsios8支付apple支持ipadeaccelerator使用apmsevr中eAccelerator显示NO是什么问题css3圆角css实现圆角的几种方法是什么?css3圆角用CSS3怎么实现圆角边框?
photonvps host1plus justhost 韩国电信 sub-process panel1 免费个人网站申请 七夕促销 免费防火墙 中国电信测网速 免费测手机号 web服务器安全 什么是web服务器 国外的代理服务器 iki lamp怎么读 godaddy空间 阿里云邮箱申请 cpu使用率过高怎么办 时间同步服务器 更多