head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC6:1.1.1.1
	netbsd-11-0-RC5:1.1.1.1
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	gdb-17-1:1.1.1.2
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	gdb-16-3:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.30
	netbsd-11-base:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	gdb-15-1:1.1.1.1
	perseant-exfatfs-base-20240630:1.1.1.1
	perseant-exfatfs:1.1.1.1.0.28
	perseant-exfatfs-base:1.1.1.1
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	gdb-13-2:1.1.1.1
	netbsd-10:1.1.1.1.0.26
	netbsd-10-base:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.24
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.22
	cjep_staticlib_x-base:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	GDB-11-0-50-20200914-git:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.20
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-8-2-RELEASE:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.18
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	gdb-8-3:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	netbsd-8-0-RELEASE:1.1.1.1
	phil-wifi:1.1.1.1.0.16
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	pgoyette-compat-0415:1.1.1.1
	pgoyette-compat-0407:1.1.1.1
	pgoyette-compat-0330:1.1.1.1
	pgoyette-compat-0322:1.1.1.1
	pgoyette-compat-0315:1.1.1.1
	pgoyette-compat:1.1.1.1.0.14
	pgoyette-compat-base:1.1.1.1
	gdb-8-0-1:1.1.1.1
	matt-nb8-mediatek:1.1.1.1.0.12
	matt-nb8-mediatek-base:1.1.1.1
	perseant-stdc-iso10646:1.1.1.1.0.10
	perseant-stdc-iso10646-base:1.1.1.1
	netbsd-8:1.1.1.1.0.8
	netbsd-8-base:1.1.1.1
	prg-localcount2-base3:1.1.1.1
	prg-localcount2-base2:1.1.1.1
	prg-localcount2-base1:1.1.1.1
	prg-localcount2:1.1.1.1.0.6
	prg-localcount2-base:1.1.1.1
	pgoyette-localcount-20170426:1.1.1.1
	bouyer-socketcan-base1:1.1.1.1
	pgoyette-localcount-20170320:1.1.1.1
	bouyer-socketcan:1.1.1.1.0.4
	bouyer-socketcan-base:1.1.1.1
	pgoyette-localcount-20170107:1.1.1.1
	pgoyette-localcount-20161104:1.1.1.1
	gdb-7-12:1.1.1.1
	localcount-20160914:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.2
	pgoyette-localcount-base:1.1.1.1
	gdb-7-10-1:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2016.02.03.03.00.20;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	uy8uLhh4ZQtrSpTy;

1.1.1.1
date	2016.02.03.03.00.20;	author christos;	state Exp;
branches;
next	1.1.1.2;
commitid	uy8uLhh4ZQtrSpTy;

1.1.1.2
date	2026.03.14.20.45.20;	author christos;	state Exp;
branches;
next	;
commitid	FYd84EijbJAv3ZxG;


desc
@@


1.1
log
@Initial revision
@
text
@See below some functions declarations for Visual Basic.

Frequently Asked Question:

Q: Each time I use the compress function I get the -5 error (not enough
   room in the output buffer).

A: Make sure that the length of the compressed buffer is passed by
   reference ("as any"), not by value ("as long"). Also check that
   before the call of compress this length is equal to the total size of
   the compressed buffer and not zero.


From: "Jon Caruana" <jon-net@@usa.net>
Subject: Re: How to port zlib declares to vb?
Date: Mon, 28 Oct 1996 18:33:03 -0600

Got the answer! (I haven't had time to check this but it's what I got, and
looks correct):

He has the following routines working:
        compress
        uncompress
        gzopen
        gzwrite
        gzread
        gzclose

Declares follow: (Quoted from Carlos Rios <c_rios@@sonda.cl>, in Vb4 form)

#If Win16 Then   'Use Win16 calls.
Declare Function compress Lib "ZLIB.DLL" (ByVal compr As
        String, comprLen As Any, ByVal buf As String, ByVal buflen
        As Long) As Integer
Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr
        As String, uncomprLen As Any, ByVal compr As String, ByVal
        lcompr As Long) As Integer
Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As
        String, ByVal mode As String) As Long
Declare Function gzread Lib "ZLIB.DLL" (ByVal file As
        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
        As Integer
Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As
        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
        As Integer
Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As
        Long) As Integer
#Else
Declare Function compress Lib "ZLIB32.DLL"
        (ByVal compr As String, comprLen As Any, ByVal buf As
        String, ByVal buflen As Long) As Integer
Declare Function uncompress Lib "ZLIB32.DLL"
        (ByVal uncompr As String, uncomprLen As Any, ByVal compr As
        String, ByVal lcompr As Long) As Long
Declare Function gzopen Lib "ZLIB32.DLL"
        (ByVal file As String, ByVal mode As String) As Long
Declare Function gzread Lib "ZLIB32.DLL"
        (ByVal file As Long, ByVal uncompr As String, ByVal
        uncomprLen As Long) As Long
Declare Function gzwrite Lib "ZLIB32.DLL"
        (ByVal file As Long, ByVal uncompr As String, ByVal
        uncomprLen As Long) As Long
Declare Function gzclose Lib "ZLIB32.DLL"
        (ByVal file As Long) As Long
#End If

-Jon Caruana
jon-net@@usa.net
Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member


Here is another example from Michael <michael_borgsys@@hotmail.com> that he
says conforms to the VB guidelines, and that solves the problem of not
knowing the uncompressed size by storing it at the end of the file:

'Calling the functions:
'bracket meaning: <parameter> [optional] {Range of possible values}
'Call subCompressFile(<path with filename to compress> [, <path with
filename to write to>, [level of compression {1..9}]])
'Call subUncompressFile(<path with filename to compress>)

Option Explicit
Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller'
Private Const SUCCESS As Long = 0
Private Const strFilExt As String = ".cpr"
Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef
dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long,
ByVal level As Integer) As Long
Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef
dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long)
As Long

Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal
strargCprFilPth As String, Optional ByVal intLvl As Integer = 9)
    Dim strCprPth As String
    Dim lngOriSiz As Long
    Dim lngCprSiz As Long
    Dim bytaryOri() As Byte
    Dim bytaryCpr() As Byte
    lngOriSiz = FileLen(strargOriFilPth)
    ReDim bytaryOri(lngOriSiz - 1)
    Open strargOriFilPth For Binary Access Read As #1
        Get #1, , bytaryOri()
    Close #1
    strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth)
'Select file path and name
    strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) =
strFilExt, "", strFilExt) 'Add file extension if not exists
    lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit
more space then original file size
    ReDim bytaryCpr(lngCprSiz - 1)
    If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) =
SUCCESS Then
        lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100
        ReDim Preserve bytaryCpr(lngCprSiz - 1)
        Open strCprPth For Binary Access Write As #1
            Put #1, , bytaryCpr()
            Put #1, , lngOriSiz 'Add the the original size value to the end
(last 4 bytes)
        Close #1
    Else
        MsgBox "Compression error"
    End If
    Erase bytaryCpr
    Erase bytaryOri
End Sub

Public Sub subUncompressFile(ByVal strargFilPth As String)
    Dim bytaryCpr() As Byte
    Dim bytaryOri() As Byte
    Dim lngOriSiz As Long
    Dim lngCprSiz As Long
    Dim strOriPth As String
    lngCprSiz = FileLen(strargFilPth)
    ReDim bytaryCpr(lngCprSiz - 1)
    Open strargFilPth For Binary Access Read As #1
        Get #1, , bytaryCpr()
    Close #1
    'Read the original file size value:
    lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _
              + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _
              + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _
              + bytaryCpr(lngCprSiz - 4)
    ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value
    ReDim bytaryOri(lngOriSiz - 1)
    If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS
Then
        strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt))
        Open strOriPth For Binary Access Write As #1
            Put #1, , bytaryOri()
        Close #1
    Else
        MsgBox "Uncompression error"
    End If
    Erase bytaryCpr
    Erase bytaryOri
End Sub
Public Property Get lngPercentSmaller() As Long
    lngPercentSmaller = lngpvtPcnSml
End Property
@


1.1.1.1
log
@Import gdb-7.10.1:

2015-06-30  H.J. Lu  <hongjiu.lu@@intel.com>

	* configure.ac (ospace_frag): Enable for i?86*-*-elfiamcu
	target.
	* configure: Regenerate.

2015-05-13  John David Anglin  <dave.anglin@@bell.net>

	* configure.ac: Disable configuration of GDB for HPUX targets.
	* configure: Regenerate.

2015-05-01  H.J. Lu  <hongjiu.lu@@intel.com>

	PR ld/18355
	* Makefile.def: Add extra_configure_flags to host zlib.
	* configure.ac (extra_host_zlib_configure_flags): New.  Set
	to --enable-host-shared When bfd is to be built as shared
	library.  AC_SUBST.
	* Makefile.in: Regenerated.

2015-04-15  Mike Frysinger  <vapier@@gentoo.org>
	    Hans-Peter Nilsson  <hp@@axis.com>

	Adjust src-release.sh for sim using the gdb create-version.sh.
	* src-release.sh (tar_compress): If there's a fifth parameter,
	use that in the getver call instead of $tool.
	(sim_release): Pass gdb as fifth parameter to tar_compress.
	(SIM_SUPPORT_DIRS): Add gdb/common/create-version.sh.

2015-04-14  Max Ostapenko  <m.ostapenko@@partner.samsung.com>

	* Makefile.tpl (EXTRA_HOST_EXPORTS): New variables.
	(EXTRA_BOOTSTRAP_FLAGS): Likewise.
	(check-[+module+]): Add EXTRA_HOST_EXPORTS and EXTRA_BOOTSTRAP_FLAGS.
	* Makefile.in: Regenerate.

2015-04-01  H.J. Lu  <hongjiu.lu@@intel.com>

	* configure.ac: Add --with-system-zlib.
	* configure: Regenerated.

2015-03-31  H.J. Lu  <hongjiu.lu@@intel.com>

	* src-release.sh: Don't configure with  --with-target-subdir=.
	--disable-multilib.

2015-03-31  H.J. Lu  <hongjiu.lu@@intel.com>

	* src-release.sh (DEVO_SUPPORT): Replace src-release with
	src-release.sh.

2015-03-30  Ed Schouten  <ed@@nuxi.nl>

	* config.sub: Update from upstream, to 2015-03-04 version.
	* config.guess: Likewise.

2015-03-30  H.J. Lu  <hongjiu.lu@@intel.com>

	* Makefile.def (dependencies): Add all-zlib to all-bfd.
	* Makefile.in: Regenerated.

2015-03-28  H.J. Lu  <hongjiu.lu@@intel.com>

	* src-release.sh (do_proto_toplev): Configure with --target
	--with-target-subdir and --disable-multilib.
	(BINUTILS_SUPPORT_DIRS): Add zlib.
	(GAS_SUPPORT_DIRS): Likewise.
	(GDB_SUPPORT_DIRS): Likewise.
	(SIM_SUPPORT_DIRS): Likewise.

2015-03-17  H.J. Lu  <hongjiu.lu@@intel.com>

	* configure.ac (target_configdirs): Exclude target-zlib if
	target-libjava isn't built.
	* configure: Regenerated.

2015-03-17  H.J. Lu  <hongjiu.lu@@intel.com>

	Sync with GCC
	2014-06-13  Thomas Schwinge  <thomas@@codesourcery.com>

	* config-ml.in: Robustify ac_configure_args parsing.

2015-03-16  H.J. Lu  <hongjiu.lu@@intel.com>

	* Makefile.def: Updated from GCC trunk.
	* Makefile.tpl: Likewise.
	* configure.ac: Likewise.
	* Makefile.in: Regenerated.
	* configure: Likewise.

2015-01-28  James Bowman  <james.bowman@@ftdichip.com>

	* configure.ac: Add FT32 support.
	* configure: Regenerate.

2015-01-12  Anthony Green  <green@@moxielogic.com>

	* configure.ac: Don't disable gprof for moxie.
	* configure: Rebuild.
@
text
@@


1.1.1.2
log
@Import gdb-17.1, previous was 16.3

This version of GDB includes the following changes and enhancements:

* x86-64 CET shadow stack support
* Debugging Linux programs that use AArch64 Guarded Control Stacks
* GDB record feature now supports rv64gc architectures
* 'info threads' command support for two new options '-stopped' and
  '-running' to limit the list of displayed threads.
* On Linux and FreeBSD, the addresses shown by the 'info
  sharedlibrary' command are now for the full memory range
  allocated to the shared library.
* Linux checkpoints now work with multiple inferiors
* Improved linker namespace support
* Warnings and error messages now start with an emoji (warning
  sign, or cross mark) if supported by the host charset.
  Configurable.
* Built-in support for TLS on Linux as backup when libthread_db is
  not available. Supported on the x86_64, aarch64, ppc64, s390x,
  and riscv architectures, when compiled with GLIBC or MUSL.
* New command "set riscv numeric-register-names" to display
  risc-v registers using their numeric names instead of their
  ABI names.
* The Alpha target now supports target descriptions.

Python API enhancements:
* New class gdb.Color for dealing with colors, and new constant
  gdb.PARAM_COLOR
* New gdb.ParameterPrefix class, to create new 'set/show' command
  prefixes.
* New attribute gdb.Value.is_unavailable, this checks for
  unavailability like gdb.Value.is_optimized_out checks for
  optimized out values.
* New gdb.warning() function to print a warning message, with
  GDB's standard 'warning' prefix (see emoji support entry below)
* gdb.execute has an additional 'styling' argument.
* Prefix commands (gdb.Command sub-classes) that don't have an
  invoke method now behave like builtin prefix commands when
  invoked without a sub-command name.
* Setting the documentation string (__doc__) of a gdb.Parameter
  sub-class to the empty string, means GDB will only display the
  set_doc or show_doc strings in the set/show help output.

Guile API enhancements:
* New type for dealing with colors and constant PARAM_COLOR
* Prefix commands (using make-command) that don't have a #:invoke
  property will now behave like builtin prefix commands when
  invoked without a sub-command name.
* Eliding the #:doc string from make-parameter now means that
  GDB will use a default documentation string.
* Setting #:doc to the empty string for make-parameter means GDB
  will only display the #:set_doc or #:show_doc strings in the
  set/show help output.

Debugger Adapter Protocol changes:
* GDB now supports the "completions" request.
* New "--binary-output" command line option to disable LF
  translations (Windows only)

New convenience variables:
* $_colorsupport providing a comma-separated list of color space
  names supported by the terminal.
* $linker_namespace_count and $_linker_namespace provide the list
  of active linker namespaces.

Remote package additions and changes:
* New 'binary-upload+' value in qSupported reply
* The 'vFile:stat' command implementation has been corrected to
  use stat rather than lstat.
* New vFile:lstat packet, useful for handling symbolic links
* Support for the "id_str" attribute in 'qXfer:threads:read' XML
  answer.

GDB/MI changes:
* The =library-unloaded event now includes the 'ranges' field and
  the 'still-in-use' field.

Configure changes:
* Ability to select which file formats to include support for
* New option --disable-gdb-compile to disable support for the
  compile subsystem.
* New option --disable-gdb-dwarf-support to disable support for
  DWARF debug information in GDB.
* New option --disable-gdb-mdebug-support to disable support for
  mdebug/ecoff debug information.

Incompatible changes:
* Support for Python versions older than 3.4 has been removed
* Support for stabs debugging format and the a.out/dbx object
  format is deprecated, and will be removed in GDB 18.
* UST (static tracepoint) gdbserver support has been removed
@
text
@d118 1
a118 1
            Put #1, , lngOriSiz 'Add the original size value to the end
@

