GDB debug setting for lazarus

GDB_on_OS_X_Mavericks_or_newer_and_Xcode_5_or_newer

Codesigning gdb

https://sourceware.org/gdb/wiki/BuildingOnDarwin#Method_for_Mac_OS_X_10.5_.28Leopard.29_and_later

Mac(os x)下使用gdb的问题

codesign 之后,运行出现

sudo codesign -fs gdb-cert /usr/local/bin/gdb

The GDB command:
"-gdb-set confirm off"
did not return any result.

终端执行gdb

dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.6.dylib
Referenced from: /usr/local/bin/gdb
Reason: image not found
[1] 25803 trace trap gdb

参考:
cannot run gdb on mac's terminal even after codesign

build gdb from source

  1. download source from
    ftp://sourceware.org/pub/gdb/releases/
  2. build

    ./configure
    make
    sudo make install

    build error

probe.c:63:28: error: default initialization of an object of const type 'const any_static_probe_ops' without a user-provided default

https://news.ycombinator.com/item?id=16275140

fixed: remove const

- const any_static_probe_ops any_static_probe_ops;
+ any_static_probe_ops any_static_probe_ops;

vps + onedrive 挂载实验

参考(https://www.moerats.com/archives/491/)

教程写得很详细,按照步骤来即可。
中间碰到几个问题

  1. rclone authorize 获取校验
    vps上没有办法启动browser,只能使用no,手动校验

因为使用的是mac,安装mac版的rclone
macos-installation-from-precompiled-binary

教程很详细,基本上,全部copy即可。

在mac上运行,rclone authorize "onedrive"
浏览器跳出授权校验,然后rclone即可显示key

Waiting for code…
Got code
Paste the following into your remote machine —>
{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlNTUWRoSTFjS3ZoUUVEU0p4RTJnR1lzNDBRMCIsImtpZCI6IlNTUWRoSTFjS3ZoUUVEU0p4RTJnR1lzNDBRMCJ9.eyJhdWQiOiJodHRwczovL2FwaS5vZmZpY2UuY29tL2Rpc2NvdmVyeS8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85OGQ0YmE1ZC1lM2RlLTRkZDMtODc5ZC0wNzAwYjhiZDY2NTAvIiwiaWF0IjoxNTIxMTI4MTEwLCJ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-KojRTVTqPplii_3j2DbgXzXJzpFTQLb8s55PhfCLL8E_8E3-91cptM0sZHHOZrBvNnV4IC1JURAa2p4edOH6km5r7Xi_ZZXLBTMZ1Y0DKwU_LrR5yNSLKwzq8oBCWgkgSIG2w81wbVxwOjsf_6wQ8Thi4XZE4kp4McBqwheJWv7c06IKBlzMPxZwuQE5gW2BMXHkILTGhTrMm8rACDxkAiJMuFP68AVylh0GaSeE_w6TSa0DNJTiqR2cd4uMf3xDm8Pr__QlnZSAA","expiry":"2018-03-16T00:40:09.97948688+08:00"}
<—End paste%

把大括号里面的内容粘贴到vps上的rclone上,即可配置完成。

  1. mount的时候,参数需要修改
    >rclone mount onedrive_ccc:ebooks /opt/onedrive –copy-links –no-gzip-encoding –no-check-certificate –allow-other –allow-non-empty –umask 000

报错,才发现,只有kvm的vps才行,openVZ的不行,只好换了bwg的

  1. 然后顺利配置自动启动,一路顺利。

  2. 测试写入文件到vps的目录下,onedrive即可看到。

使用vps的ipv6网络,架设shadowsocksr,使本地通过ssr访问ipv6网络

参考:使用vps的ipv6网络

https://www.leavesongs.com/SHARE/ipv6-via-ss.html

检查现有的ssr配置,基本上都是配置OK,可设置ipv6作为代理,都无法上网。

  1. bwg
    ifconfig 可以看到ipv6 地址,但是无法ping通
    参考
    >http://www.bandwagonhost.net/512.html

原来kvm的,没有ipv6,难怪没找着启用的地方
该文章有提供思路,可参考。

  1. vultr

配置里面选择ipv6,即可激活一个ipv6 网络,需要重启vps

启用后,ping6 本机地址 OK

修改ssr配置,dns_ipv6 修改为true,重启ssr,

service shadowsocks-r restart

"redirect":"",
"dns_ipv6":true,
"fast_open":false,
"workers":1

然后,ssr 客户端,设置服务器的ipv4的地址即可

http://ipv6.blcu6.edu.cn/resource.asp

ps:bwg cn2 在移动宽带下,访问比vultr慢多了。